diff mbox series

[2/2] power: supply: max17042_battery: Add support for MAX77849 Fuel-Gauge

Message ID 20210727170345.115004-2-nikita@trvn.ru
State Accepted
Commit 4415e4cea4e6db863829914a48b68b7797db2f59
Headers show
Series [1/2] dt-bindings: power: supply: max17042: Document max77849-battery | expand

Commit Message

Nikita Travkin July 27, 2021, 5:03 p.m. UTC
MAX77849 is a combined fuel-gauge, charger and MUIC IC. Notably,
fuel-gauge has dedicated i2c lines and seems to be fully compatible
with max17047. Add new compatible for it reusing max17047 code paths.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---
 drivers/power/supply/max17042_battery.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sebastian Reichel Aug. 6, 2021, 9:25 p.m. UTC | #1
Hi,

On Tue, Jul 27, 2021 at 10:03:45PM +0500, Nikita Travkin wrote:
> MAX77849 is a combined fuel-gauge, charger and MUIC IC. Notably,

> fuel-gauge has dedicated i2c lines and seems to be fully compatible

> with max17047. Add new compatible for it reusing max17047 code paths.

> 

> Signed-off-by: Nikita Travkin <nikita@trvn.ru>

> ---


Thanks, queued.

-- Sebastian

>  drivers/power/supply/max17042_battery.c | 2 ++

>  1 file changed, 2 insertions(+)

> 

> diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c

> index ce2041b30a06..f28c90ea41b4 100644

> --- a/drivers/power/supply/max17042_battery.c

> +++ b/drivers/power/supply/max17042_battery.c

> @@ -1196,6 +1196,7 @@ static const struct of_device_id max17042_dt_match[] = {

>  	{ .compatible = "maxim,max17047" },

>  	{ .compatible = "maxim,max17050" },

>  	{ .compatible = "maxim,max17055" },

> +	{ .compatible = "maxim,max77849-battery" },

>  	{ },

>  };

>  MODULE_DEVICE_TABLE(of, max17042_dt_match);

> @@ -1206,6 +1207,7 @@ static const struct i2c_device_id max17042_id[] = {

>  	{ "max17047", MAXIM_DEVICE_TYPE_MAX17047 },

>  	{ "max17050", MAXIM_DEVICE_TYPE_MAX17050 },

>  	{ "max17055", MAXIM_DEVICE_TYPE_MAX17055 },

> +	{ "max77849-battery", MAXIM_DEVICE_TYPE_MAX17047 },

>  	{ }

>  };

>  MODULE_DEVICE_TABLE(i2c, max17042_id);

> -- 

> 2.30.2

>
diff mbox series

Patch

diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index ce2041b30a06..f28c90ea41b4 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -1196,6 +1196,7 @@  static const struct of_device_id max17042_dt_match[] = {
 	{ .compatible = "maxim,max17047" },
 	{ .compatible = "maxim,max17050" },
 	{ .compatible = "maxim,max17055" },
+	{ .compatible = "maxim,max77849-battery" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, max17042_dt_match);
@@ -1206,6 +1207,7 @@  static const struct i2c_device_id max17042_id[] = {
 	{ "max17047", MAXIM_DEVICE_TYPE_MAX17047 },
 	{ "max17050", MAXIM_DEVICE_TYPE_MAX17050 },
 	{ "max17055", MAXIM_DEVICE_TYPE_MAX17055 },
+	{ "max77849-battery", MAXIM_DEVICE_TYPE_MAX17047 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, max17042_id);