On Tue, Jul 16, 2013 at 5:24 PM, Mathieu Poirier
<[email protected]> wrote:
>
>
>
> On 15 July 2013 20:43, Rob Herring <[email protected]> wrote:
>>
>> On 07/15/2013 10:36 AM, [email protected] wrote:
>> > From: "Mathieu J. Poirier" <[email protected]>
>> >
[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
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss