[PATCH 0/1] fix for pwm-mxs period divider computation

From: Gaetan Hug
Date: Wed Feb 18 2015 - 03:34:44 EST

Hello Thierry,

I found a bug in the pwm-mxs.c driver for the i.MX28 platform.

The driver computes from the desired period which clock divider it
should be using. This computation assumes that the link between the
register value and the actual divider value is raising 2 to the power of
the registry value.

div = 1 << regvalue

This is true only for the first 5 values out of 8. Next values are
64, 256 and, 1024.
This affects only the user only if he requests a period > 0.04369s.

Gaetan Hug (1):
fixing pwm-mxs period divider computation

drivers/pwm/pwm-mxs.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/