Re: [PATCH 0/2] add ripple counter dt binding and driver
From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-03-01 14:24:11
Also in:
linux-clk, linux-watchdog, lkml
On 3/1/21 1:44 AM, Arnd Bergmann wrote:
On Mon, Mar 1, 2021 at 9:34 AM Rasmus Villemoes [off-list ref] wrote:quoted
On 26/02/2021 20.53, Guenter Roeck wrote:quoted
Sorry, I am missing something. If the watchdog is controlled by the clock, it is a consumer of that clock.But that's just it, the watchdog chip is _not_ a consumer of the clock - I don't think I've ever seen a gpio_wdt that is not internally clocked, but even if they exist, that's not the case for this board. What else does "consumer" mean ? And whyquoted
not just add optional clock support to the gpio_wdt driver ?Because, the consumer is a piece of electronics sitting _between_ the watchdog chip's reset output and the SOCs reset pin, namely the ripple counter that implements a 64 ms delay from the watchdog fires till the actual reset. (The watchdog's reset is also routed directly to an interrupt; so software gets a 64 ms warning that a hard reset is imminent).I think it's a question of how you look at what the gpio_wdt device is. While physical gpio chip is not a consumer of the clock, I agree with Guenter that the conceptual device is: The functionality of the watchdog in this case is provided by the combination of the external chip with the ripple counter. I think it is therefore appropriate to have the gpio_wdt and the driver refer to the clock as part of the watchdog.
I agree. All electronics needed for the watchdog to operate is part of the watchdog, and for me that includes the circuitry that connects it to the reset pin. The clock is needed for proper watchdog operation, so I would consider the watchdog to be a consumer. Guenter