[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241106070152.GA928468@robin.jannau.net>
Date: Wed, 6 Nov 2024 08:01:52 +0100
From: Janne Grunau <j@...nau.net>
To: Mark Brown <broonie@...nel.org>
Cc: Hector Martin <marcan@...can.st>, Sven Peter <sven@...npeter.dev>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-spi@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/3] spi: apple: Add driver for Apple SPI controller
On Tue, Nov 05, 2024 at 01:58:36PM +0000, Mark Brown wrote:
> On Tue, Nov 05, 2024 at 09:08:30AM +0100, Janne Grunau wrote:
> > From: Hector Martin <marcan@...can.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.
A pitty that there is no good way to enable deprecated warnings just for
new code.
Switched to devm_spi_alloc_host() and changed the prefix for
the bindings commit msg to "spi: dt-bindings:".
thanks
Janne
Powered by blists - more mailing lists