[PATCH v4] Input: sysrq - DT binding for key sequence

Rob Herring robherring2 at gmail.com
Wed Jul 17 12:17:51 EST 2013


On Tue, Jul 16, 2013 at 5:24 PM, Mathieu Poirier
<mathieu.poirier at linaro.org> wrote:
>
>
>
> On 15 July 2013 20:43, Rob Herring <robherring2 at gmail.com> wrote:
>>
>> On 07/15/2013 10:36 AM, mathieu.poirier at linaro.org wrote:
>> > From: "Mathieu J. Poirier" <mathieu.poirier at 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


More information about the devicetree-discuss mailing list