On Tue, Jul 16, 2013 at 5:24 PM, Mathieu Poirier
<mathieu.poir...@linaro.org> wrote:
>
>
>
> On 15 July 2013 20:43, Rob Herring <robherri...@gmail.com> wrote:
>>
>> On 07/15/2013 10:36 AM, mathieu.poir...@linaro.org wrote:
>> > From: "Mathieu J. Poirier" <mathieu.poir...@linaro.org>
>> >

[snip]

>> > +     prop = of_find_property(np, "keyset", NULL);
>> > +     if (!prop || !prop->value) {
>> > +             pr_err("Invalid input keyset");
>> > +             goto out;
>> > +     }
>> > +
>> > +     count = prop->length / sizeof(u32);
>> > +     val = prop->value;
>>
>> None of the existing helpers to retrieve property arrays doesn't work
>> here?
>
>
> The problem here is that we never know how long the sequence will be.  As
> such the 'of_property_read_uXY_array' functions won't work.  Or maybe you're
> referring to another set of helpers... If so, please clarify.

What about of_property_for_each_u32? Or we should make
of_property_read_uXY_array work with arrays that can be less than some
max size.

Rob
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to