All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <bbrezillon@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Arnd Bergmann <arnd@arndb.de>,
	MTD Maling List <linux-mtd@lists.infradead.org>,
	Nguyen An Hoan <na-hoan@jinso.co.jp>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] eeprom: at25: SPI transfer improvements
Date: Wed, 30 Jan 2019 16:08:39 +0100	[thread overview]
Message-ID: <20190130160839.55f99e63@bbrezillon> (raw)
In-Reply-To: <20190130145054.GA990@kroah.com>

Hi Greg,

On Wed, 30 Jan 2019 15:50:54 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Tue, Jan 29, 2019 at 08:02:37PM +0100, Geert Uytterhoeven wrote:
> > Hi Boris,
> > 
> > On Fri, Jan 18, 2019 at 11:07 PM Boris Brezillon <bbrezillon@kernel.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@glider.be>
> > 
> > I did notice that the first two-byte transfer (command+offset) of each
> > message is now split in two one-byte transfers, though.  
> 
> Ok, I'll drop this patch series and wait for the updated version to be
> sent out :)

I'd like to further simplify the patch by using the recently introduced
devm_spi_mem_dirmap_create() function (queued to Mark's spi/for-5.1
branch), which means I'll have to wait v5.1-rc1 before sending a new
version. I'll let you decide if it's worth applying Geert's patches in
the meantime.

Regards,

Boris

WARNING: multiple messages have this Message-ID (diff)
From: Boris Brezillon <bbrezillon@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Nguyen An Hoan <na-hoan@jinso.co.jp>,
	MTD Maling List <linux-mtd@lists.infradead.org>,
	linux-spi <linux-spi@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] eeprom: at25: SPI transfer improvements
Date: Wed, 30 Jan 2019 16:08:39 +0100	[thread overview]
Message-ID: <20190130160839.55f99e63@bbrezillon> (raw)
In-Reply-To: <20190130145054.GA990@kroah.com>

Hi Greg,

On Wed, 30 Jan 2019 15:50:54 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Tue, Jan 29, 2019 at 08:02:37PM +0100, Geert Uytterhoeven wrote:
> > Hi Boris,
> > 
> > On Fri, Jan 18, 2019 at 11:07 PM Boris Brezillon <bbrezillon@kernel.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@glider.be>
> > 
> > I did notice that the first two-byte transfer (command+offset) of each
> > message is now split in two one-byte transfers, though.  
> 
> Ok, I'll drop this patch series and wait for the updated version to be
> sent out :)

I'd like to further simplify the patch by using the recently introduced
devm_spi_mem_dirmap_create() function (queued to Mark's spi/for-5.1
branch), which means I'll have to wait v5.1-rc1 before sending a new
version. I'll let you decide if it's worth applying Geert's patches in
the meantime.

Regards,

Boris

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2019-01-30 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-18 14:05 [PATCH v2 0/2] eeprom: at25: SPI transfer improvements Geert Uytterhoeven
2019-01-18 14:05 ` Geert Uytterhoeven
2019-01-18 14:05 ` [PATCH v2 1/2] eeprom: at25: Merge "off" and "offset" in at25_ee_write() Geert Uytterhoeven
2019-01-18 14:05   ` Geert Uytterhoeven
2019-01-26 10:06   ` Boris Brezillon
2019-01-26 10:06     ` Boris Brezillon
2019-01-18 14:05 ` [PATCH v2 2/2] eeprom: at25: Use spi_message_init_with_transfers() instead of open coding Geert Uytterhoeven
2019-01-18 14:05   ` Geert Uytterhoeven
2019-01-26 10:06   ` Boris Brezillon
2019-01-26 10:06     ` Boris Brezillon
2019-01-18 22:07 ` [PATCH v2 0/2] eeprom: at25: SPI transfer improvements Boris Brezillon
2019-01-18 22:07   ` Boris Brezillon
2019-01-23 18:10   ` Geert Uytterhoeven
2019-01-23 18:10     ` Geert Uytterhoeven
2019-01-29 19:02   ` Geert Uytterhoeven
2019-01-29 19:02     ` Geert Uytterhoeven
2019-01-30 14:50     ` Greg Kroah-Hartman
2019-01-30 14:50       ` Greg Kroah-Hartman
2019-01-30 15:08       ` Boris Brezillon [this message]
2019-01-30 15:08         ` Boris Brezillon
2019-01-30 19:40         ` Greg Kroah-Hartman
2019-01-30 19:40           ` Greg Kroah-Hartman
2019-01-30 14:55     ` Boris Brezillon
2019-01-30 14:55       ` Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190130160839.55f99e63@bbrezillon \
    --to=bbrezillon@kernel.org \
    --cc=arnd@arndb.de \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=na-hoan@jinso.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.