Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-21 Thread Jonathan Cameron
On Thu, 18 Oct 2018 09:40:00 +0200 Lars-Peter Clausen wrote: > On 10/18/2018 09:28 AM, Phil Reid wrote: > [...] > >> +    chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); > >> +    if (IS_ERR(chip->rdwr_pin)) { > >> +    ret = PTR_ERR(chip->rdwr_pin); > >> +    dev_err(&s

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-18 Thread Lars-Peter Clausen
On 10/18/2018 09:28 AM, Phil Reid wrote: [...] >> +    chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); >> +    if (IS_ERR(chip->rdwr_pin)) { >> +    ret = PTR_ERR(chip->rdwr_pin); >> +    dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n", >> +    ret); >>

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-18 Thread Phil Reid
On 17/10/2018 10:47 PM, Nishad Kamdar wrote: Use the gpiod interface for rdwr_pin, convert_pin and busy_pin instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v2: - Correct the error messages as pin number being showed has now been replaced

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Dan Carpenter
On Wed, Oct 17, 2018 at 10:58:23AM -0400, Sasha Levin wrote: > On Wed, Oct 17, 2018 at 08:17:20PM +0530, Nishad Kamdar wrote: > > + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); > > + if (IS_ERR(chip->rdwr_pin)) { > > + ret = PTR_ERR(chip->rdwr_pin); > > +

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Sasha Levin
On Wed, Oct 17, 2018 at 08:17:20PM +0530, Nishad Kamdar wrote: + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); + if (IS_ERR(chip->rdwr_pin)) { + ret = PTR_ERR(chip->rdwr_pin); + dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n",

Re: [PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Lars-Peter Clausen
On 10/17/2018 04:47 PM, Nishad Kamdar wrote: > Use the gpiod interface for rdwr_pin, convert_pin and busy_pin > instead of the deprecated old non-descriptor interface. > > Signed-off-by: Nishad Kamdar Acked-by: Lars-Peter Clausen Thanks. > --- > Changes in v2: > - Correct the error messages

[PATCH v2] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-10-17 Thread Nishad Kamdar
Use the gpiod interface for rdwr_pin, convert_pin and busy_pin instead of the deprecated old non-descriptor interface. Signed-off-by: Nishad Kamdar --- Changes in v2: - Correct the error messages as pin number being showed has now been replaced by error code. --- drivers/staging/iio/adc/ad78