Re: [PATCH v4 3/3] mfd: vortex: implement new driver for Vortex southbridges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [李琼斯]




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux