Re: [PATCH v7 4/4] mfd: aat2870: Add support for VIN and IN-LDO power supplies
From: Lee Jones
Date: Thu Nov 26 2026 - 06:47:56 EST
On Sun, 15 Nov 2026, Svyatoslav Ryhel wrote:
> The AAT2870 supports a dedicated main power supply input alongside parent
> power supply for its internal regulators.
>
> Add support for retrieving and managing these supply regulators
> (vin-supply and in-ldo-supply) using the regulator framework to ensure
> proper power supply dependencies and power-up sequencing.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> ---
> drivers/mfd/aat2870-core.c | 5 +++++
> drivers/regulator/aat2870-regulator.c | 1 +
Is this a build dep?
Would something that was working before, break?
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c
> index f5409dd91efb3..9017960ee73b1 100644
> --- a/drivers/mfd/aat2870-core.c
> +++ b/drivers/mfd/aat2870-core.c
> @@ -14,6 +14,7 @@
> #include <linux/kernel.h>
> #include <linux/mfd/aat2870.h>
> #include <linux/of_platform.h>
> +#include <linux/regulator/consumer.h>
> #include <linux/regulator/machine.h>
> #include <linux/slab.h>
> #include <linux/uaccess.h>
> @@ -307,6 +308,10 @@ static int aat2870_i2c_probe(struct i2c_client *client)
>
> aat2870->reg_cache = aat2870_regs;
>
> + ret = devm_regulator_get_enable(&client->dev, "vin");
> + if (ret)
> + return dev_err_probe(&client->dev, ret, "Failed to enable regulator\n");
> +
> aat2870->en_pin = devm_gpiod_get_optional(&client->dev, "enable",
> GPIOD_OUT_HIGH);
> if (IS_ERR(aat2870->en_pin))
> diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
> index 73b6d06858cff..896f39e345379 100644
> --- a/drivers/regulator/aat2870-regulator.c
> +++ b/drivers/regulator/aat2870-regulator.c
> @@ -105,6 +105,7 @@ static const unsigned int aat2870_ldo_voltages[] = {
> #define AAT2870_LDO(ids, match, vsel, vmask) { \
> .name = #ids, \
> .of_match = (match), \
> + .supply_name = "in-ldo", \
> .id = AAT2870_ID_##ids, \
> .n_voltages = ARRAY_SIZE(aat2870_ldo_voltages), \
> .volt_table = aat2870_ldo_voltages, \
> --
> 2.53.0
>
--
Lee Jones