[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200430121737.37dghomlluzqcxxi@ti.com>
Date: Thu, 30 Apr 2020 17:47:39 +0530
From: Pratyush Yadav <p.yadav@...com>
To: Mark Brown <broonie@...nel.org>
CC: Tudor Ambarus <tudor.ambarus@...rochip.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Ludovic Desroches <ludovic.desroches@...rochip.com>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<linux-spi@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Sekhar Nori <nsekhar@...com>
Subject: Re: [PATCH v4 02/16] spi: atmel-quadspi: reject DTR ops
On 30/04/20 12:32PM, Mark Brown wrote:
> On Sat, Apr 25, 2020 at 12:13:56AM +0530, Pratyush Yadav wrote:
>
> > Double Transfer Rate (DTR) ops are added in spi-mem. But this controller
> > doesn't support DTR transactions. Since we don't use the default
> > supports_op(), which rejects all DTR ops, do that explicitly in our
> > supports_op().
>
> It's not ideal that we'd need to explicitly add checks in individual
> controller drivers - are we sure that all the others do?
Most other controllers either don't specify a supports_op function at
all, in which case spi_mem_default_supports_op() is called, or do their
custom logic and then call spi_mem_default_supports_op(). In both those
cases, DTR ops would get rejected because of the call to
spi_mem_default_supports_op(). So they do not need to add the check
explicitly there.
The two exceptions are atmel-quadspi and spi-mtk-nor (which I missed
updating). They don't call the default supports_op, so they need to be
updated to explicitly to reject DTR ops.
Earlier versions of this series discovered the DTR capability from
devicetree. In that case, no change would be required at all, but review
comments suggested I drop those changes. Instead, the controllers should
accept/reject DTR ops in their supports_op hooks.
--
Regards,
Pratyush Yadav
Texas Instruments India
Powered by blists - more mailing lists