[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: Rudolf Marek <r.marek@sh.cvut.cz> Signed-off-by: Chunhao Huang <DZShen@Winbond.com.tw> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
570aefc361
commit
5563e27d3a
@ -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
|
|||||||
# 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
|
||||||
|
1633
drivers/hwmon/w83792d.c
Normal file
1633
drivers/hwmon/w83792d.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -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 */
|
||||||
|
Loading…
Reference in New Issue
Block a user