Skip to content

RFC add new hwmon core interface

Lucas Stach lm-sensors 1 version In review

Get series with b4
b4 am 1309477462.18912.26.camel@tellur

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2add new hwmon core interfacedrivers/hwmon/hwmon-core.c include/linux/hwmon-core.h+867 -04 replies
2/2add new hwmon core interfacedrivers/hwmon/Kconfig drivers/hwmon/Makefile drivers/hwmon/hwmon-dummy.c+183 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [lm-sensors] [RFC 0/2] add new hwmon core interface

Hello Jean, Guenter and others,

quite some time ago we talked about adding a new hwmon core interface to make the attributes of the drivers easily accessible to other kernel modules. The following patch does this. It is a heavy WIP and does not reflect the full potential of this interface, but i would like to hear some opinions before I spend more time on this.

A short functional summary to make it more easy for you to grok this:
basically every driver that wants to provide this interface allocates a hwmon_device_instance, fills out the cap values to reflect the capabilities of the driver/hardware and links this struct as driverdata the hwmon_device returned by hwmon_device_register.

hwmon_create_sysfs creates sysfs accessors according to the specified caps and routes accesses through the attribute get and set functions of the hwmon_device_instance.

The second patch is only a hackish dummy driver to showcase the new interface.

Missing from this interface is a clean way to get/set trip points and the alarm sysfs accessors are currently unimplemented.

Could you please give me some feedback? Is this the right direction or am I doing something obviously wrong? Please CC me as I'm not on the list.

Thanks,
Lucas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors