Re: Query: Best way to know if a watchdog is active (kicked)

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

 



On Fri, Aug 21, 2015 at 02:22:17PM +0530, Pratyush Anand wrote:
> On 18/08/2015:07:23:38 AM, Guenter Roeck wrote:
> > Sounds good. We should have a 'name' attribute as well. We'll also need
> > 'timeout', 'keepalive' to ping the watchdog, 'timeleft', and 'bootstatus'.
> > Not sure what else.
> > 
> > The attributes should be implemented as class attributes, to ensure
> > that they are created and removed automatically. That may require
> > the watchdog class to be static instead of a pointer.
> 
> Should n't attributes be implemented as device attribute as they are properties
> of each device. Under the class watchdog_class, we can have multiple device on a
> system, and these attributes would be different for different devices. So, what
> I am thinking is to create device in __watchdog_register_device using
> device_create_with_groups instead of device_create. Here we can link a
> attribute_group with all attributes you suggested.
> 
Class attibutes are created automatically for each device registered which is
a member of the class. They are attached to the device, not to the class.
In other words, the infrastructure creates the attributes, the driver doesn't
have to do it, and there is no race condition where the device exists but
the attributes are not yet there.

Not sure what you mean with "different". Can you elaborate ?

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux