Re: [PATCH v3 2/2] hwmon: (pmbus/max20860a) Add driver for Analog Devices MAX20860A
From: Nuno Sá
Date: Mon Jun 01 2026 - 05:29:27 EST
On Fri, May 29, 2026 at 04:51:40PM +0000, Pradhan, Sanman wrote:
> From: Sanman Pradhan <psanman@xxxxxxxxxxx>
>
> On Fri, May 29, 2026 at 10:31:20 +0100, Nuno Sá wrote:
> > > +static struct pmbus_driver_info max20860a_info = {
> > > + .pages = 1,
> > > + .format[PSC_VOLTAGE_IN] = linear,
> > > + .format[PSC_VOLTAGE_OUT] = linear,
> > > + .format[PSC_CURRENT_OUT] = linear,
> > > + .format[PSC_TEMPERATURE] = linear,
> > > + .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VOUT |
> > > + PMBUS_HAVE_STATUS_VOUT |
> > > + PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |
> > > + PMBUS_HAVE_TEMP | PMBUS_HAVE_TEMP2 |
> > > + PMBUS_HAVE_STATUS_TEMP | PMBUS_HAVE_STATUS_INPUT,
> > > +};
> >
> > Any reason not to add regulator support? Given that the device seems to
> > be a regulator...
>
> Thanks for the review, Nuno.
>
> The driver was submitted as monitoring-only to start with, and I was
> planning to add regulator support as a follow-up patch.
>
> I think the DT binding already includes the regulator.yaml $ref
> so, in that case adding regulator support later won't require
> a binding change.
>
> If you'd prefer regulator support included from the start,
> happy to add it in a v4.
You should be able to easily support regulators through pmbus. I meant
something like:
https://elixir.bootlin.com/linux/v7.0.10/source/drivers/hwmon/pmbus/mp2975.c#L986
- Nuno Sá
>
> Thank you.
>
> Regards,
> Sanman Pradhan