devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>,
	SH-Linux <linux-sh@vger.kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: gpio-rcar: DT and IRQ_TYPE_EDGE_BOTH
Date: Wed, 30 Oct 2013 11:20:54 +0100	[thread overview]
Message-ID: <13973433.boY4bClOZK@avalon> (raw)
In-Reply-To: <20131030082608.GB1603@verge.net.au>

Hi Magnus and Simon,

On Wednesday 30 October 2013 17:26:10 Simon Horman wrote:
> On Wed, Oct 30, 2013 at 07:04:46AM +0000, Magnus Damm wrote:
> > On Tue, Oct 29, 2013 at 8:52 AM, Simon Horman <horms@verge.net.au> wrote:
> > > Hi Laurent,
> > > 
> > > In 7e1092b5a264c4 ("gpio-rcar: Add support for IRQ_TYPE_EDGE_BOTH")
> > > I added a 'has_both_edge_trigger' field to struct gpio_rcar_config.
> > > Setting this adds support IRQ_TYPE_EDGE_BOTH. The motivation for
> > > this was to allow use of the gpio-keys driver on the lager board.
> > > 
> > > I am now looking at enabling gpio-keys via DT for koelsch and lager
> > > and find myself needing to set has_both_edge_trigger somehow.
> > > I am wondering if you have any ideas on how best to do this.
> > > 
> > > So far I have two ideas:
> > > 
> > > 1. Expose has_both_edge_trigger as a binding.
> > > 
> > > 2. Set has_both_edge_trigger in the driver if the
> > >    compat string is renesas,gpio-r8a7791 or renesas,gpio-r8a7790
> > >    but not for other supported compat strings (as is currently the
> > >    case).
> > 
> > I think which to pick depends on the type of feature. In the case of
> > enabling both edge support for this GPIO driver, I believe going with
> > 2) is the best way forward. The reason for this is that all GPIO
> > instances within a particular SoC seem to either have or not have
> > support for dual edges. At least that is the case on r8a7790 and
> > r8a7791.
> > 
> > There may be other properties in the future like per-GPIO hardware
> > debounce, and I suspect that those may be more suitable for 1) since
> > they are only supported on a certain set of GPIO pins. So from my POV
> > this is a case by case thing.
> 
> Thanks, that sounds reasonable from my POV.

I agree, let's put have property in the driver.

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-10-30 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29  8:52 gpio-rcar: DT and IRQ_TYPE_EDGE_BOTH Simon Horman
2013-10-30  7:04 ` Magnus Damm
2013-10-30  8:26   ` Simon Horman
2013-10-30 10:20     ` Laurent Pinchart [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=13973433.boY4bClOZK@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horms@verge.net.au \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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).