Skip to contentSkip to conversation

hwmon: Document which I2C addresses can be probed

PATCH In review Jean Delvare 2 participants 3 messages May 29, 2015 – May 31, 2015

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

PATCH 1/1 hwmon: Document which I2C addresses can be probed

Add an item to the checklist when submitting a new hwmon driver: only some I2C addresses can be probed, others should not for safety reasons.

---
 Documentation/hwmon/submitting-patches |    7 +++++++
 1 file changed, 7 insertions(+)
Documentation/hwmon/submitting-patches +7 -0
@@ -81,6 +81,13 @@ increase the chances of your change bein
 
 * Provide a detect function if and only if a chip can be detected reliably.
 
+* Only the following I2C addresses shall be probed: 0x18-0x1f, 0x28-0x2f,
+  0x48-0x4f, 0x58, 0x5c, 0x73 and 0x77. Probing other addresses is strongly
+  discouraged as it is known to cause trouble with other (non-hwmon) I2C
+  chips. If your chip can live at an address which can't be probed then the
+  device will have to be instantiated explicitly (which is always better
+  anyway.)
+
 * Avoid writing to chip registers in the detect function. If you have to write,
   only do it after you have already gathered enough data to be certain that the
   detection is going to be successful.
Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
maintainer
#1 lore raw

Hi Jean,

Quoted 13 lines · Jean Delvare

Add an item to the checklist when submitting a new hwmon driver: only some I2C addresses can be probed, others should not for safety reasons.

---
  Documentation/hwmon/submitting-patches |    7 +++++++
  1 file changed, 7 insertions(+)

Documentation/hwmon/submitting-patches increase the chances of your change bein · line 87

Quoted 7 lines
Documentation/hwmon/submitting-patches +4 -0
@@ -81,6 +81,13 @@ increase the chances of your change bein
 
  * Provide a detect function if and only if a chip can be detected reliably.
 
+* Only the following I2C addresses shall be probed: 0x18-0x1f, 0x28-0x2f,
+  0x48-0x4f, 0x58, 0x5c, 0x73 and 0x77. Probing other addresses is strongly
+  discouraged as it is known to cause trouble with other (non-hwmon) I2C
+  chips. If your chip can live at an address which can't be probed then the

lives ? After all, the chip can still be probed on its other addresses, like the tmp435.

Thanks,
Guenter

Documentation/hwmon/submitting-patches increase the chances of your change bein · line 88

Quoted 1 line
Documentation/hwmon/submitting-patches +1 -0
+  device will have to be instantiated explicitly (which is always better

or, instead of 'lives' above,
... explicitly if it uses that address ...

Thanks,
Guenter

Documentation/hwmon/submitting-patches increase the chances of your change bein · line 93

Quoted 7 lines
Documentation/hwmon/submitting-patches +2 -0
+  anyway.)
+
  * Avoid writing to chip registers in the detect function. If you have to write,
    only do it after you have already gathered enough data to be certain that the
    detection is going to be successful.

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

#2 lore raw
In reply to Jean Delvare
Quoted 19 lines · Guenter Roeck

Hi Jean,

Quoted 16 lines · Jean Delvare

Add an item to the checklist when submitting a new hwmon driver: only some I2C addresses can be probed, others should not for safety reasons.

---
  Documentation/hwmon/submitting-patches |    7 +++++++
  1 file changed, 7 insertions(+)
Documentation/hwmon/submitting-patches +0 -0
@@ -81,6 +81,13 @@ increase the chances of your change bein
 
  * Provide a detect function if and only if a chip can be detected reliably.
 
Quoted 7 lines

Documentation/hwmon/submitting-patches increase the chances of your change bein · line 87

Quoted 4 lines
Documentation/hwmon/submitting-patches +4 -0
+* Only the following I2C addresses shall be probed: 0x18-0x1f, 0x28-0x2f,
+  0x48-0x4f, 0x58, 0x5c, 0x73 and 0x77. Probing other addresses is strongly
+  discouraged as it is known to cause trouble with other (non-hwmon) I2C
+  chips. If your chip can live at an address which can't be probed then the

lives ? After all, the chip can still be probed on its other addresses, like the tmp435.

Fixed, thanks for the review.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

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