All of lore.kernel.org
 help / color / mirror / Atom feed
* Trying to understand hwmon drivers - where is code that reads hwmon_chip_attributes?
@ 2022-10-05 21:55 Nick Neumann
  2022-10-05 22:44 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Neumann @ 2022-10-05 21:55 UTC (permalink / raw)
  To: linux-hwmon

Apologies for the newbie question. I'm trying to follow the hwmon code
and see how hwmon_chip_attributes are read and used. (Namely, I'm
interested in hwmon_chip_update_interval, and what the default update
interval is if no interval is specified.)

I can find lots of different drivers that provide
hwmon_chip_update_interval, but I'm looking for the code that actually
uses its value, if that makes sense. I've been slowly trying to follow
it through and am guessing it may be in the general device driver
infrastructure, but haven't yet been able to follow it to the code
that actually uses hwmon_chip_update_interval or the other chip
attributes.

Any pointers to code or docs that would help? Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trying to understand hwmon drivers - where is code that reads hwmon_chip_attributes?
  2022-10-05 21:55 Trying to understand hwmon drivers - where is code that reads hwmon_chip_attributes? Nick Neumann
@ 2022-10-05 22:44 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2022-10-05 22:44 UTC (permalink / raw)
  To: Nick Neumann, linux-hwmon

On 10/5/22 14:55, Nick Neumann wrote:
> Apologies for the newbie question. I'm trying to follow the hwmon code
> and see how hwmon_chip_attributes are read and used. (Namely, I'm
> interested in hwmon_chip_update_interval, and what the default update
> interval is if no interval is specified.)
> 
> I can find lots of different drivers that provide
> hwmon_chip_update_interval, but I'm looking for the code that actually
> uses its value, if that makes sense. I've been slowly trying to follow
> it through and am guessing it may be in the general device driver
> infrastructure, but haven't yet been able to follow it to the code
> that actually uses hwmon_chip_update_interval or the other chip
> attributes.
> 
> Any pointers to code or docs that would help? Thanks!

I am not sure I understand your question. Every driver supporting
hwmon_chip_update_interval (that is, the "update_interval" sysfs attribute)
will also use it, typically to set some chip configuration option.

There is no generic default value for this attribute. The default value,
if the attribute is supported, is chip specific.

Guenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-05 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 21:55 Trying to understand hwmon drivers - where is code that reads hwmon_chip_attributes? Nick Neumann
2022-10-05 22:44 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.