Re: [PATCH v8 1/7] mfd: Add core driver for Nuvoton NCT6694

From: Ming Yu
Date: Tue Mar 25 2025 - 22:53:28 EST


Lee Jones <lee@xxxxxxxxxx> 於 2025年3月20日 週四 下午10:50寫道:
>
...
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x1),
> > >
> > > IDs are usually given in base-10.
> > >
> >
> > Fix it in v9.
> >
> > > Why are you manually adding the device IDs?
> > >
> > > PLATFORM_DEVID_AUTO doesn't work for you?
> > >
> >
> > I need to manage these IDs to ensure that child devices can be
> > properly utilized within their respective modules.
>
> How? Please explain.
>
> This numbering looks sequential and arbitrary.
>
> What does PLATFORM_DEVID_AUTO do differently such that it is not useful?
>

As far as I know, PLATFORM_DEVID_AUTO assigns dynamic IDs to devices,
but I need fixed IDs.
For example, the GPIO driver relies on these IDs to determine the
group, allowing the firmware to identify which GPIO group to operate
on through the API.

> >
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x2),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x3),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x4),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x5),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x6),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x7),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x8),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0x9),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xA),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xB),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xC),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xD),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xE),
> > > > + MFD_CELL_BASIC("gpio-nct6694", NULL, NULL, 0, 0xF),


Thanks,
Ming