Commit 49b43590 authored by Jakob Hauser's avatar Jakob Hauser Committed by Lee Jones

power: supply: rt5033_battery: Move struct rt5033_battery to battery driver

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: default avatarJakob Hauser <jahau@rocketmail.com>
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/736e1cbee257853cb3d1da6f05c184e9a053263b.1684182964.git.jahau@rocketmail.com
parent b7653853
...@@ -6,11 +6,18 @@ ...@@ -6,11 +6,18 @@
* Author: Beomho Seo <beomho.seo@samsung.com> * Author: Beomho Seo <beomho.seo@samsung.com>
*/ */
#include <linux/i2c.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/regmap.h>
#include <linux/mfd/rt5033-private.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) static int rt5033_battery_get_capacity(struct i2c_client *client)
{ {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/power_supply.h>
/* RT5033 regulator IDs */ /* RT5033 regulator IDs */
enum rt5033_regulators { enum rt5033_regulators {
...@@ -32,11 +31,4 @@ struct rt5033_dev { ...@@ -32,11 +31,4 @@ struct rt5033_dev {
bool wakeup; bool wakeup;
}; };
struct rt5033_battery {
struct i2c_client *client;
struct rt5033_dev *rt5033;
struct regmap *regmap;
struct power_supply *psy;
};
#endif /* __RT5033_H__ */ #endif /* __RT5033_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment