From 5563e27d3a42667734e81c1cb8ad72bff76321f6 Mon Sep 17 00:00:00 2001 From: "R.Marek@sh.cvut.cz" Date: Wed, 27 Jul 2005 11:43:47 +0000 Subject: [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 Signed-off-by: Chunhao Huang Signed-off-by: Greg Kroah-Hartman --- include/linux/hwmon-sysfs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/linux/hwmon-sysfs.h') diff --git a/include/linux/hwmon-sysfs.h b/include/linux/hwmon-sysfs.h index 1b5018a965f5..7eb4004b3601 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 = { \ .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 */ -- cgit v1.2.3