Re: [PATCH v3 4/6] spi: introduce SPI ancillary device with lanes
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Mon, Aug 17, 2026 at 08:33:12PM -0300, Jonathan Santos wrote: > The existing spi_new_ancillary_device() creates an ancillary SPI device > but does not consider the parent's lane map. In multi-device setups where > each sub-device's chip-select is bound to a dedicated data lane, there is > no way to bind an ancillary device to an arbitrary lane index. > > Introduce spi_new_ancillary_device_with_lane() and > devm_spi_new_ancillary_device_with_lane(), which accept rx_lane_idx and > tx_lane_idx parameters to select a specific lane from the parent's > rx_lane_map and tx_lane_map respectively. The resulting ancillary device > is registered with a single RX and TX lane, keeping it independent from > the other sub-devices sharing the same controller. ... > extern struct spi_device *spi_new_ancillary_device(struct spi_device *spi, u8 chip_select); > extern struct spi_device *devm_spi_new_ancillary_device(struct spi_device *spi, u8 chip_select); > +extern struct spi_device *spi_new_ancillary_device_with_lane(struct spi_device *spi, > + u8 chip_select, > + unsigned int rx_lane_idx, > + unsigned int tx_lane_idx); > +extern struct spi_device *devm_spi_new_ancillary_device_with_lane(struct spi_device *spi, > + u8 chip_select, > + unsigned int rx_lane_idx, > + unsigned int tx_lane_idx); Can we stop using legacy 'extern' for the function declarations? -- With Best Regards, Andy Shevchenko