[PATCH] gpio: stmpe: Add DT support for stmpe gpio

Viresh Kumar viresh.kumar at linaro.org
Fri Nov 23 23:25:28 EST 2012


On 23 November 2012 17:44, Lee Jones <lee.jones at linaro.org> wrote:
> I'm saying, just leave it where it is.

So you are suggesting this code:

        stmpe_gpio->chip.base = pdata ? pdata->gpio_base : -1;

       if (pdata)
               stmpe_gpio->norequest_mask = pdata->norequest_mask;
       else if (np)
               of_property_read_u32(np, "st,norequest-mask",
&pdata->norequest_mask);

Right? Then yes i can do it.

>> >> +             if (np)
>> >> +                     of_property_read_u32(np, "st,norequest-mask",
>> >> +                                     &pdata->norequest_mask);
>> >
>> > Can you explain to me what this does?
>>
>> You mean pdata->norequest_mask?  It marks few gpios as unusable.
>> Because these pads might be used by other blocks of stmpe.
>
> I'm not sure if that should be set with DT or not.
>
> Second opinion anyone?

Why i kept it in DT is because it is board dependent and there is no better
way of communicating this from board to driver.

--
viresh


More information about the devicetree-discuss mailing list