Re: dt-binding to define default watchdog and machine reset (Was: Re: [RFC] Using a watchdog as system reset)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 10/7/20 1:04 PM, Guenter Roeck wrote:
> On 10/7/20 3:18 AM, Uwe Kleine-König wrote:
>> Let's introduce a generic watchdog property `watchdog-priority' that
>> provides a u32 to order the watchdogs for systems having two or more.
>> The value 0 means the watchdog is unusable/broken/disabled and the
>> watchdog with the biggest value is the one supposed to be used by
>> default.
>>
> 
> How do you suggest to implement that ? Device naming is determined
> by registration order. The watchdog subsystem doesn't decide which of
> the watchdogs is being used; userspace does that by opening the
> watchdog device. Userspace can already decide which watchdog to use
> by checking its sysfs attributes. If we were to create a sysfs attribute
> for userspace to read and compare, userspace could as well use the existing
> 'identity' attribute to make that decision.

Might be relevant for users of CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED, so
the kernel only starts that one watchdog? This seems out-of-scope for
Uwe's Problem though.

>> Analogous a property `watchdog-restart-priority` is used to define if a
>> watchdog is supposed to be used to restart the machine. Again a value of
>> 0 means "Don't use" and otherwise the highest-value watchdog is used to
>> reset the machine.
>>
> 
> That makes more sense to me.

Yes, such a `restart-priority' is what I had in mind. Preferably covering
PMICs as well.

Cheers,
Ahmad

> 
> Guenter
> 
>> Maybe `restart-priority` is a better name that can also be used by
>> PMICs?!
>>
>>> What's the DT folks opinion on that?
>>
>> Best regards
>> Uwe
>>
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux