Browse Source

hwmon: (ina2xx) Add ina231 compatible string

Add support for "ina231" as compatible string, and update
Documentation and Kconfig accordingly.

Tested with the Exynos5422-based odroid-xu3 board which has on-board
INA231 sensors.

Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Kevin Hilman 10 years ago
parent
commit
add513be1c
3 changed files with 12 additions and 4 deletions
  1. 9 2
      Documentation/hwmon/ina2xx
  2. 2 2
      drivers/hwmon/Kconfig
  3. 1 0
      drivers/hwmon/ina2xx.c

+ 9 - 2
Documentation/hwmon/ina2xx

@@ -26,6 +26,12 @@ Supported chips:
     Datasheet: Publicly available at the Texas Instruments website
     Datasheet: Publicly available at the Texas Instruments website
                http://www.ti.com/
                http://www.ti.com/
 
 
+  * Texas Instruments INA231
+    Prefix: 'ina231'
+    Addresses: I2C 0x40 - 0x4f
+    Datasheet: Publicly available at the Texas Instruments website
+               http://www.ti.com/
+
 Author: Lothar Felten <l-felten@ti.com>
 Author: Lothar Felten <l-felten@ti.com>
 
 
 Description
 Description
@@ -41,8 +47,9 @@ interface. The INA220 monitors both shunt drop and supply voltage.
 The INA226 is a current shunt and power monitor with an I2C interface.
 The INA226 is a current shunt and power monitor with an I2C interface.
 The INA226 monitors both a shunt voltage drop and bus supply voltage.
 The INA226 monitors both a shunt voltage drop and bus supply voltage.
 
 
-The INA230 is a high or low side current shunt and power monitor with an I2C
-interface. The INA230 monitors both a shunt voltage drop and bus supply voltage.
+INA230 and INA231 are high or low side current shunt and power monitors
+with an I2C interface. The chips monitor both a shunt voltage drop and
+bus supply voltage.
 
 
 The shunt value in micro-ohms can be set via platform data or device tree at
 The shunt value in micro-ohms can be set via platform data or device tree at
 compile-time or via the shunt_resistor attribute in sysfs at run-time. Please
 compile-time or via the shunt_resistor attribute in sysfs at run-time. Please

+ 2 - 2
drivers/hwmon/Kconfig

@@ -1430,8 +1430,8 @@ config SENSORS_INA2XX
 	tristate "Texas Instruments INA219 and compatibles"
 	tristate "Texas Instruments INA219 and compatibles"
 	depends on I2C
 	depends on I2C
 	help
 	help
-	  If you say yes here you get support for INA219, INA220, INA226, and
-	  INA230 power monitor chips.
+	  If you say yes here you get support for INA219, INA220, INA226,
+	  INA230, and INA231 power monitor chips.
 
 
 	  The INA2xx driver is configured for the default configuration of
 	  The INA2xx driver is configured for the default configuration of
 	  the part as described in the datasheet.
 	  the part as described in the datasheet.

+ 1 - 0
drivers/hwmon/ina2xx.c

@@ -538,6 +538,7 @@ static const struct i2c_device_id ina2xx_id[] = {
 	{ "ina220", ina219 },
 	{ "ina220", ina219 },
 	{ "ina226", ina226 },
 	{ "ina226", ina226 },
 	{ "ina230", ina226 },
 	{ "ina230", ina226 },
+	{ "ina231", ina226 },
 	{ }
 	{ }
 };
 };
 MODULE_DEVICE_TABLE(i2c, ina2xx_id);
 MODULE_DEVICE_TABLE(i2c, ina2xx_id);