[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKkFDDdzHKZrzhSNkBF3+ewq-Vbb_LCOh0shwd9a=COKA@mail.gmail.com>
Date: Tue, 20 Jan 2015 11:13:12 -0600
From: Rob Herring <robherring2@...il.com>
To: Måns Rullgård <mans@...sr.com>
Cc: Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Grant Likely <grant.likely@...retlab.ca>,
Randy Dunlap <rdunlap@...radead.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of: Custom printk format specifier for device node
On Tue, Jan 20, 2015 at 10:05 AM, Måns Rullgård <mans@...sr.com> wrote:
> Pantelis Antoniou <pantelis.antoniou@...sulko.com> writes:
>
>> Hi Geert,
>>
>>> On Jan 20, 2015, at 17:24 , Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>>
>>> On Tue, Jan 20, 2015 at 3:47 PM, Rob Herring <robherring2@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists