linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Phil Reid <preid@electromag.com.au>
Cc: Justin Chen <justinpopo6@gmail.com>,
	linux-iio@vger.kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net,
	lars@metafoo.de, andriy.shevchenko@linux.intel.com,
	david@lechnology.com, Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: ti-ads7950.c GPIO Pins
Date: Sat, 26 Jan 2019 17:43:15 +0000	[thread overview]
Message-ID: <20190126174315.264a68b1@archlinux> (raw)
In-Reply-To: <41ca1578-9bf4-59f1-758e-346d626b7e8a@electromag.com.au>

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


> 


      reply	other threads:[~2019-01-26 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190126174315.264a68b1@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david@lechnology.com \
    --cc=f.fainelli@gmail.com \
    --cc=justinpopo6@gmail.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=preid@electromag.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).