Skip to contentSkip to conversation

iio:temperature: Add support for TI TMP007 sensor

PATCH In review Manivannan Sadhasivam 3 participants 3 messages Jan 9, 2017 – Jan 14, 2017 1 message not in the archive

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

PATCH v4 1/1 iio:temperature: Add support for TI TMP007 sensor

This patch adds support for TI TMP007 - 16 bit IR thermopile sensor with integrated Math engine.
Sensor takes care of calculating the object temperature with the help of calibrated constants stored in non-volatile memory, thereby reducing the calculation overhead.

---

Changes since v3:

1. Removed caching of status register
2. Modified comments for data validity
3. Added possible address combinations in dTree bindings file

 .../devicetree/bindings/iio/temperature/tmp007.txt |  27 ++
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/tmp007.c                   | 345 +++++++++++++++++++++
 4 files changed, 383 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/tmp007.txt
 create mode 100644 drivers/iio/temperature/tmp007.c
Documentation/devicetree/bindings/iio/temperature/tmp007.txt new file +27 -0
new file mode 100644
index 0000000..3b8f41f
@@ -0,0 +1,27 @@
+* TI TMP007 - IR thermopile sensor with integrated math engine
+
+Link to datasheet: http://www.ti.com/lit/ds/symlink/tmp007.pdf
+
+Required properties:
+
+  - compatible: should be "ti,tmp007"
+  - reg: the I2C address of the sensor (changeable via ADR pins)
+		------------------------------
+		|ADR1 | ADR0 | Device Address|
+		------------------------------
+		   0      0        0x40
+		   0	  1	   0x41
+		   0	 SDA       0x42
+		   0     SCL       0x43
+		   1      0        0x44
+		   1      1        0x45
+		   1	 SDA	   0x46
+		   1     SCL       0x47
+
+Example:
+
+tmp007@40 {
+        compatible = "ti,tmp007";
+        reg = <0x40>;
+};
+
drivers/iio/temperature/Kconfig +10 -0
index c4664e5..538ce9e 100644
@@ -23,6 +23,16 @@ config TMP006
 	  This driver can also be built as a module. If so, the module will
 	  be called tmp006.
 
+config TMP007
+        tristate "TMP007 infrared thermopile sensor with Integrated Math Engine"
+        depends on I2C
+        help
+          If you say yes here you get support for the Texas Instruments
+          TMP007 infrared thermopile sensor with Integrated Math Engine.
+
+          This driver can also be built as a module. If so, the module will
+          be called tmp007.
+
 config TSYS01
 	tristate "Measurement Specialties TSYS01 temperature sensor using I2C bus connection"
 	depends on I2C
drivers/iio/temperature/Makefile +1 -0
index 02bc79d..f0cf5c5 100644
@@ -4,5 +4,6 @@
 
 obj-$(CONFIG_MLX90614) += mlx90614.o
 obj-$(CONFIG_TMP006) += tmp006.o
+obj-$(CONFIG_TMP007) += tmp007.o
 obj-$(CONFIG_TSYS01) += tsys01.o
 obj-$(CONFIG_TSYS02D) += tsys02d.o
drivers/iio/temperature/tmp007.c new file +345 -0

345 lines not on this page · raw message

Signature · 6 lines
2.7.4

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

Acked-by
#2 lore raw
Quoted 7 lines · Manivannan Sadhasivam

This patch adds support for TI TMP007 - 16 bit IR thermopile sensor with integrated Math engine.
Sensor takes care of calculating the object temperature with the help of calibrated constants stored in non-volatile memory, thereby reducing the calculation overhead.

---

Quoted 7 lines

Changes since v3:

1. Removed caching of status register
2. Modified comments for data validity
3. Added possible address combinations in dTree bindings file

 .../devicetree/bindings/iio/temperature/tmp007.txt |  27 ++

This could be documented under trivial-devices.txt, but doesn't hurt to have it here.

Quoted 6 lines
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/tmp007.c                   | 345 +++++++++++++++++++++
 4 files changed, 383 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/tmp007.txt
 create mode 100644 drivers/iio/temperature/tmp007.c
#3 lore raw
Quoted 14 lines · Rob Herring
Quoted 13 lines · Manivannan Sadhasivam

This patch adds support for TI TMP007 - 16 bit IR thermopile sensor with integrated Math engine.
Sensor takes care of calculating the object temperature with the help of calibrated constants stored in non-volatile memory, thereby reducing the calculation overhead.

---

Changes since v3:

1. Removed caching of status register
2. Modified comments for data validity
3. Added possible address combinations in dTree bindings file

Quoted 6 lines
Quoted 1 line
 .../devicetree/bindings/iio/temperature/tmp007.txt |  27 ++

This could be documented under trivial-devices.txt, but doesn't hurt to have it here.

Thanks as ever Rob - I don't say that often enough!

Anyhow, nice little driver. Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to see if they can find anything we missed.

Was a bit messy going in with some fuzz, but superficially looks fine.

Thanks,

Jonathan

Quoted 12 lines
Quoted 7 lines
 drivers/iio/temperature/Kconfig                    |  10 +
 drivers/iio/temperature/Makefile                   |   1 +
 drivers/iio/temperature/tmp007.c                   | 345 +++++++++++++++++++++
 4 files changed, 383 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/temperature/tmp007.txt
 create mode 100644 drivers/iio/temperature/tmp007.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