I2C W83792D driver 1/3 - take2
PATCH 1/1 I2C W83792D driver 1/3 - take2
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.
Signed-off-by Rudolf Marek <[email protected]>
Signed-off-by Chunhao Huang <[email protected]>
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 +1632 -0
1,632 lines not on this page · raw message
include/linux/hwmon-sysfs.h +15 -0
@@ -33,4 +33,19 @@ .index = _index, \ } +struct sensor_device_attribute_2 { +struct device_attribute dev_attr; +u8 index; +u8 nr; +}; +#define to_sensor_dev_attr_2 (_dev_attr) \ + container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr) + +#define SENSOR_DEVICE_ATTR_2 (_name,_mode,_show,_store,_nr,_index) \ +struct sensor_device_attribute_2 sensor_dev_attr_##_name = { \ + .dev_attr = __ATTR(_name,_mode,_show,_store), \ + .index = _index, \ + .nr = _nr, \ +} +#endif /* _LINUX_HWMON_SYSFS_H */