Re: [PATCH v3 4/6] spi: introduce SPI ancillary device with lanes

From: Andy Shevchenko

Date: Tue Aug 18 2026 - 02:53:36 EST


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