Re: [PATCH v4 4/9] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
From: Thomas Richard
Date: Thu Oct 15 2026 - 13:50:43 EST
On 10/15/26 5:27 PM, Lee Jones wrote:
> On Fri, 02 Oct 2026, Thomas Richard (congatec GmbH) wrote:
>
>> Since parameters are now passed to the i2c-cgbc driver via platform
>> data, the I2C driver no longer depends on the platform device ID to probe
>> the correct I2C buses. Drop the hardcoded cell ID in favor of
>> PLATFORM_DEVID_AUTO.
>>
>> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@xxxxxxxxxxx>
>> ---
>> drivers/mfd/cgbc-core.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
>> index 0cd9e6f888cb..8522df882509 100644
>> --- a/drivers/mfd/cgbc-core.c
>> +++ b/drivers/mfd/cgbc-core.c
>> @@ -71,13 +71,11 @@ static const struct mfd_cell cgbc_devs[] = {
>> MFD_CELL_NAME("cgbc-hwmon"),
>> {
>> .name = "cgbc-i2c",
>> - .id = 1,
>
> If you shuffled the patches around a bit, you shouldn't have to hack
> your own new additions in and out, no?
For I2C bus names I got it, but not for id.
I need i2c_platform_data to be able to drop cell id and use
PLATFORM_DEVID_AUTO, so I don't see how I could reorder the patches.
And cell ids are there from the beginning, not really a new addition.
Maybe I misunderstood your comment, or I miss something.
Best Regards,
Thomas