[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250903072117.GY2163762@google.com>
Date: Wed, 3 Sep 2025 08:21:17 +0100
From: Lee Jones <lee@...nel.org>
To: Marcos Del Sol Vives <marcos@...a.pet>
Cc: linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Michael Walle <mwalle@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-gpio@...r.kernel.org,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v4 3/3] mfd: vortex: implement new driver for Vortex
southbridges
On Tue, 02 Sep 2025, Marcos Del Sol Vives wrote:
> El 02/09/2025 a las 17:18, Lee Jones escribió:
> >> +
> >> +struct vortex_southbridge {
> >> + const struct mfd_cell *cells;
> >> + int n_cells;
> >> +};
> >
> > Why is this needed?
> >
>
> To have a variable amount of cells. Currently I am only implementing the
> GPIO device because it's the most critical (required for device shutdown),
> but I plan on implementing once this gets merged at least also the watchdog,
> which is provided by the same southbridge.
>
> Adding support for this is should make adding that simpler.
You don't need it. Please find another way to achieve your goal.
> >> +static const struct mfd_cell vortex_dx_sb_cells[] = {
> >> + {
> >> + .name = "vortex-gpio",
> >> + .resources = vortex_dx_gpio_resources,
> >> + .num_resources = ARRAY_SIZE(vortex_dx_gpio_resources),
> >> + },
> >> +};
> >
> > It's not an MFD until you have more than one device.
>
> Same as above.
It will not be accepted with only a single device (SFD?).
> >> +static const struct pci_device_id vortex_sb_table[] = {
> >> + /* Vortex86DX */
> >> + { PCI_DEVICE_DATA(RDC, R6031, &vortex_dx_sb) },
> >
> > We're not passing one initialisation API's data (MFD) through another (PCI).
>
> Unless I understood you incorrectly, you mean I should not pass MFD cells/
> data as private data?
Right.
> vortex_dx_sb are "struct vortex_southbridge" type, not raw MFD API data.
I like your style, but nope!
vortex_southbridge contains MFD data and shouldn't exist anyway.
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists