[PATCH] mtd: Adding of_mtd_info_get to get mtd_info from devicetree

Boris Brezillon boris.brezillon at free-electrons.com
Mon May 16 01:05:11 PDT 2016


On Mon, 16 May 2016 09:55:34 +0200
Boris Brezillon <boris.brezillon at free-electrons.com> wrote:

> Hi Moritz,
> 
> On Wed, 11 May 2016 10:47:39 -0700
> Moritz Fischer <moritz.fischer at ettus.com> wrote:
> 
> > This allows for getting a struct mtd_info from a node pointer,
> > allowing mtd devices to e.g. store serial numbers or MAC addresses.  
> 
> Can you detail a bit what you'll do next. I guess you need to provide
> this information to in-kernel users, and those users will just call
> mtd_read() after retrieving the mtd_info pointer.
> 
> Here are a few questions (I'm assuming the netdev + MAC address case):
> - how would you link the net/PHY device to the MTD partition storing
>   the MAC address

Sorry, I sent it before asking all my questions :).

- it seems quite specific to MTD devices to me. What if the MAC address
  is stored in something that is not exposed as an MTD device. I wonder
  if we shouldn't add an nvmem wrapper around MTD devices.


-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the linux-mtd mailing list