hwmon: hwmon sysfs class
cover hwmon: hwmon sysfs class
Hi Greg:
Here is the patchset that adds the hwmon sysfs class. It is refreshed against 2.6.13-rc3, which required no changes since my last RFC. Please apply.
drivers/hwmon/Kconfig | 7 ++- drivers/hwmon/Makefile | 2 drivers/hwmon/adm1021.c | 16 ++++++- drivers/hwmon/adm1025.c | 16 ++++++- drivers/hwmon/adm1026.c | 19 +++++++- drivers/hwmon/adm1031.c | 20 +++++++-- drivers/hwmon/adm9240.c | 19 +++++++- drivers/hwmon/asb100.c | 31 +++++++++++--- drivers/hwmon/atxp1.c | 16 ++++++- drivers/hwmon/ds1621.c | 16 ++++++- drivers/hwmon/fscher.c | 16 ++++++- drivers/hwmon/fscpos.c | 16 ++++++- drivers/hwmon/gl518sm.c | 17 ++++++- drivers/hwmon/gl520sm.c | 16 ++++++- drivers/hwmon/hwmon.c | 98 +++++++++++++++++++++++++++++++++++++++++++++ drivers/hwmon/it87.c | 16 ++++++- drivers/hwmon/lm63.c | 16 ++++++- drivers/hwmon/lm75.c | 15 ++++++ drivers/hwmon/lm77.c | 16 ++++++- drivers/hwmon/lm78.c | 16 ++++++- drivers/hwmon/lm80.c | 16 ++++++- drivers/hwmon/lm83.c | 16 ++++++- drivers/hwmon/lm85.c | 15 ++++++ drivers/hwmon/lm87.c | 16 ++++++- drivers/hwmon/lm90.c | 16 ++++++- drivers/hwmon/lm92.c | 17 ++++++- drivers/hwmon/max1619.c | 17 ++++++- drivers/hwmon/pc87360.c | 13 +++++ drivers/hwmon/sis5595.c | 18 +++++++- drivers/hwmon/smsc47b397.c | 18 +++++++- drivers/hwmon/smsc47m1.c | 19 +++++++- drivers/hwmon/via686a.c | 24 ++++++++--- drivers/hwmon/w83627ehf.c | 16 ++++++- drivers/hwmon/w83627hf.c | 16 ++++++- drivers/hwmon/w83781d.c | 39 ++++++++++++++--- drivers/hwmon/w83l785ts.c | 16 ++++++- include/linux/hwmon.h | 24 +++++++++++ 37 files changed, 659 insertions(+), 61 deletions(-)
I dedicate this patchset to Celia.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Hi Greg,
Quoting Mark M. Hoffman:
Quoted 2 lines
Here is the patchset that adds the hwmon sysfs class. It is refreshed against 2.6.13-rc3, which required no changes since my last RFC.
I did review these three patches and do support them. Feel free to add:
before your own. Maybe we can even have a "Dedicated-to: Celia" line for these ones? :)
Thanks,
Signature · 1 line
Jean Delvare
Hi Jean, Mark,
I'm a bit confused on the current state of hwmon, was the latest patch accepted anywhere? Aside from ipmisensors (which is blocked on other work anyway) I'm looking into adding a sysfs/hwmon interface to the new hdaps driver (see http://hdaps.sourceforge.net/), any opinions?
It would probably mean adding two new classes of sensor types, acceleration and 'variation' types. The hdaps driver is not the only driver out there that could use these though, I believe some powerbooks and other notebooks have a similair system (see
http://www.kernelthread.com/software/ams/).
Thanks,
Yani
Quoted 22 lines · Jean Delvare
Hi Greg,
Quoting Mark M. Hoffman:
Quoted 2 lines
Here is the patchset that adds the hwmon sysfs class. It is refreshed against 2.6.13-rc3, which required no changes since my last RFC.
I did review these three patches and do support them. Feel free to add:
Signed-off-by Jean Delvare <[email protected]>before your own. Maybe we can even have a "Dedicated-to: Celia" line for these ones? :)
Thanks,
--
Jean Delvare_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Yani,
Quoted 2 lines · Yani Ioannou
I'm a bit confused on the current state of hwmon, was the latest patch accepted anywhere?
It was accepted by me, for what it's worth. I'd expect Greg KH to ack it when he gets around, but he is currently busy with the various Linux summer summits.
Quoted 3 lines
Aside from ipmisensors (which is blocked on other
work anyway) I'm looking into adding a sysfs/hwmon interface to the new hdaps driver (see http://hdaps.sourceforge.net/), any opinions?
The site lacks documentation. Care to explain to us what exactly the project does, and why you do think it is related with hardware monitoring? Any precise example of what sysfs files would be created?
Quoted 5 lines
It would probably mean adding two new classes of sensor types, acceleration and 'variation' types. The hdaps driver is not the only driver out there that could use these though, I believe some powerbooks and other notebooks have a similair system (see
http://www.kernelthread.com/software/ams/).
I think I can imagine whan an acceleration sensor is about. Not too sure what "variations" would be though. What unit are these variations expressed in? Sensors are typically about measuring a current state rather than expressing variations between states.
--
Jean Delvare
Quoted 3 lines · Jean Delvare
It was accepted by me, for what it's worth. I'd expect Greg KH to ack it when he gets around, but he is currently busy with the various Linux summer summits.
Actually I'm here at the Ottawa Linux Symposium with him :-), he is a bit busy though as usual so I haven't asked him. You should be here! :) There are no lm_sensors people here which is a shame because its so nice to put a face to a name, and to talk in person for a change.
Quoted 8 lines
Quoted 4 lines
Aside from ipmisensors (which is blocked on other
work anyway) I'm looking into adding a sysfs/hwmon interface to the new hdaps driver (see http://hdaps.sourceforge.net/), any opinions?The site lacks documentation. Care to explain to us what exactly the project does, and why you do think it is related with hardware monitoring? Any precise example of what sysfs files would be created?
HDAPS is a driver for the Thinkpad 'Active Protection System' which uses a gyroscope chip (I will have to dig up again exactly which one) to detect falls and try to protect the hard drive by parking the head before it hits the ground. From what I understand the Powerbook uses the same chip on the i2c bus instead of ISA.
Actually I created a patch to add sysfs support...but I trashed that notebook last night messing with an experimental kernel, and on top of that the CD drive isn't working, so I don't know if I'll be able to recover that work :(. Basically though with hdaps we have two temperature sensors temp0, temp1, two acceleration sensors (x_accel, y_accel - maybe standardize to accel_0, accel_1?) and two 'variations' x_variation, y_variation which I think techinically are jerk - change in acceleration. There is also a keyboard/mouse activity sensor (km_activity).
Quoted 4 lines
I think I can imagine whan an acceleration sensor is about. Not too sure what "variations" would be though. What unit are these variations expressed in? Sensors are typically about measuring a current state rather than expressing variations between states.
I'm guessing that they are jerk (change in acceleration, or m/s^3), but I'm not sure. I wouldn't normally expect such a thing to be implemented by the chip, but instead monitored by a driver.
I'm going to try to fix my thinkpad now :-),
Yani
Quoted 8 lines · Yani Ioannou
HDAPS is a driver for the Thinkpad 'Active Protection System' which uses a gyroscope chip (I will have to dig up again exactly which one) to detect falls and try to protect the hard drive by parking the head before it hits the ground. From what I understand the Powerbook uses the same chip on the i2c bus instead of ISA.
I think its one of these chips:
http://www.analog.com/en/subCat/0%2C2879%2C764%25255F800%25255F0%25255F%25255F0%25255F%2C00.html
Quoted 2 lines
Hi Jim,
Thanks, yes that looks like the chip.
Yani
Hi Yani,
Quoted 4 lines
Actually I'm here at the Ottawa Linux Symposium with him :-), he is a bit busy though as usual so I haven't asked him. You should be here! :) There are no
lm_sensorspeople here which is a shame because its so nice to put a face to a name, and to talk in person for a change.
I'm sorry, I would have come but had to give up due to the overall price. Next year maybe. I'm more likely to go to European meetings, I went to Sucon in 2004 and Guadec this year.
Quoted 3 lines
Basically though with hdaps we have two
temperature sensors temp0, temp1, two acceleration sensors (x_accel,y_accel- maybe standardize toaccel_0,accel_1?)
I would say accel0 and accel1 if we stick to the current scheme.
Quoted 1 line
There is also a keyboard/mouse activity sensor (
km_activity).
Doesn't sound like something we want to export to hwmon, right? What is the intended use?
Quoted 8 lines
Quoted 4 lines
I think I can imagine whan an acceleration sensor is about. Not too sure what "variations" would be though. What unit are these variations expressed in? Sensors are typically about measuring a current state rather than expressing variations between states.
I'm guessing that they are jerk (change in acceleration, or m/s^3), but I'm not sure. I wouldn't normally expect such a thing to be implemented by the chip, but instead monitored by a driver.
Question is, what would be the use of such sysfs files? Sensor files are intended for periodic polling. This makes sense for supposedly continous measurements like voltages or temperatures. I don't quite see how polling for acceleration values would be useful, let alone jerk.
A driver for such a device would be more useful if it could send events which would then be converted into actions such as "hdparm -Y". If you go polling for accelerations, it'll certainly be too late by the time you get the information.
Quoted 1 line
I'm going to try to fix my thinkpad now :-),
Good luck.
Signature · 1 line
Jean Delvare
Quoted 6 lines
Quoted 2 lines
:) There are no
lm_sensorspeople here which is a shame because its so nice to put a face to a name, and to talk in person for a change.I'm sorry, I would have come but had to give up due to the overall price. Next year maybe. I'm more likely to go to European meetings, I went to Sucon in 2004 and Guadec this year.
I live in Toronto, so I have no excuse :) but yes, its expensive especially from Europe, although there are a surprising number of people here from outside North America. Actually I think Mark might be here - I'm not sure though.
Quoted 4 lines
Quoted 1 line
There is also a keyboard/mouse activity sensor (
km_activity).Doesn't sound like something we want to export to hwmon, right? What is the intended use?
I think the basic premise is there won't be much keyboard/mouse activity if the thinkpad is in free fall ;-). If the userspace driver is implemented on top of the hwmon interface it might be needed...
Quoted 9 lines
Question is, what would be the use of such sysfs files? Sensor files are intended for periodic polling. This makes sense for supposedly continous measurements like voltages or temperatures. I don't quite see how polling for acceleration values would be useful, let alone jerk.
A driver for such a device would be more useful if it could send events which would then be converted into actions such as "hdparm -Y". If you go polling for accelerations, it'll certainly be too late by the time you get the information.
From what I understand the hdaps people (talking to one of them here) plan to implement the actual hard drive monitor in userspace and seem to think the userspace associated delays would not be prohibitive. At the moment the driver uses a strange (IMHO) device interface and identifies itself as a misc platform device, however I think that if it were go into the mainstream kernel a sysfs/hwmon interface, and identifying it as a sensor driver would be much more suitable. Since there are potentially other similair drivers out there its even more imperative.
Yani