Re: [PATCH V5 3/6] mfd: pm8008: Add mfd cell struct to register LDOs

Lee Jones
2022-02-11T13:35:03Z

On Fri, 11 Feb 2022, Satya Priya Kakitapalli (Temp) wrote:

>
> On 2/10/2022 7:02 AM, Stephen Boyd wrote:
> > Quoting Satya Priya (2022-02-08 06:52:17)
> > > diff --git a/drivers/mfd/qcom-pm8008.c b/drivers/mfd/qcom-pm8008.c
> > > index c472d7f..e8569cc 100644
> > > --- a/drivers/mfd/qcom-pm8008.c
> > > +++ b/drivers/mfd/qcom-pm8008.c
> > > @@ -8,6 +8,7 @@
> > > #include <linux/interrupt.h>
> > > #include <linux/irq.h>
> > > #include <linux/irqdomain.h>
> > > +#include <linux/mfd/core.h>
> > > #include <linux/module.h>
> > > #include <linux/of_device.h>
> > > #include <linux/of_platform.h>
> > > @@ -27,6 +28,37 @@
> > > #define INT_EN_CLR_OFFSET 0x16
> > > #define INT_LATCHED_STS_OFFSET 0x18
> > >
> > > +static const struct mfd_cell pm8008_regulator_devs[] = {
> > Is there some way to not allocate this structure statically forever?
>
>
> I think No.
>
> I found that some of the drivers are just using one cell with .name to match
> with regulator driver and then probing regulators using a loop. I'll do that
> too.
>
> static const struct mfd_cell pm8008_regulator_devs[] = {
>         {
>                 .name = "qcom,pm8008-regulators",
>         },
>  };

Please use MFD_CELL_NAME() for these.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog