* [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed
@ 2015-05-29 8:43 Jean Delvare
2015-05-29 14:46 ` Guenter Roeck
2015-05-31 20:30 ` Jean Delvare
0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2015-05-29 8:43 UTC (permalink / raw)
To: lm-sensors
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.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Guenter Roeck <linux@roeck-us.net>
---
Documentation/hwmon/submitting-patches | 7 +++++++
1 file changed, 7 insertions(+)
--- linux-4.1-rc5.orig/Documentation/hwmon/submitting-patches 2015-04-27 02:59:10.000000000 +0200
+++ linux-4.1-rc5/Documentation/hwmon/submitting-patches 2015-05-29 10:40:49.118900331 +0200
@@ -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.
--
Jean Delvare
SUSE L3 Support
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed
2015-05-29 8:43 [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed Jean Delvare
@ 2015-05-29 14:46 ` Guenter Roeck
2015-05-31 20:30 ` Jean Delvare
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2015-05-29 14:46 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
On 05/29/2015 01:43 AM, Jean Delvare wrote:
> 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.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Guenter Roeck <linux@roeck-us.net>
> ---
> Documentation/hwmon/submitting-patches | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> --- linux-4.1-rc5.orig/Documentation/hwmon/submitting-patches 2015-04-27 02:59:10.000000000 +0200
> +++ linux-4.1-rc5/Documentation/hwmon/submitting-patches 2015-05-29 10:40:49.118900331 +0200
> @@ -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
> + device will have to be instantiated explicitly (which is always better
or, instead of 'lives' above,
... explicitly if it uses that address ...
Thanks,
Guenter
> + 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
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed
2015-05-29 8:43 [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed Jean Delvare
2015-05-29 14:46 ` Guenter Roeck
@ 2015-05-31 20:30 ` Jean Delvare
1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2015-05-31 20:30 UTC (permalink / raw)
To: lm-sensors
On Fri, 29 May 2015 07:46:39 -0700, Guenter Roeck wrote:
> Hi Jean,
>
> On 05/29/2015 01:43 AM, Jean Delvare wrote:
> > 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.
> >
> > Signed-off-by: Jean Delvare <jdelvare@suse.de>
> > Cc: Guenter Roeck <linux@roeck-us.net>
> > ---
> > Documentation/hwmon/submitting-patches | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > --- linux-4.1-rc5.orig/Documentation/hwmon/submitting-patches 2015-04-27 02:59:10.000000000 +0200
> > +++ linux-4.1-rc5/Documentation/hwmon/submitting-patches 2015-05-29 10:40:49.118900331 +0200
> > @@ -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.
Fixed, thanks for the review.
--
Jean Delvare
SUSE L3 Support
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-31 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-29 8:43 [lm-sensors] [PATCH] hwmon: Document which I2C addresses can be probed Jean Delvare
2015-05-29 14:46 ` Guenter Roeck
2015-05-31 20:30 ` Jean Delvare
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.