lkml.org 
[lkml]   [2011]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] dt: add of_get_property_value32 helper function
On Thu, Jun 23, 2011 at 10:38 AM, Rob Herring <robherring2@gmail.com> wrote:
> From: Rob Herring <rob.herring@calxeda.com>
>
> A common use of of_get_property in driver is to just get a 32-bit integer
> value, but the interface is a bit complicated in that case. Add a helper
> function that just fills in the value.

Hey Rob,

I already asked Thomas Abraham to write a patch that does exactly
this. He's already posted his first draft to the list. His version
also covers u64 and strings, so I'm going to let him respin his
version and pick that one up.

> Grant,
>
> I noticed most callers of of_get_property don't do be32_to_cpup on the
> returned pointer. Most instances appear to be powerpc only drivers, but
> should of_get_property return ptr be __be32?

No. Not all properties contain cell values. Having of_get_property
return void* is the correct behaviour.

g.


\
 
 \ /
  Last update: 2011-06-23 22:15    [W:0.052 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site