Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753263AbbDAFDF (ORCPT ); Wed, 1 Apr 2015 01:03:05 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:36818 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbbDAFDB (ORCPT ); Wed, 1 Apr 2015 01:03:01 -0400 From: Grant Likely Subject: Re: [PATCH] of: Custom printk format specifier for device node To: Pantelis Antoniou Cc: Joe Perches , Andrew Morton , Rob Herring , Randy Dunlap , linux-doc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <8421E7C5-C0D9-4C86-AA37-F6507B3BCC57@konsulko.com> References: <1421859974-24507-1-git-send-email-pantelis.antoniou@konsulko.com> <1421861843.10574.23.camel@perches.com> <7EBFDD59-156A-42FB-AAF0-CE4A88219794@antoniou-consulting.com> <20150330190432.42192C40A67@trevor.secretlab.ca> <8421E7C5-C0D9-4C86-AA37-F6507B3BCC57@konsulko.com> Date: Tue, 31 Mar 2015 21:52:31 -0700 Message-Id: <20150401045231.70614C4082F@trevor.secretlab.ca> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 46 On Tue, 31 Mar 2015 13:03:05 +0300 , Pantelis Antoniou wrote: > > +Device tree nodes: > > + > > + %pOn[fnpPcCFr] > > + > > + For printing device tree nodes. The optional arguments are: > > + f device node full_name > > + n device node name > > + p device node phandle > > + P device node path spec (name + @unit) > > + F device node flags > > + c major compatible string > > + C full compatible string > > + Without any arguments prints full_name (same as %pOnf) > > + The separator when using multiple arguments is ‘:’ > ^ separator is ‘.' > > + > > > + Examples: > > + > > + %pOn /foo/bar@0 - Node full name > > + %pOnf /foo/bar@0 - Same as above > > + %pOnfp /foo/bar@0:10 - Node full name + phandle > > + %pOnfcF /foo/bar@0:foo,device:--P- - Node full name + > > + major compatible string + > > + node flags > > + D - dynamic > > + d - detached > > + P - Populated > > + B - Populated bus > > + Thinking about this more, I'd like to suggest a different format that gives us a nice hack on the name that makes it easy to remember: '%pOF[...]' 'O' still means 'object', but it is also overloaded for Open Firmware. That still leaves %pO? for other object types. What do you think? g. -- 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/