lkml.org 
[lkml]   [2015]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] of: Custom printk format specifier for device node
Date
On Tue, 31 Mar 2015 13:03:05 +0300
, Pantelis Antoniou <pantelis.antoniou@konsulko.com>
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.


\
 
 \ /
  Last update: 2015-04-01 07:41    [W:0.106 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site