Commit b7653853 authored by Jakob Hauser's avatar Jakob Hauser Committed by Lee Jones

power: supply: rt5033_charger: Add RT5033 charger device driver

This patch adds device driver of Richtek RT5033 PMIC. The driver supports
switching charger. rt5033 charger provides three charging modes. The charging
modes are pre-charge mode, fast charge mode and constant voltage mode. They
vary in charge rate, the charge parameters can be controlled by i2c interface.
Tested-by: default avatarRaymond Hackley <raymondhackley@protonmail.com>
Signed-off-by: default avatarJakob Hauser <jahau@rocketmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/9556d4ebb30fd321e37aa0eb343554122e4720c9.1684182964.git.jahau@rocketmail.com
parent 3d897612
...@@ -766,6 +766,14 @@ config BATTERY_RT5033 ...@@ -766,6 +766,14 @@ config BATTERY_RT5033
The fuelgauge calculates and determines the battery state of charge The fuelgauge calculates and determines the battery state of charge
according to battery open circuit voltage. according to battery open circuit voltage.
config CHARGER_RT5033
tristate "RT5033 battery charger support"
depends on MFD_RT5033
help
This adds support for battery charger in Richtek RT5033 PMIC.
The device supports pre-charge mode, fast charge mode and
constant voltage mode.
config CHARGER_RT9455 config CHARGER_RT9455
tristate "Richtek RT9455 battery charger driver" tristate "Richtek RT9455 battery charger driver"
depends on I2C depends on I2C
......
...@@ -54,6 +54,7 @@ obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o ...@@ -54,6 +54,7 @@ obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o
obj-$(CONFIG_BATTERY_MAX17042) += max17042_battery.o obj-$(CONFIG_BATTERY_MAX17042) += max17042_battery.o
obj-$(CONFIG_BATTERY_MAX1721X) += max1721x_battery.o obj-$(CONFIG_BATTERY_MAX1721X) += max1721x_battery.o
obj-$(CONFIG_BATTERY_RT5033) += rt5033_battery.o obj-$(CONFIG_BATTERY_RT5033) += rt5033_battery.o
obj-$(CONFIG_CHARGER_RT5033) += rt5033_charger.o
obj-$(CONFIG_CHARGER_RT9455) += rt9455_charger.o obj-$(CONFIG_CHARGER_RT9455) += rt9455_charger.o
obj-$(CONFIG_CHARGER_RT9467) += rt9467-charger.o obj-$(CONFIG_CHARGER_RT9467) += rt9467-charger.o
obj-$(CONFIG_CHARGER_RT9471) += rt9471.o obj-$(CONFIG_CHARGER_RT9471) += rt9471.o
......
This diff is collapsed.
...@@ -39,20 +39,4 @@ struct rt5033_battery { ...@@ -39,20 +39,4 @@ struct rt5033_battery {
struct power_supply *psy; struct power_supply *psy;
}; };
/* RT5033 charger platform data */
struct rt5033_charger_data {
unsigned int pre_uamp;
unsigned int pre_uvolt;
unsigned int const_uvolt;
unsigned int eoc_uamp;
unsigned int fast_uamp;
};
struct rt5033_charger {
struct device *dev;
struct rt5033_dev *rt5033;
struct power_supply *psy;
struct rt5033_charger_data *chg;
};
#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