summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnda-Maria Nicolae <anda-maria.nicolae@intel.com>2015-03-05 13:23:57 +0200
committerSebastian Reichel <sre@kernel.org>2015-03-07 19:36:29 +0100
commit0e1392d9df3dca4c1774a0c61fd85fce81cb88cd (patch)
tree8b357b72f04f224e5845fd62e3a64fc6d321b2ca
parent42d0631bb6c9bd730437cca19e5b870ecd24215d (diff)
downloadop-kernel-dev-0e1392d9df3dca4c1774a0c61fd85fce81cb88cd.zip
op-kernel-dev-0e1392d9df3dca4c1774a0c61fd85fce81cb88cd.tar.gz
bq2415x_charger: Add support for bq24157s
This patch adds bq24157s charger in the list of supported chargers. bq24157s is similar to bq24158, except for Bit6 from Special Charger Voltage/Enable Pin Status register, but this register is currently not used by bq2415x_charger. Signed-off-by: Anda-Maria Nicolae <anda-maria.nicolae@intel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
-rw-r--r--drivers/power/bq2415x_charger.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/power/bq2415x_charger.c b/drivers/power/bq2415x_charger.c
index 4976c1b..2333d7f 100644
--- a/drivers/power/bq2415x_charger.c
+++ b/drivers/power/bq2415x_charger.c
@@ -20,6 +20,8 @@
* http://www.ti.com/product/bq24153
* http://www.ti.com/product/bq24153a
* http://www.ti.com/product/bq24155
+ * http://www.ti.com/product/bq24157s
+ * http://www.ti.com/product/bq24158
*/
#include <linux/kernel.h>
@@ -141,6 +143,7 @@ enum bq2415x_chip {
BQ24155,
BQ24156,
BQ24156A,
+ BQ24157S,
BQ24158,
};
@@ -156,6 +159,7 @@ static char *bq2415x_chip_name[] = {
"bq24155",
"bq24156",
"bq24156a",
+ "bq24157s",
"bq24158",
};
@@ -442,6 +446,8 @@ static enum bq2415x_chip bq2415x_detect_chip(struct bq2415x_device *bq)
return bq->chip;
return BQ24156;
case 2:
+ if (bq->chip == BQ24157S)
+ return bq->chip;
return BQ24158;
default:
return BQUNKNOWN;
@@ -474,6 +480,7 @@ static int bq2415x_detect_revision(struct bq2415x_device *bq)
case BQ24153A:
case BQ24156:
case BQ24156A:
+ case BQ24157S:
case BQ24158:
if (ret == 3)
return 0;
@@ -1717,6 +1724,7 @@ static const struct i2c_device_id bq2415x_i2c_id_table[] = {
{ "bq24155", BQ24155 },
{ "bq24156", BQ24156 },
{ "bq24156a", BQ24156A },
+ { "bq24157s", BQ24157S },
{ "bq24158", BQ24158 },
{},
};
OpenPOWER on IntegriCloud