lkml.org 
[lkml]   [2019]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Input: st1232 - switch to gpiod API
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@ginzinger.com>
> >
> > 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@ginzinger.com>
> > ---
> >
> > 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

\
 
 \ /
  Last update: 2019-02-08 09:06    [W:0.042 / U:12.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site