Re: [PATCH v3 3/7] regulator: pm8008: Add mode voting support for PM8010

From: Jishnu Prakash

Date: Mon Nov 09 2026 - 01:21:11 EST


Hi Konrad,

On 11/2/2026 5:40 PM, Konrad Dybcio wrote:
> On 10/30/26 7:20 AM, Jishnu Prakash wrote:
>> From: Dhruvin Rajpura <drajpura@xxxxxxxxxxxxxxxx>
>>
>> Implement set_mode/get_mode support for PM8010 LDOs using the mode
>> control and status registers to allow clients to vote for LDO modes.
>> Mode voting is not supported in the PM8008 LDOs.
>>
>> Signed-off-by: Dhruvin Rajpura <drajpura@xxxxxxxxxxxxxxxx>
>> Signed-off-by: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
>> ---
>
> This defers the modesetting to the consumer. Please take a look at
> the qcom-rpmh-regulator driver and implement something like this:
>
> static unsigned int rpmh_regulator_vrm_get_optimum_mode(
> struct regulator_dev *rdev, int input_uV, int output_uV, int load_uA)
> {
> struct rpmh_vreg *vreg = rdev_get_drvdata(rdev);
>
> if (load_uA >= vreg->hw_data->hpm_min_load_uA)
> return REGULATOR_MODE_NORMAL;
> else
> return REGULATOR_MODE_IDLE;
> }
>
> and fill out the max current allowed for LPM for each regulator

Yes, I'll be making this change in the next patch version.

Thanks,
Jishnu

>
> Konrad