Re: [PATCH 2/2] Input: st1232 - switch to gpiod API
From: Dmitry Torokhov
Date: Fri Feb 08 2019 - 03:06:02 EST
Hi Martin,
On Tue, Feb 05, 2019 at 11:20:16AM +0100, Martin Kepplinger wrote:
> On 29.01.19 11:23, Martin Kepplinger wrote:
> > From: Martin Kepplinger <martin.kepplinger@xxxxxxxxxxxxx>
> >
> > Use devm_gpiod_get_optional() and gpiod_set_value_cansleep() instead
> > of the old API. The st1232_ts_power() now passes on the inverted "poweron"
> > value to reflect the correct logical value.
> >
> > Signed-off-by: Martin Kepplinger <martin.kepplinger@xxxxxxxxxxxxx>
> > ---
> >
> > Tested and works. thanks for your help Dmitry,
> >
>
> is this what you had in mind? any problems or questions?
Yes, that is what I wanted, with one exception:
> > + ts->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
> > + GPIOD_OUT_HIGH);
This breaks compatibility with old DTSes, please try changing to:
devm_gpiod_get_optional(&client->dev, NULL, GPIOD_OUT_HIGH);
Thanks.
--
Dmitry