All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] power: max17042-battery: Modify max17042 battery driver
@ 2015-03-31 13:29 Beomho Seo
  2015-03-31 13:29 ` [PATCH 1/3] power: max17042_battery: Use reg type instead of chip type Beomho Seo
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Beomho Seo @ 2015-03-31 13:29 UTC (permalink / raw)
  To: lee.jones, galak
  Cc: linux-kernel, cw00.choi, sangbae90.lee, inki.dae, k.kozlowski,
	myungjoo.ham, jonghwa3.lee, Beomho Seo

This patch modify max17042-battery.c fuel gauge driver for use max77693 and
max77843 fuel gauge. and then, fix minor cording style issue.

This patchset is written based on recently battery git tree.

Beomho Seo (3):
  power: max17042_battery: Use reg type instead of chip type
  power: max17042_battery: Add support for max77693/843 chip
  power: max17042_battery: add missed blank

 drivers/power/Kconfig                  |    6 +--
 drivers/power/max17042_battery.c       |   65 ++++++++++++++++++++------------
 include/linux/power/max17042_battery.h |   19 +++++++++-
 3 files changed, 62 insertions(+), 28 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 2/3] power: max17042_battery: Add support for max77693/843 chip
@ 2015-03-31 13:35 a
  0 siblings, 0 replies; 11+ messages in thread
From: a @ 2015-03-31 13:35 UTC (permalink / raw)
  To: linux-pm; +Cc: Beomho Seo, Sebastian Reichel

From: Beomho Seo <beomho.seo@samsung.com>

Max77693/843 fuelgauge is similar to max17042 fuelgauge. This patch add
supports max77693/843 fuelgague use max17042_battery.c fuel gauge driver.

Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
---
 drivers/power/Kconfig                  |    6 +++---
 drivers/power/max17042_battery.c       |    8 ++++++++
 include/linux/power/max17042_battery.h |    2 ++
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 4091fb0..887f28e 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -222,7 +222,7 @@ config BATTERY_MAX17040
 	  to operate with a single lithium cell
 
 config BATTERY_MAX17042
-	tristate "Maxim MAX17042/17047/17050/8997/8966 Fuel Gauge"
+	tristate "Maxim MAX17042/17047/17050/77693/77843/8997/8966 Fuel Gauge"
 	depends on I2C
 	select REGMAP_I2C
 	help
@@ -230,8 +230,8 @@ config BATTERY_MAX17042
 	  in handheld and portable equipment. The MAX17042 is configured
 	  to operate with a single lithium cell. MAX8997 and MAX8966 are
 	  multi-function devices that include fuel gauages that are compatible
-	  with MAX17042. This driver also supports max17047/50 chips which are
-	  improved version of max17042.
+	  with MAX17042. This driver also supports max17047/50 and max77693/843
+	  chips which are improved version of max17042.
 
 config BATTERY_Z2
 	tristate "Z2 battery driver"
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 1db87fd..806ac2e 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -627,6 +627,8 @@ static int max17042_get_reg_type(struct max17042_chip *chip)
 
 	switch (chip->chip_type) {
 	case MAXIM_DEVICE_TYPE_MAX17042:
+	case MAXIM_DEVICE_TYPE_MAX77693:
+	case MAXIM_DEVICE_TYPE_MAX77843:
 		reg_type = MAXIM_REG_TYPE_MAX17042;
 		break;
 	case MAXIM_DEVICE_TYPE_MAX17047:
@@ -837,6 +839,9 @@ static const struct of_device_id max17042_dt_match[] = {
 	{ .compatible = "maxim,max17042" },
 	{ .compatible = "maxim,max17047" },
 	{ .compatible = "maxim,max17050" },
+	{ .compatible = "maxim,max77693" },
+	{ .compatible = "maxim,max77843" },
+
 	{ },
 };
 MODULE_DEVICE_TABLE(of, max17042_dt_match);
@@ -846,6 +851,9 @@ static const struct i2c_device_id max17042_id[] = {
 	{ "max17042", MAXIM_DEVICE_TYPE_MAX17042 },
 	{ "max17047", MAXIM_DEVICE_TYPE_MAX17047 },
 	{ "max17050", MAXIM_DEVICE_TYPE_MAX17050 },
+	{ "max77693", MAXIM_DEVICE_TYPE_MAX77693 },
+	{ "max77843", MAXIM_DEVICE_TYPE_MAX77843 },
+
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max17042_id);
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 8dd7b70..72de625 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -131,6 +131,8 @@ enum max170xx_chip_type {
 	MAXIM_DEVICE_TYPE_MAX17042,
 	MAXIM_DEVICE_TYPE_MAX17047,
 	MAXIM_DEVICE_TYPE_MAX17050,
+	MAXIM_DEVICE_TYPE_MAX77693,
+	MAXIM_DEVICE_TYPE_MAX77843,
 
 	MAXIM_DEVICE_TYPE_NUM
 };
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-04-01  9:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-31 13:29 [PATCH 0/3] power: max17042-battery: Modify max17042 battery driver Beomho Seo
2015-03-31 13:29 ` [PATCH 1/3] power: max17042_battery: Use reg type instead of chip type Beomho Seo
2015-04-01  8:18   ` Krzysztof Kozlowski
2015-04-01  9:00     ` Beomho Seo
2015-04-01  9:00       ` Beomho Seo
2015-03-31 13:29 ` [PATCH 2/3] power: max17042_battery: Add support for max77693/843 chip Beomho Seo
2015-04-01  8:27   ` Krzysztof Kozlowski
2015-04-01  8:35     ` Beomho Seo
2015-03-31 13:29 ` [PATCH 3/3] power: max17042_battery: add missed blank Beomho Seo
2015-04-01  8:21   ` Krzysztof Kozlowski
  -- strict thread matches above, loose matches on Subject: below --
2015-03-31 13:35 [PATCH 2/3] power: max17042_battery: Add support for max77693/843 chip a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.