[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45b84c38-4046-4fb0-89af-6a2cc4de99cf@orca.pet>
Date: Tue, 2 Sep 2025 20:06:37 +0200
From: Marcos Del Sol Vives <marcos@...a.pet>
To: Lee Jones <lee@...nel.org>
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
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.
>> +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.
>> +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?
vortex_dx_sb are "struct vortex_southbridge" type, not raw MFD API data.
Powered by blists - more mailing lists