linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ti-ads7950.c GPIO Pins
@ 2019-01-23 19:36 Justin Chen
  2019-01-24  1:46 ` Phil Reid
  0 siblings, 1 reply; 3+ messages in thread
From: Justin Chen @ 2019-01-23 19:36 UTC (permalink / raw)
  To: linux-iio
  Cc: jic23, knaack.h, pmeerw, lars, andriy.shevchenko, david,
	Florian Fainelli

Hello,

I have an use case where I need to configure the 4 GPIO pins on a
ADS7953. The current driver does not support this. What would be the
proper way to implement this?

I created an IIO_VOLTAGE channel for each GPIO to enable or disable
them, but this doesn't seem right to me.

Any suggestions?

Thanks,
Justin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ti-ads7950.c GPIO Pins
  2019-01-23 19:36 ti-ads7950.c GPIO Pins Justin Chen
@ 2019-01-24  1:46 ` Phil Reid
  2019-01-26 17:43   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Reid @ 2019-01-24  1:46 UTC (permalink / raw)
  To: Justin Chen, linux-iio
  Cc: jic23, knaack.h, pmeerw, lars, andriy.shevchenko, david,
	Florian Fainelli

On 24/01/2019 3:36 am, Justin Chen wrote:
> Hello,
> 
> I have an use case where I need to configure the 4 GPIO pins on a
> ADS7953. The current driver does not support this. What would be the
> proper way to implement this?
> 
> I created an IIO_VOLTAGE channel for each GPIO to enable or disable
> them, but this doesn't seem right to me.
> 
> Any suggestions?
G'day Justin,


What about using the existing gpio framework.
see iio/adc/stx104.c for an existing example
search for gpiochip


-- 
Regards
Phil

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ti-ads7950.c GPIO Pins
  2019-01-24  1:46 ` Phil Reid
@ 2019-01-26 17:43   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2019-01-26 17:43 UTC (permalink / raw)
  To: Phil Reid
  Cc: Justin Chen, linux-iio, knaack.h, pmeerw, lars,
	andriy.shevchenko, david, Florian Fainelli

On Thu, 24 Jan 2019 09:46:48 +0800
Phil Reid <preid@electromag.com.au> wrote:

> On 24/01/2019 3:36 am, Justin Chen wrote:
> > Hello,
> > 
> > I have an use case where I need to configure the 4 GPIO pins on a
> > ADS7953. The current driver does not support this. What would be the
> > proper way to implement this?
> > 
> > I created an IIO_VOLTAGE channel for each GPIO to enable or disable
> > them, but this doesn't seem right to me.
> > 
> > Any suggestions?  
> G'day Justin,
> 
> 
> What about using the existing gpio framework.
> see iio/adc/stx104.c for an existing example
> search for gpiochip
> 

Absolutely.  Should register with the normal kernel gpio subsystem.
Make sure to also cc the Gpio maintainer and appropriate mailing lists
alongside IIO.  May also need some bindings to explicitly make those
pins GPIOs given they look multipurpose...  Although the driver
doesn't (I think) support any of those other uses yet, we need to
make sure any devicetree bindings allow for them in a clean fashion
and that any such bindings are optional.

Thanks,

Jonathan


> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-26 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 19:36 ti-ads7950.c GPIO Pins Justin Chen
2019-01-24  1:46 ` Phil Reid
2019-01-26 17:43   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).