power: supply: bq24190_charger: add support for bq24196 variant
authorHeiko Stuebner <heiko.stuebner@bq.com>
Tue, 13 Nov 2018 12:47:53 +0000 (13:47 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 5 Dec 2018 21:57:56 +0000 (22:57 +0100)
The bq24196 is another variant of the bq24190 charger ic.
Its register set is identical to the bq24192 and it even reuses
the same part number (0x5).

Signed-off-by: Heiko Stuebner <heiko.stuebner@bq.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/devicetree/bindings/power/supply/bq24190.txt
drivers/power/supply/bq24190_charger.c

index c8ac028..ffe2be4 100644 (file)
@@ -5,6 +5,7 @@ Required properties:
     * "ti,bq24190"
     * "ti,bq24192"
     * "ti,bq24192i"
+    * "ti,bq24196"
 - reg: integer, I2C address of the charger.
 - interrupts[-extended]: configuration for charger INT pin.
 
index 4e64e6a..effa7c3 100644 (file)
 #define BQ24190_REG_VPRS_PN_MASK               (BIT(5) | BIT(4) | BIT(3))
 #define BQ24190_REG_VPRS_PN_SHIFT              3
 #define BQ24190_REG_VPRS_PN_24190                      0x4
-#define BQ24190_REG_VPRS_PN_24192                      0x5 /* Also 24193 */
+#define BQ24190_REG_VPRS_PN_24192                      0x5 /* Also 24193, 24196 */
 #define BQ24190_REG_VPRS_PN_24192I                     0x3
 #define BQ24190_REG_VPRS_TS_PROFILE_MASK       BIT(2)
 #define BQ24190_REG_VPRS_TS_PROFILE_SHIFT      2
@@ -1973,6 +1973,7 @@ static const struct i2c_device_id bq24190_i2c_ids[] = {
        { "bq24190" },
        { "bq24192" },
        { "bq24192i" },
+       { "bq24196" },
        { },
 };
 MODULE_DEVICE_TABLE(i2c, bq24190_i2c_ids);
@@ -1982,6 +1983,7 @@ static const struct of_device_id bq24190_of_match[] = {
        { .compatible = "ti,bq24190", },
        { .compatible = "ti,bq24192", },
        { .compatible = "ti,bq24192i", },
+       { .compatible = "ti,bq24196", },
        { },
 };
 MODULE_DEVICE_TABLE(of, bq24190_of_match);