LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: "Måns Rullgård" <mans@mansr.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Randy Dunlap <rdunlap@infradead.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] of: Custom printk format specifier for device node
Date: Tue, 20 Jan 2015 11:13:12 -0600	[thread overview]
Message-ID: <CAL_JsqKkFDDdzHKZrzhSNkBF3+ewq-Vbb_LCOh0shwd9a=COKA@mail.gmail.com> (raw)
In-Reply-To: <yw1x8ugxe8t9.fsf@unicorn.mansr.com>

On Tue, Jan 20, 2015 at 10:05 AM, Måns Rullgård <mans@mansr.com> wrote:
> Pantelis Antoniou <pantelis.antoniou@konsulko.com> writes:
>
>> Hi Geert,
>>
>>> On Jan 20, 2015, at 17:24 , Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>>>
>>> On Tue, Jan 20, 2015 at 3:47 PM, Rob Herring <robherring2@gmail.com> wrote:
>>>>> +       Examples:
>>>>> +
>>>>> +       %pO     /foo/bar@0              - Node full name
>>>>> +       %pO0    /foo/bar@0              - Same as above
>>>>> +       %pO1    /foo/bar@0[10]          - Node full name + phandle
>>>>> +       %pO2    /foo/bar@0[10:DdPB]     - Node full name + phandle + node flags
>>>>> +                                        D - dynamic
>>>>> +                                        d - detached
>>>>> +                                        P - Populated
>>>>> +                                        B - Populated bus
>>>>
>>>> We should think about what else we want to print for a node. Perhaps
>>>> 'On' for name, 'Oc' for compatible, etc.
>>>
>>> I was just going to say "The least verbose variant is name, not full_name”.
>>>
>>
>> Unfortunately in the context of device tree nodes ‘name' is usually
>> not what you want to print to identify the node in question. ‘name’ is
>> usually not unique.
>
> Name and address without the full path is usually a good compromise
> between uniqueness (it is usually unique for memory-mapped things) and
> verbosity.

How much of the address is in the name depends on how the address
translation is done. I don't think we really need to do full address
translations here.

%pOn     /foo/bar@0              - Node full name
%pOn0   bar@0              - Node name and unit address
%pOn1    /foo/bar@0[10]          - Node full name + phandle
%pOn2    /foo/bar@0[10:DdPB]     - Node full name + phandle + node flags
%pOc      vendor,foo-bar          - Most significant compatible string

We could do phandle and/or node flags as separate specifiers such as
%pOf for flags.

I'm not proposing implementing all these now, but just want to make
sure we have a structure to do so later.

Rob

  reply	other threads:[~2015-01-20 17:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 14:34 Pantelis Antoniou
2015-01-20 14:47 ` Rob Herring
2015-01-20 14:52   ` Pantelis Antoniou
2015-01-20 17:59     ` Joe Perches
2015-01-20 18:06       ` Pantelis Antoniou
2015-01-20 18:16         ` Joe Perches
2015-01-20 15:24   ` Geert Uytterhoeven
2015-01-20 15:27     ` Pantelis Antoniou
2015-01-20 16:05       ` Måns Rullgård
2015-01-20 17:13         ` Rob Herring [this message]
2015-01-21 17:06 Pantelis Antoniou
2015-01-21 17:37 ` Joe Perches
2015-01-21 17:39   ` Pantelis Antoniou
2015-01-21 17:52     ` Joe Perches
2015-01-21 17:59     ` Måns Rullgård
2015-01-22 20:31   ` Pantelis Antoniou
2015-03-30 19:04     ` Grant Likely
2015-03-31 10:03       ` Pantelis Antoniou
2015-03-31 17:02         ` Grant Likely
2015-03-31 17:14           ` Pantelis Antoniou
2015-04-01  4:52         ` Grant Likely
2015-04-01  5:07           ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqKkFDDdzHKZrzhSNkBF3+ewq-Vbb_LCOh0shwd9a=COKA@mail.gmail.com' \
    --to=robherring2@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mans@mansr.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=rdunlap@infradead.org \
    --subject='Re: [PATCH] of: Custom printk format specifier for device node' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).