Re: [PATCH v2 1/2] staging: iio: ad7780: add gain & filter gpio support

From: Renato Lui Geh
Date: Fri Feb 01 2019 - 12:55:26 EST


On 02/01, Popa, Stefan Serban wrote:

Adding support for gpios, normally doesn't have anything to do with
theÂinformation stored in the iio_chan_spec struct.
Also, we need to try to work with the already defined attributes. In your
case, setting the gain GPIO is equivalent to modifying the scale, while
setting the filter GPIO results in a change in sampling frequency.
Therefore, we need use a macro which has the IIO_CHAN_INFO_SCALE and
IIO_CHAN_INFO_FREQUENCY flags set. I think AD_SD_CHANNEL should do just
fine.
I hope this answers your question.
-Stefan

It does. Thank you. :)