]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks
authorMoritz Fischer <mdf@kernel.org>
Mon, 24 Apr 2017 22:05:11 +0000 (15:05 -0700)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Thu, 4 May 2017 12:45:25 +0000 (14:45 +0200)
commit4de0a52d8536db6e462b4a0e770070a685cab0bf
tree7b0e1ba9e522b06f925638beb731e6d411b9ef03
parentbd0249ee3c8bc621389fc6dce523e38fa2d29759
rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt ticks

The issue is that the internal counter that triggers the watchdog reset
is actually running at 4096 Hz instead of 1Hz, therefore the value
given by userland (in sec) needs to be multiplied by 4096 to get the
correct behavior.

Fixes: 996bb6ae105c ("drivers/rtc/rtc-ds1374.c: add watchdog support")
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-ds1374.c