Re: [PATCH 2/2] Input: st1232 - switch to gpiod API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux