Skip to contentSkip to conversation

I2C: W83792D driver 1/3

PATCH New Greg KH 1 participant 1 message Sep 5, 2005 Hardware monitoring

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 I2C: W83792D driver 1/3

[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.

---
commit 5563e27d3a42667734e81c1cb8ad72bff76321f6
tree c04676ff2cd3730efeb1a5b3dda2d9df9b1c1279
parent 570aefc361d3315ec6749f573009286106b0b2d8
author [email protected] <[email protected]> Wed, 27 Jul 2005 11:43:47 +0000 committer Greg Kroah-Hartman <[email protected]> Mon, 05 Sep 2005 09:14:13 -0700

 drivers/hwmon/Kconfig       |   10 
 drivers/hwmon/Makefile      |    1 
 drivers/hwmon/w83792d.c     | 1633 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/hwmon-sysfs.h |   15 
 4 files changed, 1659 insertions(+), 0 deletions(-)
drivers/hwmon/Kconfig +10 -0
@@ -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
drivers/hwmon/Makefile +1 -0
@@ -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
drivers/hwmon/w83792d.c new file +1632 -0

1,632 lines not on this page · raw message

include/linux/hwmon-sysfs.h +15 -0
@@ -33,4 +33,19 @@ struct sensor_device_attribute sensor_de
 	.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 */