Skip to contentSkip to conversation

ltc4215/ltc4245: Discard obsolete detect methods

PATCH In review Jean Delvare 2 participants 2 messages Sep 20, 2009 – Oct 7, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ltc4215/ltc4245: Discard obsolete detect methods

There is no point in implementing a detect callback for the LTC4215 and LTC4245, as these devices can't be detected. It was there solely to handle "force" module parameters to instantiate devices, but now we have a better sysfs interface that can do the same.

So we can get rid of the ugly module parameters and the detect callbacks. This shrinks the binary module sizes by 36% and 46%, respectively.

---
Ira, can you please test and confirm it works OK for you?

 Documentation/hwmon/ltc4215 |    7 +-
 Documentation/hwmon/ltc4245 |    7 +-
 drivers/hwmon/ltc4215.c     |   47 +--------------
 drivers/hwmon/ltc4245.c     |  131 +------------------------------------------
 4 files changed, 18 insertions(+), 174 deletions(-)
Documentation/hwmon/ltc4215 +4 -3
@@ -22,12 +22,13 @@ Usage Notes
 -----------
 
 This driver does not probe for LTC4215 devices, due to the fact that some
-of the possible addresses are unfriendly to probing. You will need to use
-the "force" parameter to tell the driver where to find the device.
+of the possible addresses are unfriendly to probing. You will have to
+instantiate the devices explicitly.
 
 Example: the following will load the driver for an LTC4215 at address 0x44
 on I2C bus #0:
-$ modprobe ltc4215 force=0,0x44
+$ modprobe ltc4215
+$ echo ltc4215 0x44 > /sys/bus/i2c/devices/i2c-0/new_device
 
 
 Sysfs entries
Documentation/hwmon/ltc4245 +4 -3
@@ -23,12 +23,13 @@ Usage Notes
 -----------
 
 This driver does not probe for LTC4245 devices, due to the fact that some
-of the possible addresses are unfriendly to probing. You will need to use
-the "force" parameter to tell the driver where to find the device.
+of the possible addresses are unfriendly to probing. You will have to
+instantiate the devices explicitly.
 
 Example: the following will load the driver for an LTC4245 at address 0x23
 on I2C bus #1:
-$ modprobe ltc4245 force=1,0x23
+$ modprobe ltc4245
+$ echo ltc4245 0x23 > /sys/bus/i2c/devices/i2c-1/new_device
 
 
 Sysfs entries
drivers/hwmon/ltc4215.c +5 -42

81 lines not on this page · raw message

drivers/hwmon/ltc4245.c +5 -126

165 lines not on this page · raw message

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 5 lines · Jean Delvare

There is no point in implementing a detect callback for the LTC4215 and LTC4245, as these devices can't be detected. It was there solely to handle "force" module parameters to instantiate devices, but now we have a better sysfs interface that can do the same.

Quoted 9 lines

So we can get rid of the ugly module parameters and the detect callbacks. This shrinks the binary module sizes by 36% and 46%, respectively.

---
Ira, can you please test and confirm it works OK for you?

I've finally gotten around to testing this. I applied it to 2.6.31.2. Testing shows no problems at all. The devices are both automatically bound by the OF device tree, just like before.

You've got my ACK.

Ira

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