Skip to contentSkip to conversation

hwmon: Add LTC4215 driver

RFC PATCH New Ira Snyder 1 participant 1 message Jan 9, 2009

Subsystems (2)
lore
Share & tools
lore

Ira Snyder

author
#0 lore raw

RFC PATCH 1/1 hwmon: Add LTC4215 driver

Add Linux support for the Linear Technology LTC4215 Hot Swap controller I2C monitoring interface.

---

This is my first attempt at a monitoring driver for the ltc4215 chip. I based the driver on the recently-accepted ltc4245 driver. This chip is much simpler.

I have tested the driver with my board, and it appears to work fine. With the power supplies disabled, it reads 11.93V input, 1.93V output, no current and no power. With the supplies enabled, it reads 11.93V input, 11.98V output, no current, no power. I'm not drawing any current at the moment, so this is reasonable. The value in the sense register never reads anything except 0, so I expect to get zero from the current and power calculations.

I didn't attempt to support changing any of the chip's settings or enabling the FET. I'm not sure even how to do that and still fit within the hwmon framework. :)

I'd appreciate any comments you have.

Thanks,
Ira

 Documentation/hwmon/ltc4215 |   50 ++++++
 drivers/hwmon/Kconfig       |   11 ++
 drivers/hwmon/Makefile      |    1 +
 drivers/hwmon/ltc4215.c     |  364 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 426 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/hwmon/ltc4215
 create mode 100644 drivers/hwmon/ltc4215.c
Documentation/hwmon/ltc4215 new file +49 -0
new file mode 100644
index 0000000..2e6a21e
@@ -0,0 +1,50 @@
+Kernel driver ltc4215
+==========+
+Supported chips:
+  * Linear Technology LTC4215
+    Prefix: 'ltc4215'
+    Addresses scanned: 0x44
+    Datasheet:
+        http://www.linear.com/pc/downloadDocument.do?navId=H0,C1,C1003,C1006,C1163,P17572,D12697
+
+Author: Ira W. Snyder <[email protected]>
+
+
+Description
+-----------
+
+The LTC4215 controller allows a board to be safely inserted and removed
+from a live backplane.
+
+
+Usage Notes
+-----------
+
+This driver does not probe for LTC4215 devices, due to the fact that some
+of the possible addresses are unfriendly to probing. You will need to use
+the "force" parameter to tell the driver where to find the device.
+
+Example: the following will load the driver for an LTC4215 at address 0x44
+on I2C bus #0:
+$ modprobe ltc4215 force=0,0x44
+
+
+Sysfs entries
+-------------
+
+The LTC4215 has built-in limits for overvoltage, undervoltage, and
+undercurrent warnings. This makes it very likely that the reference
+circuit will be used.
+
+in1_input		input voltage
+in2_input		output voltage
+
+in1_min_alarm		input undervoltage alarm
+in1_max_alarm		input overvoltage alarm
+
+curr1_input		current
+curr1_max_alarm		overcurrent alarm
+
+power1_input		power usage
+power1_alarm		power bad alarm
drivers/hwmon/Kconfig +11 -0
index 4b33bc8..ff36c0b 100644
@@ -560,6 +560,17 @@ config SENSORS_LM93
 	  This driver can also be built as a module.  If so, the module
 	  will be called lm93.
 
+config SENSORS_LTC4215
+	tristate "Linear Technology LTC4215"
+	depends on I2C && EXPERIMENTAL
+	default n
+	help
+	  If you say yes here you get support for Linear Technology LTC4215
+	  Hot Swap Controller I2C interface.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called ltc4215.
+
 config SENSORS_LTC4245
 	tristate "Linear Technology LTC4245"
 	depends on I2C && EXPERIMENTAL
drivers/hwmon/Makefile +1 -0
index 8fd124e..e538b22 100644
@@ -62,6 +62,7 @@ obj-$(CONFIG_SENSORS_LM87)	+= lm87.o
 obj-$(CONFIG_SENSORS_LM90)	+= lm90.o
 obj-$(CONFIG_SENSORS_LM92)	+= lm92.o
 obj-$(CONFIG_SENSORS_LM93)	+= lm93.o
+obj-$(CONFIG_SENSORS_LTC4215)	+= ltc4215.o
 obj-$(CONFIG_SENSORS_LTC4245)	+= ltc4245.o
 obj-$(CONFIG_SENSORS_MAX1111)	+= max1111.o
 obj-$(CONFIG_SENSORS_MAX1619)	+= max1619.o
drivers/hwmon/ltc4215.c new file +364 -0

364 lines not on this page · raw message

Signature · 7 lines
1.5.4.3


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