Re: [PATCH v2 3/7] regulator: qcom-pm8008: Add PM8010 mode support

From: Jishnu Prakash

Date: Thu Oct 22 2026 - 04:42:56 EST


Hi Guru,

On 10/19/2026 1:01 PM, Guru Das Srinagesh wrote:
> On Wed, Oct 14, 2026 at 04:02:00PM +0530, 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>
>> Tested-by: Oleg Keri <okerixx@xxxxxxxxx> # Lenovo Yoga Slim 7x Gen 11 (Glymur)
>> Signed-off-by: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
>> ---

....

>>
>> id = platform_get_device_id(pdev);
>> @@ -169,6 +237,9 @@ static int pm8008_regulator_probe(struct platform_device *pdev)
>> if (!regmap)
>> return -EINVAL;
>>
>> + is_pm8010 = of_device_is_compatible(dev->parent->of_node,
>> + "qcom,pm8010-i2c");
>
> Patch 2 adds a new `driver_data` match data struct for PM8010. Could this is_pm8010
> variable be avoided by stashing the regulator ops in the match data for each
> variant and using that instead?

Yes, I can make this change in the next patch version.

Thanks,
Jishnu

>
>> +
>> for (i = 0; i < match_data->num_regulators; i++) {
>> data = &match_data->regulator_data[i];
>>