public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] fix for pwm-mxs period divider computation
@ 2015-02-18  8:18 Gaetan Hug
  2015-02-18  8:18 ` [PATCH 1/1] fixing " Gaetan Hug
  2015-02-18 12:08 ` [PATCH 0/1] fix for " Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Gaetan Hug @ 2015-02-18  8:18 UTC (permalink / raw)
  To: thierry.reding; +Cc: linux-pwm, linux-kernel, Gaetan Hug

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(-)

--
1.7.10.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-18 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18  8:18 [PATCH 0/1] fix for pwm-mxs period divider computation Gaetan Hug
2015-02-18  8:18 ` [PATCH 1/1] fixing " Gaetan Hug
2015-02-18 12:11   ` Thierry Reding
2015-02-18 12:08 ` [PATCH 0/1] fix for " Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox