Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4998722imm; Tue, 21 Aug 2018 04:45:41 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxF+B4aE+eu2o7aDQkhPc07R5/8v/KxR23qmVTV1DrVjrmv+0t4rn5O2SBIrnSStOhjp7wQ X-Received: by 2002:a63:4e5f:: with SMTP id o31-v6mr44730389pgl.256.1534851941197; Tue, 21 Aug 2018 04:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534851941; cv=none; d=google.com; s=arc-20160816; b=fYe41Z+++whqHYTh0Wtm2nF+gyf4uO1EgjN8Xqz2T5/u2mkMoNzaqO8+Cf7YboluLu ITnieMksAzLqNFs7hM4/jB/5x7MvOY5cUyjz0yt9oZQwXMLNqg1MszfSSjyEBie2S7HV 0V5alLGH7n1brX8vjKsQOjuTbbAkr1fQrhD6KOc65u50uZEIG8ujwLnAc5CCquaiU3yy SzgSDB39RR3BCoCX8s8IAxgmh3ZCUpRm6/Dv/NbZHEPxDngk8R5hxZEvZYcFqoXHstXL g4iSytkE82INwkxNpirrOPV7h4X1/q/LFMcK3Bk8vCpcB0V52cbB0Uk4cMIXLjiLa/rQ Ahkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=t2aYmv/go9SkHoRxplucKWi34bFEhL1IKkdz9GsR2hQ=; b=FHZCEZRJfkpxwvQM0YjLsbm2kzIfdyP2soWGtVWQnbGVCoZnn/VKHYhtYo5Z1YRXQB /+HVHTzBOx2t67bh1/wZdxYHoSjjApZWZyYn7qYmNqeWrpdnhzvdvDJywFsK2EjW6JZ+ RiedgOwiHoAU+CAduW4A4PP/oWTqsTmmjBt/lRmnQzDzUxstSQ7zNV2Z7cXo6szeDC1U Zp4TKGDFt/7ByHLUB2irZWn74+Tu2vWTZcyqoypQ2rK9IRBBLx2JodPzTThxu3twZP5r ULq/qSkCkRSEkmgKkp6aEn7CW3OOUy1HthD4FrnbL16KhGtYJ3Z9thxLHVirA0a4I42V Q2YA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p123-v6si13061663pfg.281.2018.08.21.04.45.24; Tue, 21 Aug 2018 04:45:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbeHUPAa (ORCPT + 99 others); Tue, 21 Aug 2018 11:00:30 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:3334 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbeHUPAa (ORCPT ); Tue, 21 Aug 2018 11:00:30 -0400 Received: from eos (unknown [80.242.164.60]) (Authenticated sender: albeu) by smtp5-g21.free.fr (Postfix) with ESMTPSA id CFEEB5FFBA; Tue, 21 Aug 2018 13:39:21 +0200 (CEST) Date: Tue, 21 Aug 2018 13:39:16 +0200 From: Alban To: Srinivas Kandagatla Cc: Alban Bedel , Boris Brezillon , Bartosz Golaszewski , Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Rob Herring , David Lechner , Andrew Lunn , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v2 06/29] mtd: Add support for reading MTD devices via the nvmem API Message-ID: <20180821133916.3a1c51b1@eos> In-Reply-To: References: <20180810080526.27207-1-brgl@bgdev.pl> <20180810080526.27207-7-brgl@bgdev.pl> <20180817182720.6a6e5e8e@bbrezillon> <20180819133106.0420df5f@tock> <20180819184609.6dcdbb9a@bbrezillon> <5b8c30b8-41e1-d59e-542b-fef6c6469ff0@linaro.org> <20180820202038.5d3dc195@bbrezillon> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/H3emaZsLss0.QG=/IEiqnC1"; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/H3emaZsLss0.QG=/IEiqnC1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 21 Aug 2018 10:50:07 +0100 Srinivas Kandagatla wrote: > Just curious...Is there a reason why we can't do it like this?: > Is this because of issue of #address-cells and #size-cells Or mtd=20 > bindings always prefer subnodes? >=20 > mtdnode { > reg =3D <0x0123000 0x40000>; > #address-cells =3D <1>; > #size-cells =3D <1>; > cell@0 { > compatible =3D "nvmem-cell"; > reg =3D <0x0 0x14>; > }; >=20 > partitions { > compatible =3D "fixed-partitions"; > #address-cells =3D <1>; > #size-cells =3D <1>; >=20 > partition@0 { > reg =3D <0x0 0x20000>; > cell@0 { > compatible =3D "nvmem-cell"; > reg =3D <0x0 0x10>; > }; > }; > }; > }; That would work, the MTD partitions parser ignore child nodes with a compatible string when looking for "old style" partitions, see [1]. However we still have the a potential address space clash between the nvmem cells and the main device binding. Alban [1]: https://elixir.bootlin.com/linux/latest/source/drivers/mtd/ofpart.c#L28 --Sig_/H3emaZsLss0.QG=/IEiqnC1 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE0W61GceYqNjiMSkodJSaS524LbwFAlt7+eQACgkQdJSaS524 Lbw8Eg/+LksOLDz4/cK1Hv2Osee6M3szNFj3GJYOMAb+35h4qvp3QUEQDLsGQ3Kd XDdsoRPCc0iuMkN+CWH1mC8/02oufsP1e55OhYcIyMxdCi4PORyCzlkjuWZBBdsU tw7NP2/zWTaboRVe8nWCRd8gVEDxyfPqlLJXrk+N4ZBuB35LOOOHHH8GbGCay5cp uZgRZDpS7QgHQbDQU7lHH6yKT6oYx/GTY3BKZU5Q3FoFrQ9vEne9ZO/xJf2JNhjY 5vS8hhhsHbFhfo9CwUOQuisWsdvZEyB0EKtmeF7Wq6NuvFv7VE/hrIjklZY3d1Kx bNy12FyRvIgX43q9arV8FTNOOGJkyJbiBUm9B4FnBFzmpWqg6QmY4AmIqhuIDZi3 TiOHBp9gARLX+lJNZeqEY46hZoHJp/eWAqHtdlTfVGxAecApwMH/gZw5Ad62N8qB K0dVL0JVUWR15TfnqOkaPWGsnpRdEf9hvqbPWroND+FKppBH+weVzC/H2aalmQyQ Td9OVH0wyLI5SoyCptcw/12g5icNhsxmcIGxQfidbsric9lpFJH/D/jm0BPDAoVo E8rAEARYGaaBG3+FXXRD8pHVJIX0JmqgHAp/9qmnyBYM/F9CaiGt/7oc89fFKO7h mYUKeBXbMfNEalg1UuyN5mMvDaFFp/uFBmvq/LXKyeJW94RCwJA= =Ecun -----END PGP SIGNATURE----- --Sig_/H3emaZsLss0.QG=/IEiqnC1--