From: Baruch Siach <baruch@tkos.co.il>
To: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: xuwei5@hisilicon.com, linus.walleij@linaro.org,
grant.likely@linaro.org, robh+dt@kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: pl061: get gpio base from alias id
Date: Tue, 22 Apr 2014 06:44:17 +0300 [thread overview]
Message-ID: <20140422034417.GA4652@tarshish> (raw)
In-Reply-To: <1398130543-19454-1-git-send-email-haojian.zhuang@linaro.org>
Hi Haojian Zhuang,
On Tue, Apr 22, 2014 at 09:35:42AM +0800, Haojian Zhuang wrote:
> If gpio base number isn't specified, the gpio base will be find from
> the end of gpio number. In order to keep with schematics, use alias
> to get the ID of gpio chip.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
> ---
> .../devicetree/bindings/gpio/gpio-pl061.txt | 31 ++++++++++++++++++++++
Binding documentation should be done in a separate patch.
> drivers/gpio/gpio-pl061.c | 14 +++++++++-
> 2 files changed, 44 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-pl061.txt
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-pl061.txt b/Documentation/devicetree/bindings/gpio/gpio-pl061.txt
> new file mode 100644
> index 0000000..164b5ba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/gpio-pl061.txt
> @@ -0,0 +1,31 @@
> +PL061 GPIO controller bindings
> +
> +Required properties:
> +- compatible:
> + - "arm,pl061", "arm,primecell".
> +- #gpio-cells : Should be two.
> + - first cell is the gpio pin number
> + - second cell is used to specify the gpio polarity:
> + 0 = active high
> + 1 = active low
> +- gpio-controller : Marks the device node as a GPIO controller.
> +- interrupt-controller : Marks the device node as an interrupt controller.
> +- #interrupt-cells : Should be two.
> + - first cell is the hw irq number
> + - second cell is used to specify the interrupt type:
> + 0 = default, unspecified type
> + 1 = rising edge triggered
> + 2 = falling edge triggered
> + 4 = high level triggered
> + 8 = low level triggered
> +
> +Example:
> + gpio0: gpio@fc806000 {
> + compatible = "arm,pl061", "arm,primecell";
> + reg = <0xfc806000 0x1000>;
> + interrupts = <0 64 0x4>;
The "interrupts" property should be mentioned above.
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2014-04-22 3:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-22 1:35 [PATCH 1/2] gpio: pl061: get gpio base from alias id Haojian Zhuang
2014-04-22 1:35 ` [PATCH 2/2] ARM: dts: add gpio alias in hi3620 dts file Haojian Zhuang
2014-04-22 3:44 ` Baruch Siach [this message]
2014-04-23 13:21 ` [PATCH 1/2] gpio: pl061: get gpio base from alias id Linus Walleij
2014-04-25 0:27 ` Haojian Zhuang
2014-04-25 9:29 ` Linus Walleij
2014-04-23 18:52 ` Rob Herring
2014-04-25 0:28 ` Haojian Zhuang
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=20140422034417.GA4652@tarshish \
--to=baruch@tkos.co.il \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=haojian.zhuang@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=xuwei5@hisilicon.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).