devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Marek Belisko <marek@goldelico.com>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"neilb@suse.de" <neilb@suse.de>,
	"hns@goldelico.com" <hns@goldelico.com>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	Pawel Moll <Pawel.Moll@arm.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	"rob@landley.net" <rob@landley.net>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq.
Date: Fri, 15 Nov 2013 15:30:15 +0000	[thread overview]
Message-ID: <20131115153015.GD24831@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1384465609-26485-3-git-send-email-marek@goldelico.com>

On Thu, Nov 14, 2013 at 09:46:48PM +0000, Marek Belisko wrote:
> Signed-off-by: Marek Belisko <marek@goldelico.com>
> ---
>  Documentation/devicetree/bindings/misc/bmp085.txt |  8 ++++
>  drivers/misc/bmp085.c                             | 53 ++++++++++++++++++++---
>  2 files changed, 55 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/misc/bmp085.txt b/Documentation/devicetree/bindings/misc/bmp085.txt
> index 91dfda2..c6033d5 100644
> --- a/Documentation/devicetree/bindings/misc/bmp085.txt
> +++ b/Documentation/devicetree/bindings/misc/bmp085.txt
> @@ -8,6 +8,9 @@ Optional properties:
>  - temp-measurement-period: temperature measurement period (milliseconds)
>  - default-oversampling: default oversampling value to be used at startup,
>    value range is 0-3 with rising sensitivity.
> +- gpio: if device is using EOC irq line gpio can be specified to setup interrupt
> +  handling
> +- irq: interrupt with no gpio
>  
>  Example:
>  
> @@ -17,4 +20,9 @@ pressure@77 {
>  	chip-id = <10>;
>  	temp-measurement-period = <100>;
>  	default-oversampling = <2>;
> +	gpio = <&gpio0 17 0>;
> +
> +	OR
> +
> +	irq = <75>;

There's some contention over the description of gpio-based IRQs in DT.
>From the point of view of the device there is a logical IRQ output; the
fact that this happens to be wired up to a GPIO pin that can happen to
generate interrupts isn't anything to do with the device itself. There
are plenty of device we have now whose interrupt lines could be wired to
GPIOs. I see no reason to extend their bindings to support explicit
GPIOs for IRQs, and I see no reason the driver should have to handle
this.

It would be far nicer for the device binding to just have the interrupts
property, and for the gpio controller to act as an interrupt-controller,
with the appropriate pin management.

Thanks,
Mark.

  parent reply	other threads:[~2013-11-15 15:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 21:46 [PATCH 0/3] Add EOC handling for bmp085 + DT and platform data updates Marek Belisko
     [not found] ` <1384465609-26485-1-git-send-email-marek-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2013-11-14 21:46   ` [PATCH 1/3] misc: bmp085: Clean up and enable use of interrupt for completion Marek Belisko
2013-11-14 21:46   ` [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq Marek Belisko
2013-11-15 13:56     ` Arnd Bergmann
2013-11-15 15:30     ` Mark Rutland [this message]
2013-11-15 18:47       ` Arnd Bergmann
2013-11-18  8:58       ` Belisko Marek
     [not found]         ` <CAAfyv346pUa9k3+9jdBX+EK8cV9GenaBxrAnVnKsbUPBoNBqrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-18 11:38           ` Arnd Bergmann
     [not found]             ` <201311181238.40349.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-18 17:17               ` Gerhard Sittig
     [not found]                 ` <20131118171747.GM17929-kDjWylLy9wD0K7fsECOQyeGNnDKD8DIp@public.gmane.org>
2013-11-18 22:28                   ` Arnd Bergmann
     [not found]                     ` <201311182328.40743.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-20 21:34                       ` [PATCH v1 1/1] dt: binding: reword PowerPC 8xxx GPIO documentation Gerhard Sittig
     [not found]                         ` <1384983293-11002-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-11-20 23:50                           ` Rob Herring
     [not found]                             ` <CAL_JsqJvxA240QEreWPp2L+eNFQmhp0XV=qmO4QXqTga+RFuCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-21  8:30                               ` Gerhard Sittig
2013-11-21  0:49                           ` Arnd Bergmann
     [not found]                             ` <201311210149.43944.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-21  8:34                               ` Gerhard Sittig
2013-11-21  8:41                           ` [PATCH v2 " Gerhard Sittig
     [not found]                             ` <1385023304-15396-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-12-03  6:02                               ` Rob Herring
2013-11-20 23:23                       ` [PATCH 2/3] misc: bmp085: Add DT bindings for EOC gpio line and direct irq Gerhard Sittig
2013-11-14 21:46 ` [PATCH 3/3] misc: bmp085: Add missing platform data Marek Belisko
2013-11-15 13:58   ` Arnd Bergmann
2013-11-16  8:23     ` Dr. H. Nikolaus Schaller

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=20131115153015.GD24831@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=Pawel.Moll@arm.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hns@goldelico.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=neilb@suse.de \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --cc=swarren@wwwdotorg.org \
    /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).