[PATCH v4 2/3] spi: apple: Add driver for Apple SPI controller

Mark Brown broonie at kernel.org
Tue Nov 5 05:58:36 PST 2024


On Tue, Nov 05, 2024 at 09:08:30AM +0100, Janne Grunau wrote:
> From: Hector Martin <marcan at marcan.st>
> 
> This SPI controller is present in Apple SoCs such as the M1 (t8103) and
> M1 Pro/Max (t600x). It is a relatively straightforward design with two
> 16-entry FIFOs, arbitrary transfer sizes (up to 2**32 - 1) and fully
> configurable word size up to 32 bits. It supports one hardware CS line
> which can also be driven via the pinctrl/GPIO driver instead, if
> desired. TX and RX can be independently enabled.

This breaks the build with current code:

/build/stage/linux/drivers/spi/spi-apple.c: In function ‘apple_spi_probe’:
/build/stage/linux/drivers/spi/spi-apple.c:463:16: error: implicit declaration o
f function ‘devm_spi_alloc_master’; did you mean ‘devm_spi_alloc_target’? [-Werr
or=implicit-function-declaration]
  463 |         ctlr = devm_spi_alloc_master(&pdev->dev, sizeof(struct apple_spi
));
      |                ^~~~~~~~~~~~~~~~~~~~~
      |                devm_spi_alloc_target
/build/stage/linux/drivers/spi/spi-apple.c:463:14: error: assignment to ‘struct 
spi_controller *’ from ‘int’ makes pointer from integer without a cast [-Werror=
int-conversion]
  463 |         ctlr = devm_spi_alloc_master(&pdev->dev, sizeof(struct apple_spi
));
      |              ^
cc1: all warnings being treated as errors

It needs an update for the retirement of the old API name.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20241105/95e61eda/attachment.sig>


More information about the linux-arm-kernel mailing list