watchdog: stm32: add dynamic prescaler support
authorLudovic Barre <ludovic.barre@st.com>
Fri, 3 May 2019 13:48:26 +0000 (15:48 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 5 May 2019 19:10:36 +0000 (21:10 +0200)
commite9974166a53acc0f6585fe3462d6ac45e204f785
tree4c532a3f199002decf6c76c7ae20c1963b759a5b
parent345f16251063bcef5828f17fe90aa7f7a5019aab
watchdog: stm32: add dynamic prescaler support

This patch allows to define the max prescaler by compatible.
To set a large range of timeout, the prescaler should be set
dynamically (from the timeout request) to improve the resolution
in order to have a timeout close to the expected value.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/stm32_iwdg.c