Re: [PATCH v3 3/3] mtd: mtdconcat: add dt driver for concat devices
From: Bernhard Frauendienst
Date: Fri Sep 14 2018 - 09:42:53 EST
sorry it took me so long to reply, I had to set up mutt first ;)
On Mon, Sep 10, 2018 at 04:47:22PM -0500, Rob Herring wrote:
> On Sat, Sep 8, 2018 at 8:20 AM Bernhard Frauendienst
> <kernel@xxxxxxxxxxxxxxxxx> wrote:
> > Some mtd drivers like physmap variants have support for concatenating
> > multiple mtd devices, but there is no generic way to define such a
> > concat device from within the device tree.
> That is the generic way, but I suppose that only works for parallel
> memory mapped devices. So is it just spi-nor that you need to support?
I'm no expert in this domain, or regarding OpenWRT, but as far as I can
tell this only concerns spi-nor devices. It definitely does in my
> Can we just make reg take multiple chip selects just like the existing
> support takes multiple reg entries?
That sounds like an interesting idea, but I'm afraid it's not a trivial
change, as far as I can tell from looking at spi.c.
The 'reg' property is currently read in of_spi_parse_dt which gets
passed the spi device created in of_register_spi_device. The latter
would have to create multiple devices from a single OF node, and pass
the chipselect value to of_spi_parse_dt, which would have to parse the
same node multiple times, which feels a bit strange. To make things
worse, of_register_spi_device returns the created device, although that
value seems unused in the current tree (except for error checks).
Am I correct to assume that this change in method signature could be
accteptable since both functions are not exported?