drivers/regulator/axp20x-regulator.c | 96 ++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
-diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
-index 50ae0b5..6468291 100644
--- a/drivers/regulator/axp20x-regulator.c
+++ b/drivers/regulator/axp20x-regulator.c
@@ -27,8 +27,12 @@
#define AXP_DESC_FIXED(_family, _id, _match, _supply, _volt) \
[_family##_##_id] = { \
.name = #_id, \
-@@ -135,6 +159,14 @@ static struct regulator_ops axp20x_ops = {
+@@ -135,6 +159,14 @@ static struct regulator_ops axp20x_ops =
.is_enabled = regulator_is_enabled_regmap,
};
static const struct regulator_desc axp20x_regulators[] = {
AXP_DESC(AXP20X, DCDC2, "dcdc2", "vin2", 700, 2275, 25,
AXP20X_DCDC2_V_OUT, 0x3f, AXP20X_PWR_OUT_CTRL, 0x10),
-@@ -152,6 +184,52 @@ static const struct regulator_desc axp20x_regulators[] = {
+@@ -152,6 +184,52 @@ static const struct regulator_desc axp20
AXP20X_IO_ENABLED, AXP20X_IO_DISABLED),
};
static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
{
struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
-@@ -165,6 +243,12 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq)
+@@ -165,6 +243,12 @@ static int axp20x_set_dcdc_freq(struct p
def = 1500;
step = 75;
break;
default:
dev_err(&pdev->dev,
"Setting DCDC frequency for unsupported AXP variant\n");
-@@ -237,6 +321,14 @@ static int axp20x_set_dcdc_workmode(struct regulator_dev *rdev, int id, u32 work
+@@ -237,6 +321,14 @@ static int axp20x_set_dcdc_workmode(stru
workmode <<= ffs(mask) - 1;
break;
default:
/* should not happen */
WARN_ON(1);
-@@ -265,6 +357,10 @@ static int axp20x_regulator_probe(struct platform_device *pdev)
+@@ -265,6 +357,10 @@ static int axp20x_regulator_probe(struct
regulators = axp20x_regulators;
nregulators = AXP20X_REG_ID_MAX;
break;