From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [RFC PATCH 0/3] ARM: use C pre-processor with dtc Date: Tue, 25 Sep 2012 16:46:16 -0700 Message-ID: <20120925234616.GE4840@atomide.com> References: <1348599998-2729-1-git-send-email-swarren@wwwdotorg.org> <1348601746.5565.18@snotra> <50620B5B.5020904@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <50620B5B.5020904-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Stephen Warren Cc: Stephen Warren , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Rob Herring , Scott Wood , Russell King , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org * Stephen Warren [120925 12:53]: > On 09/25/2012 01:35 PM, Scott Wood wrote: > > > > Do you have an example of where you'd actually benefit from this? I'd > > think most things could either be done reasonably well with what's built > > into DTC (see what we've done in arch/powerpc/boot/dts/fsl), or would > > need math expression support in DTC (or has that been added?). > > Yes, support for basic integer math in cell values has indeed been > recently added to upstream dtc. I don't believe this has been ported > into the in-kernel dtc yet though. > > The primary motivation here is probably naming constants and associated > readability. For example, instead of: > > nvidia,phy-reset-gpio = <&gpio 169 0>; /* gpio PV1 */ > > You could write: > > nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO_PV1 0>; > > No more opaque numbers! This would be nice indeed. Regards, Tony