Re: hwmon_device_register compatibility with lm-sensors

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

 



On Tue, Aug 26, 2014 at 03:02:48PM +0000, Venkat Duvvuru wrote:
> Hi,
> I'm using "hwmon_device_register_with_groups" to register with hwmon to show be2net's on-die temperature. I'm successful in doing it and the node is also visible at "/sys/class/hwmon/hwmon1/temp1_input" and lm-sensors  (sensors command) also shows the temperature.
> 
> However I'm not sure if a kernel doesn't support "_groups" version of the api, how do I register with hwmon so that it is compatible with lm-sensors.
> 
> For example, in kernels where "_groups" is not supported. I'm doing the following to register with hwmon
> 
> 1.       sysfs_create_group
> 
> 2.       hwmon_device_register
> The above calls are creating "temp1_input" node at "/sys/class/hwmon/hwmon1/device/temp1_input" and sensors command is not showing the temperature.
> 
> Please let me know if I'm missing anything.
> 
With the old API, the attributes are attached to the parent device,
not to the hwmon device. That was one of the reasons for introducing
the new API. The sensors command should find both, unless you are missing
the 'name' attribute when using the old API. The new API creates this
attribute automatically, but the old API doesn't.

Guenter

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux