hwmon: support TI TMP121/TMP123 with LM70
Subsystems (3)
PATCH 1/1 hwmon: support TI TMP121/TMP123 with LM70
The Texas Instruments TMP121 is a SPI temperature sensor very similar to the LM70, with slightly higher resolution. This patch extends the LM70 driver to support the TMP121. Chip type is determined by platform data.
Signed-off-by Manuel Lauss <[email protected]>
--- Documentation/hwmon/lm70 | 7 +++++- drivers/hwmon/Kconfig | 5 ++- drivers/hwmon/lm70.c | 56 ++++++++++++++++++++++++++++++++++++++++----- include/linux/spi/lm70.h | 15 ++++++++++++ 4 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 include/linux/spi/lm70.h
Documentation/hwmon/lm70 +6 -1
@@ -1,9 +1,11 @@ Kernel driver lm70 ========= -Supported chip: +Supported chips: * National Semiconductor LM70 Datasheet: http://www.national.com/pf/LM/LM70.html + * Texas Instruments TMP121/TMP123 + Datasheet: http://www.ti.com/lit/gpn/tmp121 Author: Kaiwan N Billimoria <[email protected]>
@@ -25,6 +27,9 @@ complement digital temperature (sent via the SIO line), is available in the driver for interpretation. This driver makes use of the kernel's in-core SPI support. +The TMP121 is very similar; main differences are 4 wire SPI interface, +and 13bit temperature data (0.0625 celsius resolution). + Thanks to --------- Jean Delvare <[email protected]> for mentoring the hwmon-side driver
drivers/hwmon/Kconfig +3 -2
@@ -407,11 +407,12 @@ config SENSORS_LM63 will be called lm63. config SENSORS_LM70 - tristate "National Semiconductor LM70" + tristate "National Semiconductor LM70 / Texas Instruments TMP121" depends on SPI_MASTER && EXPERIMENTAL help If you say yes here you get support for the National Semiconductor - LM70 digital temperature sensor chip. + LM70 and Texas Instruments TMP121/TMP123 digital temperature + sensor chips. This driver can also be built as a module. If so, the module will be called lm70.
drivers/hwmon/lm70.c +49 -7
104 lines not on this page · raw message
include/linux/spi/lm70.h new file +15 -0
@@ -0,0 +1,15 @@ +/* +* LM70 platform data +*/ + +#ifndef _LM70_H_ +#define _LM70_H_ + +#define LM70_CHIP_LM70 0 +#define LM70_CHIP_TMP121 1 + +struct lm70_platform_data { +unsigned int chip; +}; + +#endif
Signature · 7 lines
1.6.0.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors