linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tien Hock Loh <thloh@altera.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: thloh.linux@gmail.com, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Joe Perches <joe@perches.com>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Antti Palosaari <crope@iki.fi>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Dinh Nguyen <dinguyen@altera.com>
Subject: Re: [PATCH v8 1/2] drivers/gpio: Altera soft IP GPIO driver device tree binding
Date: Thu, 5 Feb 2015 02:26:20 -0800	[thread overview]
Message-ID: <1423131980.1110.11.camel@ubuntu> (raw)
In-Reply-To: <CACRpkdZue+9v2+9wfdOqZhh5rEyxCqy6BMVmADW+qkNZNi2pKw@mail.gmail.com>

On Wed, 2015-01-14 at 11:01 +0100, Linus Walleij wrote:
> On Wed, Dec 24, 2014 at 9:22 AM,  <thloh@altera.com> wrote:
> 
> > From: Tien Hock Loh <thloh@altera.com>
> >
> > Adds a new driver device tree binding for Altera soft GPIO IP
> >
> > Signed-off-by: Tien Hock Loh <thloh@altera.com>
> > ---
> >  .../devicetree/bindings/gpio/gpio-altera.txt       |   43 ++++++++++++++++++++
> >  1 files changed, 43 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-altera.txt
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/gpio-altera.txt b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
> > new file mode 100644
> > index 0000000..649fa02
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
> > @@ -0,0 +1,43 @@
> > +Altera GPIO controller bindings
> > +
> > +Required properties:
> > +- compatible:
> > +  - "altr,pio-1.0"
> > +- reg: Physical base address and length of the controller's registers.
> > +- #gpio-cells : Should be 2
> 
> Yeah.
> 
> > +  - The first cell is the gpio offset number.
> > +  - The second cell is reserved and is currently unused.
> > +- gpio-controller : Marks the device node as a GPIO controller.
> > +- interrupt-controller: Mark the device node as an interrupt controller
> > +- #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware.
> > +  - The first cell is the GPIO offset number within the GPIO controller.
> > +- interrupts: Specify the interrupt.
> > +- altr,interrupt-trigger: Specifies the interrupt trigger type the GPIO
> > +  hardware is synthesized. This field is required if the Altera GPIO controller
> > +  used has IRQ enabled as the interrupt type is not software controlled,
> > +  but hardware synthesized. Required if GPIO is used as an interrupt
> > +  controller. The value is defined in <dt-bindings/interrupt-controller/irq.h>
> > +  Only the following flags are supported:
> > +    IRQ_TYPE_EDGE_RISING
> > +    IRQ_TYPE_EDGE_FALLING
> > +    IRQ_TYPE_EDGE_BOTH
> > +    IRQ_TYPE_LEVEL_HIGH
> > +
> > +Optional properties:
> > +- altr,ngpio: Width of the GPIO bank. This defines how many pins the
> > +  GPIO device has. Ranges between 1-32. Optional and defaults to 32 is not
> > +  specified.
> > +
> > +Example:
> > +
> > +gpio_altr: gpio@0xff200000 {
> > +       compatible = "altr,pio-1.0";
> > +       reg = <0xff200000 0x10>;
> > +       interrupts = <0 45 4>;
> > +       altr,ngpio = <32>;
> > +       altr,interrupt_trigger = <IRQ_TYPE_EDGE_RISING>;
> > +       #gpio-cells = <1>;
> 
> So why is there one cell in the example?
> 
> I know the second cell will describe the interrupt type that is
> anyway hardcoded but yeah, I guess it is best to work
> like all other controllers.
> 
> If you actually want it onecell that is fine too.

It should be set to two cells, I'll update this.

> 
> Yours,
> Linus Walleij

Regards
Tien Hock Loh

  reply	other threads:[~2015-02-05 10:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24  8:22 [PATCH v8 0/2] drivers/gpio: Altera soft IP GPIO driver thloh
     [not found] ` <1419409345-8297-1-git-send-email-thloh-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2014-12-24  8:22   ` [PATCH v8 1/2] drivers/gpio: Altera soft IP GPIO driver device tree binding thloh-EIB2kfCEclfQT0dZR+AlfA
2015-01-14 10:01     ` Linus Walleij
2015-02-05 10:26       ` Tien Hock Loh [this message]
2014-12-24  8:22 ` [PATCH v8 2/2] drivers/gpio: Altera soft IP GPIO driver thloh
2014-12-24 11:04   ` Joe Perches
     [not found]     ` <1419419050.6157.11.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2015-02-05 10:32       ` Tien Hock Loh
2015-01-14  9:58   ` Linus Walleij
     [not found]     ` <CACRpkdZ1kTjq979RbxzUSsb88v8XKjXRhRCpPkgS2wHrCcPGkg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-06  2:54       ` Tien Hock Loh
2015-02-11  8:20         ` Tien Hock Loh
2015-03-05  9:37           ` Linus Walleij

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=1423131980.1110.11.camel@ubuntu \
    --to=thloh@altera.com \
    --cc=akpm@linux-foundation.org \
    --cc=crope@iki.fi \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@altera.com \
    --cc=galak@codeaurora.org \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=joe@perches.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@osg.samsung.com \
    --cc=pawel.moll@arm.com \
    --cc=thloh.linux@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).