Skip to contentSkip to conversation

hwmon: (pmbus/ltc2978) Explicit driver

PATCH New Guenter Roeck 1 participant 1 message Sep 29, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 2/4 hwmon: (pmbus/ltc2978) Explicit driver

Provide explicit driver for LTC2978 to enable support for minimum and peak attributes. Remove ltc2978 chip id from generic pmbus driver.

---
v2: Voltage --> voltage
Simplified sign extensions

 Documentation/hwmon/ltc2978   |   78 +++++++++++
 Documentation/hwmon/pmbus     |    5 -
 drivers/hwmon/pmbus/Kconfig   |   12 ++-
 drivers/hwmon/pmbus/Makefile  |    1 +
 drivers/hwmon/pmbus/ltc2978.c |  295 +++++++++++++++++++++++++++++++++++++++++
 drivers/hwmon/pmbus/pmbus.c   |    1 -
 6 files changed, 385 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/hwmon/ltc2978
 create mode 100644 drivers/hwmon/pmbus/ltc2978.c
Documentation/hwmon/ltc2978 new file +77 -0
new file mode 100644
index 0000000..499129e
@@ -0,0 +1,78 @@
+Kernel driver ltc2978
+==========+
+Supported chips:
+  * Linear Technology LTC2978
+    Prefix: 'ltc2978'
+    Addresses scanned: -
+    Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
+
+Author: Guenter Roeck <[email protected]>
+
+
+Description
+-----------
+
+The LTC2978 is an octal power supply monitor, supervisor, sequencer and
+margin controller.
+
+
+Usage Notes
+-----------
+
+This driver does not probe for PMBus devices. You will have to instantiate
+devices explicitly.
+
+Example: the following commands will load the driver for an LTC2978 at address
+0x60 on I2C bus #1:
+
+# modprobe ltc2978
+# echo ltc2978 0x60 > /sys/bus/i2c/devices/i2c-1/new_device
+
+
+Sysfs attributes
+----------------
+
+in1_label		"vin"
+in1_input		Measured input voltage.
+in1_min			Minimum input voltage.
+in1_max			Maximum input voltage.
+in1_lcrit		Critical minimum input voltage.
+in1_crit		Critical maximum input voltage.
+in1_min_alarm		Input voltage low alarm.
+in1_max_alarm		Input voltage high alarm.
+in1_lcrit_alarm		Input voltage critical low alarm.
+in1_crit_alarm		Input voltage critical high alarm.
+in1_lowest		Lowest input voltage.
+in1_highest		Highest input voltage.
+in1_reset_history	Reset history. Writing into this attribute will reset
+			history for all attributes.
+
+in[2-9]_label		"vout[1-8]".
+in[2-9]_input		Measured output voltage.
+in[2-9]_min		Minimum output voltage.
+in[2-9]_max		Maximum output voltage.
+in[2-9]_lcrit		Critical minimum output voltage.
+in[2-9]_crit		Critical maximum output voltage.
+in[2-9]_min_alarm	Output voltage low alarm.
+in[2-9]_max_alarm	Output voltage high alarm.
+in[2-9]_lcrit_alarm	Output voltage critical low alarm.
+in[2-9]_crit_alarm	Output voltage critical high alarm.
+in[2-9]_lowest		Lowest output voltage.
+in[2-9]_highest		Lowest output voltage.
+in[2-9]_reset_history	Reset history. Writing into this attribute will reset
+			history for all attributes.
+
+temp1_input		Measured temperature.
+temp1_min		Mimimum temperature.
+temp1_max		Maximum temperature.
+temp1_lcrit		Critical low temperature.
+temp1_crit		Critical high temperature.
+temp1_min_alarm		Chip temperature low alarm.
+temp1_max_alarm		Chip temperature high alarm.
+temp1_lcrit_alarm	Chip temperature critical low alarm.
+temp1_crit_alarm	Chip temperature critical high alarm.
+temp1_lowest		Lowest measured temperature.
+temp1_highest		Highest measured temperature.
+temp1_reset_history	Reset history. Writing into this attribute will reset
+			history for all attributes.
Documentation/hwmon/pmbus +0 -5
index c36c1c1..ce02f5d 100644
@@ -8,11 +8,6 @@ Supported chips:
     Addresses scanned: -
     Datasheet:
  http://archive.ericsson.net/service/internet/picov/get?DocNo(701-EN/LZT146395
-  * Linear Technology LTC2978
-    Octal PMBus Power Supply Monitor and Controller
-    Prefix: 'ltc2978'
-    Addresses scanned: -
-    Datasheet: http://cds.linear.com/docs/Datasheet/2978fa.pdf
   * ON Semiconductor ADP4000, NCP4200, NCP4208
     Prefixes: 'adp4000', 'ncp4200', 'ncp4208'
     Addresses scanned: -
drivers/hwmon/pmbus/Kconfig +11 -1
index efaf340..c4dcdca 100644
@@ -20,7 +20,7 @@ config SENSORS_PMBUS
 	help
 	  If you say yes here you get hardware monitoring support for generic
 	  PMBus devices, including but not limited to ADP4000, BMR450, BMR451,
-	  BMR453, BMR454, LTC2978, NCP4200, and NCP4208.
+	  BMR453, BMR454, NCP4200, and NCP4208.
 
 	  This driver can also be built as a module. If so, the module will
 	  be called pmbus.
@@ -46,6 +46,16 @@ config SENSORS_LM25066
 	  This driver can also be built as a module. If so, the module will
 	  be called lm25066.
 
+config SENSORS_LTC2978
+	tristate "Linear Technologies LTC2978"
+	default n
+	help
+	  If you say yes here you get hardware monitoring support for Linear
+	  Technology LTC2978.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called ltc2978.
+
 config SENSORS_MAX16064
 	tristate "Maxim MAX16064"
 	default n
drivers/hwmon/pmbus/Makefile +1 -0
index b9e4fb4..789376c 100644
@@ -6,6 +6,7 @@ obj-$(CONFIG_PMBUS)		+= pmbus_core.o
 obj-$(CONFIG_SENSORS_PMBUS)	+= pmbus.o
 obj-$(CONFIG_SENSORS_ADM1275)	+= adm1275.o
 obj-$(CONFIG_SENSORS_LM25066)	+= lm25066.o
+obj-$(CONFIG_SENSORS_LTC2978)	+= ltc2978.o
 obj-$(CONFIG_SENSORS_MAX16064)	+= max16064.o
 obj-$(CONFIG_SENSORS_MAX34440)	+= max34440.o
 obj-$(CONFIG_SENSORS_MAX8688)	+= max8688.o
drivers/hwmon/pmbus/ltc2978.c new file +295 -0

295 lines not on this page · raw message

drivers/hwmon/pmbus/pmbus.c +0 -1
index 1dfba44..ef5cc1e 100644
@@ -204,7 +204,6 @@ static const struct i2c_device_id pmbus_id[] = {
 	{"bmr451", 1},
 	{"bmr453", 1},
 	{"bmr454", 1},
-	{"ltc2978", 8},
 	{"ncp4200", 1},
 	{"ncp4208", 1},
 	{"pmbus", 0},
Signature · 7 lines
1.7.3.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors