Skip to contentSkip to conversation

iio: temperature: add mcp98xx driver support

PATCH In review Matt Ranostay 3 participants 6 messages Jul 19, 2015 3 messages not in the archive

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

cover iio: temperature: add mcp98xx driver support

This changeset adds driver support for the Microchip mcp98xx series of temperature sensors.

This includes temperature reading, and rising/falling threshold events.

Matt Ranostay (2):
iio: temperature: DT binding doc for mcp98xx
iio: temperature: add support for mcp98xx sensors

 .../bindings/iio/temperature/mcp98xx.txt           |  22 +
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/mcp98xx.c                  | 588 +++++++++++++++++++++
 4 files changed, 621 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt
 create mode 100644 drivers/iio/temperature/mcp98xx.c
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH 1/2 iio: temperature: DT binding doc for mcp98xx

In reply to a message not in the archive

Document compatible string, and required DT properties for mcp98xx chipset driver

---
 .../bindings/iio/temperature/mcp98xx.txt           | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt
Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt new file +22 -0
new file mode 100644
index 0000000..7eefc2d
@@ -0,0 +1,22 @@
+* Microchip MCP98XX temperature sensor
+
+http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
+
+Required properties:
+
+  - compatible: must be "microchip,mcp98xx"
+  - reg: the I2C address of the sensor
+  - interrupt-parent: should be the phandle for the interrupt controller
+  - interrupts: the sole interrupt generated by the device
+
+  Refer to interrupt-controller/interrupts.txt for generic
+  interrupt client node bindings.
+
+Example:
+
+mcp9808@18 {
+	compatible = "microchip,mcp98xx";
+	reg = <0x18>;
+	interrupt-parent = <&gpio1>;
+	interrupts = <16 1>;
+};
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/2 iio: temperature: add support for mcp98xx sensors

In reply to a message not in the archive

Add mcp98xx driver to allow temperature reading, and setting of upper and lower alert thresholds.

---
 drivers/iio/temperature/Kconfig   |  10 +
 drivers/iio/temperature/Makefile  |   1 +
 drivers/iio/temperature/mcp98xx.c | 588 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 599 insertions(+)
 create mode 100644 drivers/iio/temperature/mcp98xx.c
drivers/iio/temperature/Kconfig +10 -0
index 21feaa4..1bab442 100644
@@ -3,6 +3,16 @@
 #
 menu "Temperature sensors"
 
+config MCP98XX
+	tristate "MPC98xx temperature sensor"
+	depends on I2C
+	help
+	  If you say yes here you get support for the Microchip 98xx series
+	  of temperature sensors.
+
+	  This driver can also be built as a module. If so, the module will
+	  be called mcp98xx.
+
 config MLX90614
 	tristate "MLX90614 contact-less infrared sensor"
 	depends on I2C
drivers/iio/temperature/Makefile +1 -0
index 40710a8..d67263d 100644
@@ -2,5 +2,6 @@
 # Makefile for industrial I/O temperature drivers
 #
 
+obj-$(CONFIG_MCP98XX) += mcp98xx.o
 obj-$(CONFIG_MLX90614) += mlx90614.o
 obj-$(CONFIG_TMP006) += tmp006.o
drivers/iio/temperature/mcp98xx.c new file +588 -0

588 lines not on this page · raw message

Signature · 1 line
1.9.1
#4 lore raw
In reply to a message not in the archive
Quoted 4 lines · Matt Ranostay

This changeset adds driver support for the Microchip mcp98xx series of temperature sensors.

This includes temperature reading, and rising/falling threshold events.

Why an IIO driver? These parts already look to be supported in hwmon by the lm75 driver. We need a pretty strong reason to contemplate having support in both subsystems...

Quoted 13 lines

Matt Ranostay (2):
iio: temperature: DT binding doc for mcp98xx
iio: temperature: add support for mcp98xx sensors

 .../bindings/iio/temperature/mcp98xx.txt           |  22 +
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/mcp98xx.c                  | 588 +++++++++++++++++++++
 4 files changed, 621 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt
 create mode 100644 drivers/iio/temperature/mcp98xx.c
#6 lore raw
In reply to a message not in the archive
Quoted 4 lines · Jonathan Cameron
Quoted 3 lines · Matt Ranostay

This changeset adds driver support for the Microchip mcp98xx series of temperature sensors.

MCP98xx is pretty a pretty far reaching claim. This could also be MCP9804 or MCP9843, which are JC42 compatible sensor chips and supported by the jc42 driver. Does the new driver claim to support those as well ?

Guenter

Quoted 18 lines
Quoted 1 line

This includes temperature reading, and rising/falling threshold events.

Why an IIO driver? These parts already look to be supported in hwmon by the lm75 driver. We need a pretty strong reason to contemplate having support in both subsystems...

Quoted 13 lines

Matt Ranostay (2):
iio: temperature: DT binding doc for mcp98xx
iio: temperature: add support for mcp98xx sensors

 .../bindings/iio/temperature/mcp98xx.txt           |  22 +
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/mcp98xx.c                  | 588 +++++++++++++++++++++
 4 files changed, 621 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt
 create mode 100644 drivers/iio/temperature/mcp98xx.c
#8 lore raw
In reply to a message not in the archive
Quoted 9 lines · Guenter Roeck
Quoted 4 lines · Jonathan Cameron
Quoted 3 lines · Matt Ranostay

This changeset adds driver support for the Microchip mcp98xx series of temperature sensors.

MCP98xx is pretty a pretty far reaching claim. This could also be MCP9804 or MCP9843, which are JC42 compatible sensor chips and supported by the jc42 driver. Does the new driver claim to support those as well ?

Indeed. Generic driver names are almost always a bad idea!

Quoted 26 lines

Guenter

Quoted 18 lines
Quoted 1 line

This includes temperature reading, and rising/falling threshold events.

Why an IIO driver? These parts already look to be supported in hwmon by the lm75 driver. We need a pretty strong reason to contemplate having support in both subsystems...

Quoted 13 lines

Matt Ranostay (2):
iio: temperature: DT binding doc for mcp98xx
iio: temperature: add support for mcp98xx sensors

 .../bindings/iio/temperature/mcp98xx.txt           |  22 +
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/mcp98xx.c                  | 588 +++++++++++++++++++++
 4 files changed, 621 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/mcp98xx.txt
 create mode 100644 drivers/iio/temperature/mcp98xx.c

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html