Re: [PATCH v3 3/7] regulator: pm8008: Add mode voting support for PM8010
From: Konrad Dybcio
Date: Mon Nov 02 2026 - 07:24:19 EST
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
Konrad