[RFC PATCH 2.6.12-rc2-mm2 0/2] i2c: new sysfs class "hwmon"

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

 



Hi Khali, Greg, et. al:

After a brief chat w/ Khali last week (and some reading LDDv3) I did these
patches.  The result for me looks like this:

/sys/class/hwmon/1-0290/device/ -> /sys/devices/platform/i2c-1/1-0290

Notes/Questions:

1. I don't like "1-0290" for a class ID, but it was the easiest thing to
use at the time.  A better name might be w83627thf-0.

2. The kernel complains if I don't provide a class::release function, but
I can't really see a need for it in this case.  If I hold a file open through
the /sys/class/hwmon/X/device/Y link and then try to rmmod the driver, the 
rmmod will sleep until I close the file just as I expect.  Any hints here
Greg?

3. I added the struct class_device to struct i2c_client.  This makes it
slightly easier to modify the sensors drivers... but not all i2c_clients
will need it (bloat).  It could be added to each struct <driver>_data
(e.g. w83627hf_data) instead.

4. I didn't modify all the chips, just w83627hf.c and lm78.c as examples.
(IIRC Khali experiments a lot on lm78).

Comments?

Regards,

-- 
Mark M. Hoffman
mhoffman at lightlink.com



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

  Powered by Linux