On 23/04/21 13:36, Rasmus Villemoes wrote: > On 21/04/2021 18.26, Francesco Zanella wrote: >> If "start-at-boot" property is present in the device tree, start pinging >> hw watchdog at probe, in order to take advantage of kernel configs: > > (1) Are you aware of the recent proposal to add a similar feature on > watchdog core level: > > https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flkml%2F%3Fq%3Dstart_enable&data=04%7C01%7Cfrancesco.zanella%40vimar.com%7Cde549dd02adb45669ff208d9064c0739%7Ca1f008bcd59b4c668f8760fd9af15c7f%7C1%7C0%7C637547745887915290%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pcqWkd%2B4m6RSS4KwmjgIbLpaa0XSCAOQorwI%2BIle5uY%3D&reserved=0 > Oh good! Happy to know that, I missed it, sorry, it's quite new. That kind of work would have been my next proposal if this had been accepted. Hope that it will be mainlined. > (2) If you set always-running but not nowayout you essentially have what > you want now: If userspace opens the device [within the limit set by > OPEN_TIMEOUT if that is in effect], but then does a graceful close (i.e. > writes 'V' immediately before close()), the kernel will assume > responsibility for pinging the device. So the device isn't stopped as > such, but if you can't trust the kernel thread/timer to keep it alive, > the system is already mostly unusable. [Also, how reliable is that 'the > timer is stopped if the gpio is set to be an input' anyway]. > > Rasmus > No I would like to be able to totally disable it with stop, not that the kernel will keep it pinged. However, glad to know the news, I will follow the evolution. Thanks, regards, Francesco Zanella