rtc: pcf2127: only use watchdog when explicitly available
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 18 Dec 2020 10:10:54 +0000 (11:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jan 2021 12:46:22 +0000 (13:46 +0100)
commit757cd94ac8598b0365e8b2b46564ff537d74805c
tree187ae47159aa500161e8fee0cd9684cee1224635
parentacb821425c8cc5a4b688c973446cde356a04923a
rtc: pcf2127: only use watchdog when explicitly available

commit 71ac13457d9d1007effde65b54818106b2c2b525 upstream.

Most boards using the pcf2127 chip (in my bubble) don't make use of the
watchdog functionality and the respective output is not connected. The
effect on such a board is that there is a watchdog device provided that
doesn't work.

So only register the watchdog if the device tree has a "reset-source"
property.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[RV: s/has-watchdog/reset-source/]
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201218101054.25416-3-rasmus.villemoes@prevas.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-pcf2127.c