[PATCH] dt: add helper function to read u8 & u16 variables & arrays

Rob Herring robherring2 at gmail.com
Fri Oct 26 00:19:01 EST 2012


On 10/25/2012 02:03 AM, Viresh Kumar wrote:
> On 12 October 2012 23:31, Viresh Kumar <viresh.kumar at linaro.org> wrote:
>> This adds following helper routines:
>> - of_property_read_u8_array()
>> - of_property_read_u16_array()
>> - of_property_read_u8()
>> - of_property_read_u16()
>>
>> First two actually share most of the code with of_property_read_u32_array(), so
>> the common part is taken out into a macro, which can be used by all three
>> *_array() routines.
> 
> Hi Rob,
> 
> Any comment here?

For some reason, this does not show up on the list either in my mail or
mail list archives, but it is in patchwork. Can you resend it please.

The main question I have is be32_to_cpup() the right thing to do. I
would expect byte arrays to not need endian conversion, but I haven't
looked at how '/bits/ x' data is stored.

Rob


More information about the devicetree-discuss mailing list