All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Schrempf Frieder <frieder.schrempf@kontron.de>
Cc: "Heinrich.Toews@wago.com" <Heinrich.Toews@wago.com>,
	"Oleg.Karfich@wago.com" <Oleg.Karfich@wago.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: mtd: mchp23k256: How to follow a more generic approach?
Date: Wed, 20 Feb 2019 08:52:19 +0100	[thread overview]
Message-ID: <20190220085219.573b5051@collabora.com> (raw)
In-Reply-To: <d58a384a-7b43-931e-8ed9-0ad4cbf83628@kontron.de>

On Tue, 19 Feb 2019 14:47:08 +0000
Schrempf Frieder <frieder.schrempf@kontron.de> wrote:

> >   
> >> The instructions seem to be very similar to EEPROM and SPI NOR devices.
> >> So I'm curious about what others propose how to support these devices.  
> > 
> > I'm planning to write the driver for the ANV32AA1W during the next weeks
> > and it would be really great to have some feedback on the approach here.  
> 
> Maybe you can create a new generic SPI RAM driver (I don't think 
> something like this exists yet), that can be used with things like SRAM, 
> nvSRAM, FRAM, etc.?

Creating a new framework makes sense if you have enough to share
between all those drivers. I might be wrong (didn't look at the code)
but I think SRAM devices are simple enough to not require a new
mid-layer (especially if they use a different cmdset). What we could do
though is group them in drivers/mtd/sram/.

> 
> At the time when a generic driver exists, we could use it to replace the 
> mchp23k256 driver.
> 
> If you write a new driver or convert an existing one to support the 
> nvSRAM chips, please use the SPI MEM interface (drivers/spi/spi-mem.c). 
> This would enable us to share some code and connect those chips to all 
> kinds of controllers that support this interface (which are not only 
> generic SPI controllers, but also some QSPI controllers, that don't 
> support generic SPI transfers).

Yes, please use the spi-mem layer (note that I already started the
conversion of at25 here [1]).

[1]https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1904223.html

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

  reply	other threads:[~2019-02-20  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 12:33 mtd: mchp23k256: How to follow a more generic approach? Heinrich.Toews
2019-02-18 13:02 ` Schrempf Frieder
2019-02-19  8:15   ` Heinrich.Toews
2019-02-19 14:47     ` Schrempf Frieder
2019-02-20  7:52       ` Boris Brezillon [this message]
2019-02-20  8:07         ` Schrempf Frieder

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=20190220085219.573b5051@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=Heinrich.Toews@wago.com \
    --cc=Oleg.Karfich@wago.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-mtd@lists.infradead.org \
    /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.