From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754088AbcEPROM (ORCPT ); Mon, 16 May 2016 13:14:12 -0400 Received: from down.free-electrons.com ([37.187.137.238]:45218 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753485AbcEPROL (ORCPT ); Mon, 16 May 2016 13:14:11 -0400 Date: Mon, 16 May 2016 19:14:07 +0200 From: Boris Brezillon To: Moritz Fischer Cc: David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, Linux Kernel Mailing List , moritz.fischer.private@gmail.com Subject: Re: [PATCH] mtd: Adding of_mtd_info_get to get mtd_info from devicetree Message-ID: <20160516191407.1dbb3028@bbrezillon> In-Reply-To: References: <1462988859-32240-1-git-send-email-moritz.fischer@ettus.com> <20160516095534.727fcac6@bbrezillon> <20160516100511.360c89c9@bbrezillon> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 May 2016 09:30:10 -0700 Moritz Fischer wrote: > Hi Boris, > > On Mon, May 16, 2016 at 1:05 AM, Boris Brezillon > wrote: > > >> 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 > > Well in my case I actually planned to use it with the OTP partition of my QSPI > device using spi_nor_read_usr_prot_reg and friends and I just needed a way > to get to the struct mtd_info from a child of my network device. > > Right now the OTP 'partitions' are not really exposed to device tree afaik. > Maybe that would be worthwhile to further look into? Maybe exposing > (wrapping) that as nvmem > would be the way to go? I think so. Now that MTD partitions are defined in a 'partitions' subnode (see MTD binding doc), we can define an 'otp-partitions' subnode and define nvmem cells in there. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com