public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakob Hauser <jahau@rocketmail.com>
To: Sebastian Reichel <sre@kernel.org>, Lee Jones <lee@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Beomho Seo <beomho.seo@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Stephan Gerhold <stephan@gerhold.net>,
	Raymond Hackley <raymondhackley@protonmail.com>,
	Pavel Machek <pavel@ucw.cz>, Axel Lin <axel.lin@ingics.com>,
	ChiYuan Huang <cy_huang@richtek.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Henrik Grimler <henrik@grimler.se>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Jakob Hauser <jahau@rocketmail.com>
Subject: [PATCH v5 07/10] power: supply: rt5033_battery: Move struct rt5033_battery to battery driver
Date: Sun, 14 May 2023 14:31:27 +0200	[thread overview]
Message-ID: <20230514123130.41172-8-jahau@rocketmail.com> (raw)
In-Reply-To: <20230514123130.41172-1-jahau@rocketmail.com>

Move struct rt5033_battery from the mfd header into the battery driver because
it's not used by others.

Within struct rt5033_battery, remove the line "struct rt5033_dev *rt5033;"
because it doesn't get used.

In rt5033.h, remove #include <linux/power_supply.h>, it's not necessary
anymore.

In rt5033_battery.c, remove #include <linux/mfd/rt5033.h>, it's not necessary
anymore either. Instead add #include <linux/regmap.h> and

Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
---
 drivers/power/supply/rt5033_battery.c | 9 ++++++++-
 include/linux/mfd/rt5033.h            | 8 --------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c
index 5c04cf305219..91e1efd81f69 100644
--- a/drivers/power/supply/rt5033_battery.c
+++ b/drivers/power/supply/rt5033_battery.c
@@ -6,11 +6,18 @@
  * Author: Beomho Seo <beomho.seo@samsung.com>
  */
 
+#include <linux/i2c.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/power_supply.h>
+#include <linux/regmap.h>
 #include <linux/mfd/rt5033-private.h>
-#include <linux/mfd/rt5033.h>
+
+struct rt5033_battery {
+	struct i2c_client	*client;
+	struct regmap		*regmap;
+	struct power_supply	*psy;
+};
 
 static int rt5033_battery_get_capacity(struct i2c_client *client)
 {
diff --git a/include/linux/mfd/rt5033.h b/include/linux/mfd/rt5033.h
index 3992fb2ef0a8..bb3d18945d21 100644
--- a/include/linux/mfd/rt5033.h
+++ b/include/linux/mfd/rt5033.h
@@ -12,7 +12,6 @@
 #include <linux/regulator/consumer.h>
 #include <linux/i2c.h>
 #include <linux/regmap.h>
-#include <linux/power_supply.h>
 
 /* RT5033 regulator IDs */
 enum rt5033_regulators {
@@ -32,11 +31,4 @@ struct rt5033_dev {
 	bool wakeup;
 };
 
-struct rt5033_battery {
-	struct i2c_client	*client;
-	struct rt5033_dev	*rt5033;
-	struct regmap		*regmap;
-	struct power_supply	*psy;
-};
-
 #endif /* __RT5033_H__ */
-- 
2.39.2


  parent reply	other threads:[~2023-05-14 12:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230514123130.41172-1-jahau.ref@rocketmail.com>
2023-05-14 12:31 ` [PATCH v5 00/10] Add RT5033 charger device driver Jakob Hauser
2023-05-14 12:31   ` [PATCH v5 01/10] mfd: rt5033: Drop rt5033-battery sub-device Jakob Hauser
2023-05-14 12:31   ` [PATCH v5 02/10] mfd: rt5033: Fix chip revision readout Jakob Hauser
2023-05-14 12:31   ` [PATCH v5 03/10] mfd: rt5033: Fix STAT_MASK, HZ_MASK and AICR defines Jakob Hauser
2023-05-14 12:31   ` [PATCH v5 04/10] mfd: rt5033: Apply preparatory changes before adding rt5033-charger driver Jakob Hauser
2023-05-14 12:31   ` [PATCH v5 05/10] power: supply: rt5033_charger: Add RT5033 charger device driver Jakob Hauser
2023-05-14 12:54     ` Jakob Hauser
2023-05-14 14:31     ` Christophe JAILLET
2023-05-14 17:03       ` Jakob Hauser
2023-05-14 22:51         ` Sebastian Reichel
2023-05-14 12:31   ` [PATCH v5 06/10] power: supply: rt5033_charger: Add cable detection and USB OTG supply Jakob Hauser
2023-05-14 22:47     ` Sebastian Reichel
2023-05-14 12:31   ` Jakob Hauser [this message]
2023-05-14 22:47     ` [PATCH v5 07/10] power: supply: rt5033_battery: Move struct rt5033_battery to battery driver Sebastian Reichel
2023-05-14 12:31   ` [PATCH v5 08/10] power: supply: rt5033_battery: Adopt status property from charger Jakob Hauser
2023-05-14 22:48     ` Sebastian Reichel
2023-05-14 12:31   ` [PATCH v5 09/10] dt-bindings: power: supply: rt5033-battery: Add power-supplies as a property Jakob Hauser
2023-05-14 16:43     ` Krzysztof Kozlowski
2023-05-14 12:31   ` [PATCH v5 10/10] dt-bindings: Add rt5033 mfd, regulator and charger Jakob Hauser
2023-05-14 16:44     ` Krzysztof Kozlowski

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=20230514123130.41172-8-jahau@rocketmail.com \
    --to=jahau@rocketmail.com \
    --cc=axel.lin@ingics.com \
    --cc=beomho.seo@samsung.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=cy_huang@richtek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=henrik@grimler.se \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=raymondhackley@protonmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=stephan@gerhold.net \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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