From: Saravanan Sekar <sravanhome@gmail.com>
To: sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, jic23@kernel.org,
lars@metafoo.de, andy.shevchenko@gmail.com
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-iio@vger.kernel.org, Saravanan Sekar <sravanhome@gmail.com>
Subject: [PATCH v3 3/6] mfd: mp2629: Add support for mps mp2733 battery charger
Date: Wed, 15 Jun 2022 16:53:54 +0200 [thread overview]
Message-ID: <20220615145357.2370044-4-sravanhome@gmail.com> (raw)
In-Reply-To: <20220615145357.2370044-1-sravanhome@gmail.com>
mp2733 is updated version of mp2629 battery charge management
device for single-cell Li-ion or Li-polymer battery. Additionally
supports USB fast-charge and higher range of input voltage.
Signed-off-by: Saravanan Sekar <sravanhome@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
drivers/mfd/mp2629.c | 5 ++++-
include/linux/mfd/mp2629.h | 6 ++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/mp2629.c b/drivers/mfd/mp2629.c
index 16840ec5fd1c..f59c97e70f83 100644
--- a/drivers/mfd/mp2629.c
+++ b/drivers/mfd/mp2629.c
@@ -13,6 +13,7 @@
#include <linux/mfd/mp2629.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@@ -43,6 +44,7 @@ static int mp2629_probe(struct i2c_client *client)
return -ENOMEM;
ddata->dev = &client->dev;
+ ddata->chip_id = (uintptr_t)device_get_match_data(&client->dev);
i2c_set_clientdata(client, ddata);
ddata->regmap = devm_regmap_init_i2c(client, &mp2629_regmap_config);
@@ -60,7 +62,8 @@ static int mp2629_probe(struct i2c_client *client)
}
static const struct of_device_id mp2629_of_match[] = {
- { .compatible = "mps,mp2629"},
+ { .compatible = "mps,mp2629", .data = (void *)CHIP_ID_MP2629 },
+ { .compatible = "mps,mp2733", .data = (void *)CHIP_ID_MP2733 },
{ }
};
MODULE_DEVICE_TABLE(of, mp2629_of_match);
diff --git a/include/linux/mfd/mp2629.h b/include/linux/mfd/mp2629.h
index 89b706900b57..ee0e65720c75 100644
--- a/include/linux/mfd/mp2629.h
+++ b/include/linux/mfd/mp2629.h
@@ -9,9 +9,15 @@
#include <linux/device.h>
#include <linux/regmap.h>
+enum mp2xx_chip_id {
+ CHIP_ID_MP2629,
+ CHIP_ID_MP2733,
+};
+
struct mp2629_data {
struct device *dev;
struct regmap *regmap;
+ enum mp2xx_chip_id chip_id;
};
enum mp2629_adc_chan {
--
2.25.1
next prev parent reply other threads:[~2022-06-15 14:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 14:53 [PATCH v3 0/6] Add support for mp2733 battery charger Saravanan Sekar
2022-06-15 14:53 ` [PATCH v3 1/6] iio: adc: mp2629: fix wrong comparison of channel Saravanan Sekar
2022-06-18 16:23 ` Jonathan Cameron
2022-06-18 17:27 ` saravanan sekar
2022-06-15 14:53 ` [PATCH v3 2/6] dt-bindings: mfd: Add mp2733 compatible Saravanan Sekar
2022-06-27 14:45 ` Lee Jones
2022-07-01 21:32 ` Rob Herring
2022-07-04 8:53 ` Lee Jones
2022-06-15 14:53 ` Saravanan Sekar [this message]
2022-06-27 12:36 ` [PATCH v3 3/6] mfd: mp2629: Add support for mps mp2733 battery charger Lee Jones
2022-06-15 14:53 ` [PATCH v3 4/6] iio: adc: mp2629: restrict input voltage mask for mp2629 Saravanan Sekar
2022-06-18 16:19 ` Jonathan Cameron
2022-06-15 14:53 ` [PATCH v3 5/6] power: supply: Add support for mp2733 battery charger Saravanan Sekar
2022-09-11 13:31 ` Sebastian Reichel
2022-09-25 9:26 ` saravanan sekar
2022-10-01 21:05 ` Sebastian Reichel
2022-06-15 14:53 ` [PATCH v3 6/6] power: supply: mp2629: Add USB fast charge settings Saravanan Sekar
2022-07-21 15:50 ` [PATCH v3 0/6] Add support for mp2733 battery charger saravanan sekar
2022-07-22 8:14 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220615145357.2370044-4-sravanhome@gmail.com \
--to=sravanhome@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).