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]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux