Skip to content
Commit 2c34d599 authored by Doug Anderson's avatar Doug Anderson Committed by Wim Van Sebroeck
Browse files

watchdog: core: Make dt "timeout-sec" property work on drivers w/out min/max



It is valid for a watchdog driver to have 0 for a "min" and "max"
timeout if the driver doesn't need the core to enforce the concepts of
min and max.  The s3c2410_wdt driver is one such driver.  Specifically
it can be hard for that driver to come up with a static "max" on all
platforms without a lot more information since the input clock on
S3C2410 and S3C2440 can change with DVFS.

As written, watchdog_init_timeout() will not ever read "timeout-sec"
on these drivers since watchdog_timeout_invalid() will _never_ return
true.  Change to not consider a timeout_parm of 0 as valid even if
min/max aren't specified by the driver.  Also handle the case when
there is no min/max and no "timeout-sec" property.

Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent bc17f9dc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment