I2C W83792D driver 1/3
PATCH 1/1 I2C W83792D driver 1/3
Hello,
I would like to announce support for W83792D chip. This driver was developed by Winbond Electronics Corp. I added sysfs attributes callbacks infrastructure plus various code fixes and codingstyle cleanups. I would like to thank Winbond for supporting free software.
This patch is against 2.6.13rc3 plus hwmon-class and hwmon-split. Separate patch for documantation and hwmon class register will follow.
Please apply.
Regards
Rudolf
drivers/hwmon/Kconfig +10 -0
@@ -377,6 +377,16 @@ This driver can also be built as a module. If so, the module will be called w83781d. +config SENSORS_W83792D + tristate "Winbond W83792D" + depends on HWMON && I2C && EXPERIMENTAL + select I2C_SENSOR + help + If you say yes here you get support for the Winbond W83792D chip. + + This driver can also be built as a module. If so, the module + will be called w83792d. + config SENSORS_W83L785TS tristate "Winbond W83L785TS-S" depends on HWMON && I2C && EXPERIMENTAL
drivers/hwmon/Makefile +1 -0
@@ -7,6 +7,7 @@ # asb100, then w83781d go first, as they can override other drivers' addresses. obj-$(CONFIG_SENSORS_ASB100) += asb100.o obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o +obj-$(CONFIG_SENSORS_W83792D) += w83792d.o obj-$(CONFIG_SENSORS_W83781D) += w83781d.o obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o
drivers/hwmon/w83792d.c +1397 -0
1,397 lines not on this page · raw message
PATCH 1/1 I2C W83792D driver 1/3
Hi Rudolf,
drivers/hwmon/w83792d.c line 48
Quoted 2 lines
drivers/hwmon/w83792d.c +2
-0+/* Addresses to scan */ +static unsigned short normal_i2c[] = {0x2c ,0x2f ,I2C_CLIENT_END };
I suspect that addresses 0x2d and 0x2e are also possible and missing from this list.
Also, it seems to me that the end of the patch file is missing?
Thanks,
--
Jean Delvare
PATCH 1/1 I2C W83792D driver 1/3
In reply to [email protected]Hi all,
Uff my bad I did not check this. On the other hand the address can be changed to virtually any address via CR48, with condition that two lowest bits cant be changed.
CR48:
Serial Bus Address <7:1> for general index registers. The address bit 0 and bit 1 are trapped by the pin 10 and pin 11, respectively.
Should we go for range 0x20 - 0x2f ?
So like this?
/* 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 };Quoted 1 line
Also, it seems to me that the end of the patch file is missing?
My bad again. I messed with CC people so I bounced the mail to list and to CC. I belive Greg has good one. But I guess I must resend anyway.
Thanks
regards
Rudolf
PATCH 1/1 I2C W83792D driver 1/3
In reply to [email protected]Hi Rduolf,
Quoted 3 lines · Rudolf Marek
Uff my bad I did not check this. On the other hand the address can be changed to virtually any address via CR48, with condition that two lowest bits cant be changed.
I think the two lowest bits can be changed. Their initial value is set at power-up time depending on two pin levels, just like is the case for subclients, but I do believe this can be changed afterwards, just like is the case for subclients too. Not that it really matters...
Quoted 1 line
Should we go for range
0x20-0x2f?
No. That's what we did for it87, result is that since the driver was written, only default address 0x2d was seen. I can't think of any reason why someone would use a different address than the four possible power-up default ones, especially since this chip has no other interface IIRC, so the power-up address would have to be used at least once to change the address at CR48. If the power-up address works to do that, there is no reason not to use it afterwards as well.
So please stick to 0x2c - 0x2f. If anyone ever needs more, that's exactly what the probe parameter is for (but I'm quite certain it will never happen).
Thanks,
--
Jean Delvare