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

From: Lars-Peter Clausen
Date: Thu Oct 18 2018 - 03:40:40 EST


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);
>> ÂÂÂÂÂÂÂÂÂ return ret;
>> ÂÂÂÂÂ }
>> -ÂÂÂ gpio_direction_input(chip->rdwr_pin);
>
> The RD/WR pin is an input to the AD78xx. So this doesn't make sense being
> GPIOD_IN.

One thing at a time. This patch is a straight forward conversion to the GPIO
descriptor interface. It keeps the existing semantics of the driver as they are.

Now these semantics are obviously wrong and should be fixed but that should
be a separate patch from changing the interface.