Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651Ab2KGLYD (ORCPT ); Wed, 7 Nov 2012 06:24:03 -0500 Received: from li42-95.members.linode.com ([209.123.162.95]:55011 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101Ab2KGLYB convert rfc822-to-8bit (ORCPT ); Wed, 7 Nov 2012 06:24:01 -0500 Subject: Re: [RFC] Device Tree Overlays Proposal (Was Re: capebus moving omap_devices to mach-omap2) Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Pantelis Antoniou In-Reply-To: <509A4232.9090709@ti.com> Date: Wed, 7 Nov 2012 12:23:25 +0100 Cc: Grant Likely , Rob Herring , Deepak Saxena , Benjamin Herrenschmidt , Scott Wood , Tony Lindgren , Russ Dill , Felipe Balbi , linux-kernel , Koen Kooi , Matt Porter , , Kevin Hilman , Paul Walmsley , Content-Transfer-Encoding: 8BIT Message-Id: <4F38B158-14F7-474E-8232-F455177E774C@antoniou-consulting.com> References: <02FF5400-9F97-4B8A-AEF0-267B01C8099F@antoniou-consulting.com> <5ED17D42-07B8-4D4F-B54F-82B4CC60584C@antoniou-consulting.com> <509A3595.7050600@ti.com> <509A4232.9090709@ti.com> To: Benoit Cousson X-Mailer: Apple Mail (2.1085) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2042 Lines: 63 Hi Benoit, On Nov 7, 2012, at 12:12 PM, Benoit Cousson wrote: > On 11/07/2012 12:02 PM, Pantelis Antoniou wrote: >> Hi Benoit, >> [snip] >> I don't know if this breaks any conventions but seems to work fine for our case. > > Yeah, my main concern with that approach is that you change the > structure of the tree by adding an extra node/hierarchy that will not be > there in case of non-versioned tree. > That's why I think we should have something lighter that will not change > the structure. > Ideally we should be able to add extra versioned node to the original > dts without changing it at all. > You will still need the versioned nodes to be injected to the non-versioned ones. FWIW the driver will use the standard of_property_read_* interface. You can patch of_property_read to hide the version node matching, and it will work. I'll leave Grant answer what approach is better, I don't claim to have the insight to handle all cases. >>> Maybe some extra version match table can just be passed during the board machine_init >>> >>> of_platform_populate(NULL, omap_dt_match_table, NULL, NULL, panda_version_match_table); >>> >> >> Would we need explicit of_platform_populate calls if we have node modification notifiers? >> In that case the notifier would pick it up automatically, and can do the per >> version matching internally. > > Yes indeed, but here I was thinking about an intermediate step, i.e. > now, without any dynamic node insertion mechanism. > Thanks to this simple approach, when can already fix the board > versionning problem. > As I pointed, with a kind of injection mechanism. the versioned node contents end up in the proper place in the device tree. Your method will work in a much more simpler way. > Regards, > Benoit > Regards -- Pantelis -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/