[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <884e86be-112b-44dd-a827-30355a5fdba6@linaro.org>
Date: Wed, 25 Jun 2025 11:19:18 +0100
From: James Clark <james.clark@...aro.org>
To: Arnd Bergmann <arnd@...db.de>, Frank Li <Frank.li@....com>
Cc: Vladimir Oltean <olteanv@...il.com>, Mark Brown <broonie@...nel.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Larisa Grigore <larisa.grigore@....com>, Christoph Hellwig <hch@....de>,
linux-spi@...r.kernel.org, imx@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/6] spi: spi-fsl-dspi: Stub out DMA functions
On 25/06/2025 11:00 am, Arnd Bergmann wrote:
> On Wed, Jun 25, 2025, at 11:19, James Clark wrote:
>> On 24/06/2025 6:16 pm, Arnd Bergmann wrote:
>>> On Tue, Jun 24, 2025, at 18:29, Frank Li wrote:
>>
>>> It would also be simpler to enforce this in Kconfig if we only
>>> care about users that use the DMA support.
>>
>> But most of the devices supported by the driver don't do any DMA. That
>> was the reason to stub them out rather than add the Kconfig depends.
>
> Ah right. So even when running on SoCs that have a DMA engine,
> you can end up not using it?
>
Yes
> In this case you could have an extra Kconfig symbol to configure
> DMA support for this driver and use that in the source code:
>
> config SPI_FSL_DSPI_DMA
> bool "Use DMA engine for offloading Freescale DSPI transfers"
> depends on SPI_FSL_DSPI && DMA_ENGINE
> help
> ....
>
>
> Arnd
Wouldn't that allow someone to break it by disabling (or not enabling)
that option? The driver won't fall back to the other modes if DMA isn't
configured, it just won't work. In this case it seems like it's better
to depend directly on DMA_ENGINE because that fixes the randconfig
issues, which is the whole reason for the discussion.
Would someone really want an option to disable compilation of two
functions if their DSPI device is one that doesn't use DMA? Seems like
this option would always be on anyway.
Powered by blists - more mailing lists