Re: [PATCH v2 5/6] mfd: qcom-pm8008: Add support for PM8010 PMIC

From: Jishnu Prakash

Date: Wed Sep 23 2026 - 06:28:32 EST


On 9/22/2026 3:03 PM, Lee Jones wrote:
> On Mon, 07 Sep 2026, Nihal Kumar Gupta wrote:
>
>> From: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
>>
>> The PM8010 is a variant of the PM8008 PMIC with a slightly different
>> IRQ layout and MFD cells. Introduce per-variant match data (IRQ chip
>> descriptor and MFD cells) selected via the new "qcom,pm8010-i2c"
>> compatible string, and support probing without an interrupt line by
>> falling back to a reduced set of MFD cells when the client has no IRQ
>> assigned.
>>
>> Signed-off-by: Jishnu Prakash <jishnu.prakash@xxxxxxxxxxxxxxxx>
>> Signed-off-by: Dhruvin Rajpura <drajpura@xxxxxxxxxxxxxxxx>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
>> Signed-off-by: Nihal Kumar Gupta <nihal.gupta@xxxxxxxxxxxxxxxx>
>
> Who are all of these people?
>
> Did they all work on this? If so, where are their Co-developed-bys?
>

Hi Lee,

I had split out the PM8010 support into a separate series, which you
have now commented on:
https://lore.kernel.org/all/20260918-pm8010_i2c_support-v1-0-de33d78fad9d@xxxxxxxxxxxxxxxx/.

I missed mentioning it earlier in the mail threads on this series,
sorry about that.

I have fixed up the attributions in that series. I have also noted
your comments on this patch and I'll address them in the next version
of the above series.

>> ---
>> drivers/mfd/qcom-pm8008.c | 140 ++++++++++++++++++++++++++++++++++++----------
>> 1 file changed, 112 insertions(+), 28 deletions(-)
>>
>> diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
>> index 60204cc9a2dc60cc1fe1b64030f5d803100e7874..28532cef7908ef3409a3dfc0779aae3b1a3885b9 100644
>> --- a/drivers/mfd/qcom-pm8008.c
>> +++ b/drivers/mfd/qcom-pm8008.c
>> @@ -34,6 +34,7 @@ enum {
>> PM8008_GPIO1,
>> PM8008_GPIO2,
>> PM8008_NUM_PERIPHS,
>> + PM8010_NUM_PERIPHS = 2,

....

>>
>> static const struct mfd_cell pm8008_cells[] = {
>> MFD_CELL_NAME("pm8008-regulator"),
>> - MFD_CELL_RES("qpnp-temp-alarm", pm8008_temp_res),
>> + MFD_CELL_RES("spmi-temp-alarm", pm8008_temp_res),
>
> Why is this cell being renamed from 'qpnp-temp-alarm' to 'spmi-temp-alarm'?
> There is no mention of this change in the commit log, and if intentional, it
> should be submitted in its own separate patch.

This was incorrect, it is not done in the separate PM8010
series I have sent the most recently.

>
>> MFD_CELL_NAME("pm8008-gpio"),
>> };
>>
>> +static const struct mfd_cell pm8010_cells[] = {
>> + MFD_CELL_NAME("pm8010-regulator"),
>> + MFD_CELL_RES("spmi-temp-alarm", pm8008_temp_res),
>> + MFD_CELL_NAME("pm8008-gpio"),
>> +};
>> +

...

>>
>> +static const struct pm8008_match_data pm8008_data = {
>> + .irq_chip_desc = &pm8008_irq_chip,
>> + .mfd_cells = pm8008_cells,
>> + .no_irq_mfd_cells = pm8008_no_irq_cells,
>> + .num_mfd_cells = ARRAY_SIZE(pm8008_cells),
>> + .no_irq_num_mfd_cells = ARRAY_SIZE(pm8008_no_irq_cells),
>> +};
>> +
>> +static const struct pm8008_match_data pm8010_data = {
>> + .irq_chip_desc = &pm8010_irq_chip,
>> + .mfd_cells = pm8010_cells,
>> + .no_irq_mfd_cells = pm8010_no_irq_cells,
>> + .num_mfd_cells = ARRAY_SIZE(pm8010_cells),
>> + .no_irq_num_mfd_cells = ARRAY_SIZE(pm8010_no_irq_cells),
>> +};
>> +
>> static const struct of_device_id pm8008_match[] = {
>> - { .compatible = "qcom,pm8008", },
>> + { .compatible = "qcom,pm8008", .data = &pm8008_data },
>> + { .compatible = "qcom,pm8010-i2c", .data = &pm8010_data },
>
> We do not allow data from one registration mechanism (MFD) to be piped through
> another (OF). Please pass through an enum identifier instead and select the
> cells and IRQ chip in a 'switch()' statement? Also, why does this compatible
> carry an '-i2c' suffix when the existing device is just "qcom,pm8008"?

Yes, I'll use this method here in the next patch series.

We use "qcom,pm8010-i2c" here instead of "qcom,pm8010" because
"qcom,pm8010" is already used for PM8010 over SPMI in
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml.

It is also mentioned in this patch in the latest series:
https://lore.kernel.org/all/20260918-pm8010_i2c_support-v1-1-de33d78fad9d@xxxxxxxxxxxxxxxx/.

Thanks,
Jishnu

>
>> { },
>> };
>> MODULE_DEVICE_TABLE(of, pm8008_match);
>>
>> --
>> 2.34.1
>>
>