[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190130155543.5ab749b5@bbrezillon>
Date: Wed, 30 Jan 2019 15:55:43 +0100
From: Boris Brezillon <bbrezillon@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
MTD Maling List <linux-mtd@...ts.infradead.org>,
Nguyen An Hoan <na-hoan@...so.co.jp>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-spi <linux-spi@...r.kernel.org>
Subject: Re: [PATCH v2 0/2] eeprom: at25: SPI transfer improvements
On Tue, 29 Jan 2019 20:02:37 +0100
Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> Hi Boris,
>
> On Fri, Jan 18, 2019 at 11:07 PM Boris Brezillon <bbrezillon@...nel.org> wrote:
> > Did you consider converting this driver to spimem? Looks like the
> > protocol used to communicate with the memory resembles the one used on
> > SPI NANDs/NORs and fits pretty well in the spi_mem_op representation.
> >
> > By doing this conversion you'd allow people to connect an AT25 EEPROM
> > to an advanced SPI controller that does not support regular SPI
> > transfers and you wouldn't have to forge SPI messages manually.
> >
> > Here is a patch (only compile tested) doing that. The diffstat is not in
> > favor of this conversion, but I find the resulting code cleaner and more
> > future proof.
>
> Thanks, seems to work fine, with the 512-byte 25LC040 I have!
>
> Tested-by: Geert Uytterhoeven <geert+renesas@...der.be>
>
> I did notice that the first two-byte transfer (command+offset) of each
> message is now split in two one-byte transfers, though.
That's something we can optimize in drivers/spi/spi-mem.c if you think
it makes a difference.
Powered by blists - more mailing lists