Commit 5563e27d authored by R.Marek@sh.cvut.cz's avatar R.Marek@sh.cvut.cz Committed by Greg Kroah-Hartman

[PATCH] I2C: W83792D driver 1/3

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: default avatarRudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: default avatarChunhao Huang <DZShen@Winbond.com.tw>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 570aefc3
...@@ -377,6 +377,16 @@ config SENSORS_W83781D ...@@ -377,6 +377,16 @@ config SENSORS_W83781D
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called w83781d. 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 config SENSORS_W83L785TS
tristate "Winbond W83L785TS-S" tristate "Winbond W83L785TS-S"
depends on HWMON && I2C && EXPERIMENTAL depends on HWMON && I2C && EXPERIMENTAL
......
...@@ -7,6 +7,7 @@ obj-$(CONFIG_HWMON) += hwmon.o ...@@ -7,6 +7,7 @@ obj-$(CONFIG_HWMON) += hwmon.o
# asb100, then w83781d go first, as they can override other drivers' addresses. # asb100, then w83781d go first, as they can override other drivers' addresses.
obj-$(CONFIG_SENSORS_ASB100) += asb100.o obj-$(CONFIG_SENSORS_ASB100) += asb100.o
obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o obj-$(CONFIG_SENSORS_W83627HF) += w83627hf.o
obj-$(CONFIG_SENSORS_W83792D) += w83792d.o
obj-$(CONFIG_SENSORS_W83781D) += w83781d.o obj-$(CONFIG_SENSORS_W83781D) += w83781d.o
obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o obj-$(CONFIG_SENSORS_ADM1021) += adm1021.o
......
This diff is collapsed.
...@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \ ...@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \
.index = _index, \ .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 */ #endif /* _LINUX_HWMON_SYSFS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment