hwmon/lm78 and w83781d: Probe fewer I2C
Subsystems (3)
PATCH 1/1 hwmon/lm78 and w83781d: Probe fewer I2C
We've never seen any device supported by the lm78 or w83781d driver at addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost time, and have potential for confusing or misdetecting other I2C devices.
--- Documentation/hwmon/lm78 | 4 ++-- Documentation/hwmon/w83781d | 6 +++--- drivers/hwmon/lm78.c | 6 ++---- drivers/hwmon/w83781d.c | 7 +++---- 4 files changed, 10 insertions(+), 13 deletions(-)
drivers/hwmon/w83781d.c +3 -4
@@ -54,9 +54,8 @@static struct platform_device *pdev;/* Addresses to scan */ -static unsigned short normal_i2c[] = {0x20 ,0x21 ,0x22 ,0x23 ,0x24 ,0x25 , -0x26 ,0x27 ,0x28 ,0x29 ,0x2a ,0x2b , -0x2c ,0x2d ,0x2e ,0x2f ,I2C_CLIENT_END }; +static unsigned short normal_i2c[] = {0x28 ,0x29 ,0x2a ,0x2b ,0x2c ,0x2d , +0x2e ,0x2f ,I2C_CLIENT_END };static unsigned short isa_address =0x290 ;/* Insmod parameters */
@@ -1113,7 +1112,7 @@ w83781d_detect(struct i2c_adapter *adapt kind = w83783s; else if (val1 = 0x21 && vendid = winbond) kind = w83627hf; - else if (val1 = 0x31 && address >= 0x28) + else if (val1 = 0x31) kind = as99127f; else {if (kind =0 )
drivers/hwmon/lm78.c +2 -4
@@ -37,10 +37,8 @@static struct platform_device *pdev;/* Addresses to scan */ -static unsigned short normal_i2c[] = {0x20 ,0x21 ,0x22 ,0x23 ,0x24 , -0x25 ,0x26 ,0x27 ,0x28 ,0x29 , -0x2a ,0x2b ,0x2c ,0x2d ,0x2e , -0x2f ,I2C_CLIENT_END }; +static unsigned short normal_i2c[] = {0x28 ,0x29 ,0x2a ,0x2b ,0x2c ,0x2d , +0x2e ,0x2f ,I2C_CLIENT_END };static unsigned short isa_address =0x290 ;/* Insmod parameters */
Documentation/hwmon/lm78 +2 -2
@@ -4,12 +4,12 @@ Kernel driver lm78 Supported chips: * National Semiconductor LM78 / LM78-J Prefix: 'lm78' - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) + Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) Datasheet: Publicly available at the National Semiconductor website http://www.national.com/ * National Semiconductor LM79 Prefix: 'lm79' - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) + Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) Datasheet: Publicly available at the National Semiconductor website http://www.national.com/
Documentation/hwmon/w83781d +3 -3
@@ -4,11 +4,11 @@ Kernel driver w83781d Supported chips: * Winbond W83781D Prefix: 'w83781d' - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) + Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf * Winbond W83782D Prefix: 'w83782d' - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) + Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf * Winbond W83783S Prefix: 'w83783s'
@@ -16,7 +16,7 @@ Supported chips: Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf * Winbond W83627HF Prefix: 'w83627hf' - Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) + Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports) Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf * Asus AS99127F Prefix: 'as99127f'
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] hwmon/lm78 and w83781d: Probe fewer
Quoted 4 lines · Jean Delvare
We've never seen any device supported by the lm78 or w83781d driver at addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost time, and have potential for confusing or misdetecting other I2C devices.
If the addresses are _theoretically_ possible (as per datasheet) wouldn't it be good to have an option to override this? Something like scanall=1 or similar? Or maybe that option already exists?
Uwe.
Signature · 2 lines
http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Uwe,
Quoted 8 lines · Uwe Hermann
Quoted 4 lines · Jean Delvare
We've never seen any device supported by the lm78 or w83781d driver at addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost time, and have potential for confusing or misdetecting other I2C devices.
If the addresses are _theoretically_ possible (as per datasheet) wouldn't it be good to have an option to override this?
Virtually _all_ addresses are possible, as the I2C address can be changed just by writing the new address to a register. So we don't want to probe all possible addresses.
Quoted 1 line
Something like scanall=1 or similar? Or maybe that option already exists?
We already have the "probe" parameter, through which a user can ask the driver to probe additional arbitrary addresses.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Jean:
Quoted 5 lines · Jean Delvare
We've never seen any device supported by the lm78 or w83781d driver at addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost time, and have potential for confusing or misdetecting other I2C devices.
Quoted 7 lines
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm78 | 4 ++-- Documentation/hwmon/w83781d | 6 +++--- drivers/hwmon/lm78.c | 6 ++---- drivers/hwmon/w83781d.c | 7 +++---- 4 files changed, 10 insertions(+), 13 deletions(-)
This patch has high "regression potential". I'll take it, but not for 2.6.24.
Also: please modify sensors-detect so that it includes the (now necessary) options to get the driver loaded, in case the above hardware is found at one of these addresses.
Applied to hwmon-2.6.git/testing, thanks.
Signature · 8 lines
Mark M. Hoffman [email protected] _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Hi Mark,
Quoted 14 lines · Mark M. Hoffman
Quoted 5 lines · Jean Delvare
We've never seen any device supported by the lm78 or w83781d driver at addresses 0x20-0x27, so let's stop probing these addresses. Extra probes cost time, and have potential for confusing or misdetecting other I2C devices.
Quoted 7 lines
Signed-off-by Jean Delvare <[email protected]>--- Documentation/hwmon/lm78 | 4 ++-- Documentation/hwmon/w83781d | 6 +++--- drivers/hwmon/lm78.c | 6 ++---- drivers/hwmon/w83781d.c | 7 +++---- 4 files changed, 10 insertions(+), 13 deletions(-)
Quoted 1 line
This patch has high "regression potential". I'll take it, but not for 2.6.24.
Of course, I never meant to get this in 2.6.24 that late in the game.
Quoted 3 lines
Also: please modify sensors-detect so that it includes the (now necessary) options to get the driver loaded, in case the above hardware is found at one of these addresses.
I don't think this makes sense. This would mean adding specific code to sensors-detect to handle this case, while the reason why I sent the patch in the first place is that I am fairly certain that the extra addresses are never used in practice and I wanted to simplify things.
So I'd rather leave sensors-detect as it is now. If I am wrong, it will detect one of the affected chips at an address no longer supported by the driver, and the user will (hopefully) complain, so that we are aware of the regression.
Alternatively, I could reduce the probe lists in sensors-detect the same way I did in the drivers. This would bring back some consistency, and save 8 probes (addresses 0x20 to 0x27 are probed only for these devices). This might even solve some problems people have reported with sensors-detect, as there are non-sensors chip living at these addresses (I/O expanders and video chips) which may not like being probed.
For what it's worth, since I joined the lm-sensors mailing list in July 2002, we did not have a single report of any hardware monitoring chip in this address range. So the second option has my favors.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors