Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-12 Thread Jonathan Cameron
On Mon, 11 Feb 2019 12:17:37 -0800 Justin Chen wrote: > On Mon, Feb 11, 2019 at 12:06 PM Jonathan Cameron wrote: > > > > On Sat, 9 Feb 2019 12:56:11 -0600 > > David Lechner wrote: > > > > > On 2/9/19 11:00 AM, Jonathan Cameron wrote: > > > > Nope. This is a state lock used to protect again

Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-11 Thread Justin Chen
On Mon, Feb 11, 2019 at 12:06 PM Jonathan Cameron wrote: > > On Sat, 9 Feb 2019 12:56:11 -0600 > David Lechner wrote: > > > On 2/9/19 11:00 AM, Jonathan Cameron wrote: > > > Nope. This is a state lock used to protect against transitions between > > > different modes of the IIO device (buffered v

Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-11 Thread Jonathan Cameron
On Sat, 9 Feb 2019 12:56:11 -0600 David Lechner wrote: > On 2/9/19 11:00 AM, Jonathan Cameron wrote: > > Nope. This is a state lock used to protect against transitions between > > different modes of the IIO device (buffered vs polled), it > > isn't suitable for general use. > > > > The driver s

Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-11 Thread Linus Walleij
Hi Justin, thanks for your patch! On Fri, Feb 8, 2019 at 8:25 PM wrote: > From: Justin Chen > > The ADS79XX has GPIO pins that can be used. Add support for the GPIO > pins using the GPIO chip framework. > > Signed-off-by: Justin Chen (...) > @@ -56,11 +61,17 @@ struct ti_ads7950_state { >

Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-09 Thread David Lechner
On 2/9/19 11:00 AM, Jonathan Cameron wrote: Nope. This is a state lock used to protect against transitions between different modes of the IIO device (buffered vs polled), it isn't suitable for general use. The driver should be modified to handle that correctly. We have iio_claim_direct_mode etc

Re: [PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-09 Thread Jonathan Cameron
On Fri, 8 Feb 2019 11:24:16 -0800 justinpo...@gmail.com wrote: > From: Justin Chen > > The ADS79XX has GPIO pins that can be used. Add support for the GPIO > pins using the GPIO chip framework. > > Signed-off-by: Justin Chen Hi Justin, Unfortunately the existing driver is making incorrect u

[PATCH] iio: adc: ti-ads7950: add GPIO support

2019-02-08 Thread justinpopo6
From: Justin Chen The ADS79XX has GPIO pins that can be used. Add support for the GPIO pins using the GPIO chip framework. Signed-off-by: Justin Chen --- drivers/iio/adc/ti-ads7950.c | 166 ++- 1 file changed, 164 insertions(+), 2 deletions(-) diff --gi