提交 5563e27d 编写于 作者: R R.Marek@sh.cvut.cz 提交者: 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: NRudolf Marek <r.marek@sh.cvut.cz>
Signed-off-by: NChunhao Huang <DZShen@Winbond.com.tw>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 570aefc3
......@@ -377,6 +377,16 @@ config SENSORS_W83781D
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
......
......@@ -7,6 +7,7 @@ obj-$(CONFIG_HWMON) += hwmon.o
# 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
......
此差异已折叠。
......@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \
.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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册