Re: [PATCH 0/2] DS1374 Watchdog fixes
From: Guenter Roeck
Date: Tue Apr 25 2017 - 01:04:02 EST
On 04/24/2017 03:05 PM, Moritz Fischer wrote:
Hi all,
this series fixes two issues that I ran into when trying to use the
watchdog part of the DS1374 on of our products.
This series is basically a precursor to some further cleanup work,
that turns the DS1374 into a MFD device with an RTC and WDT in
separate drivers [1] each integrated in either the watchdog and
the rtc frameworks.
I'm very unhappy with the CONFIG_DRV_RTC_DS1374_WDT way of enabling
the watchdog behavior and currently I'm investigating how to make
that work via DT.
Watchdog maintainers, do you have an idea on how to do that in a
non breaking fashion?
Depends on what you mean with "non breaking". Just using the normal mfd
mechanisms, ie define an mfd cell for each client driver, should work.
Do you see any problems with that ? Either case, that doesn't seem
to be a watchdog driver problem, or am I missing something ?
Thanks,
Moritz
[1] https://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux.git/log/?h=wip/mfd-ds1374-rfc
Moritz Fischer (2):
rtc: ds1374: wdt: Fix issue with timeout scaling from secs to wdt
ticks
rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL
I don't really see the point of doing that if you plan to move the watchdog
part of the driver into the watchdog directory. We for sure won't accept a
watchdog driver that does not use the watchdog infrastructure.
Regarding
+ /* WHY? */
+ ds1374->wdd.timeout = t;
Assuming you mean why the driver has to set the timeout value - not every
watchdog hardware supports timeouts in multiples of 1 second. The driver
is expected to set the value to the real timeout, not to the timeout asked
for by the infrastructure.
Guenter