diff options
author | R.Marek@sh.cvut.cz <R.Marek@sh.cvut.cz> | 2005-07-27 07:43:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-09-05 12:14:13 -0400 |
commit | 5563e27d3a42667734e81c1cb8ad72bff76321f6 (patch) | |
tree | c04676ff2cd3730efeb1a5b3dda2d9df9b1c1279 /include | |
parent | 570aefc361d3315ec6749f573009286106b0b2d8 (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hwmon-sysfs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index 1b5018a965f..7eb4004b360 100644 --- a/include/linux/hwmon-sysfs.h +++ b/include/linux/hwmon-sysfs.h | |||
@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_dev_attr_##_name = { \ | |||
33 | .index = _index, \ | 33 | .index = _index, \ |
34 | } | 34 | } |
35 | 35 | ||
36 | struct sensor_device_attribute_2 { | ||
37 | struct device_attribute dev_attr; | ||
38 | u8 index; | ||
39 | u8 nr; | ||
40 | }; | ||
41 | #define to_sensor_dev_attr_2(_dev_attr) \ | ||
42 | container_of(_dev_attr, struct sensor_device_attribute_2, dev_attr) | ||
43 | |||
44 | #define SENSOR_DEVICE_ATTR_2(_name,_mode,_show,_store,_nr,_index) \ | ||
45 | struct sensor_device_attribute_2 sensor_dev_attr_##_name = { \ | ||
46 | .dev_attr = __ATTR(_name,_mode,_show,_store), \ | ||
47 | .index = _index, \ | ||
48 | .nr = _nr, \ | ||
49 | } | ||
50 | |||
36 | #endif /* _LINUX_HWMON_SYSFS_H */ | 51 | #endif /* _LINUX_HWMON_SYSFS_H */ |