From: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
To: Prabhakar Lad <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
dlos
<davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
LDOC <linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Ian Campbell
<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>,
Alex Elder <alex.elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
LAK
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH v4 4/6] gpio: davinci: add OF support
Date: Tue, 5 Nov 2013 18:59:27 +0200 [thread overview]
Message-ID: <527923EF.4070602@ti.com> (raw)
In-Reply-To: <CA+V-a8uV0g36LoQtxFjR56SaMxj7KOE2ztC+pfT_Pn1wGcqEmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 11/05/2013 10:53 AM, Prabhakar Lad wrote:> Hi Grygorii,
>
> Thanks for the review.
>
> On Mon, Nov 4, 2013 at 11:58 PM, Grygorii Strashko
> <grygorii.strashko-l0cyMroinI0@public.gmane.org> wrote:
>> Hi Prabhakar Lad,
>>
>>
>> On 11/02/2013 05:39 PM, Lad, Prabhakar wrote:
>>>
>>> From: KV Sujith <sujithkv-l0cyMroinI0@public.gmane.org>
>>>
>>> This patch adds OF parser support for davinci gpio
>>> driver and also appropriate documentation in gpio-davinci.txt
>>> located at Documentation/devicetree/bindings/gpio/.
>>
>>
>> I worry, do we need to have gpio_chip.of_xlate() callback implemented?
>
> I looked for the other OF GPIO implementations with same "ngpio"
> property (marvel, msm) but I don’t see of_xlate() callback implemented.
The question: will below definitions in DT work or not after this series?
Will of_get_gpio()/of_get_named_gpio() work?
Example1 - leds:
leds {
compatible = "gpio-leds";
debug0 {
label = "green:debug0";
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
};
};
Example2 - any dev:
devA {
compatible = "devA";
gpios = <&gpio 120 GPIO_ACTIVE_LOW>;
}
>
>> - From one side, Davinci GPIO controller in DT described by one entry
>> which defines number of supported GPIOs as "ti,ngpio = <144>;"
>>
>> - From other side, on Linux level more than one gpio_chip objects are
>> instantiated (one per each 32 GPIO).
>>
>> How the standard GPIO biding will work in this case? .. And will they?
>>
>> Linus, I'd very appreciate if you will be able to clarify this point.
>>
>>
>>>
>>> Signed-off-by: KV Sujith <sujithkv-l0cyMroinI0@public.gmane.org>
>>> Signed-off-by: Philip Avinash <avinashphilip-l0cyMroinI0@public.gmane.org>
>>> [prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org: simplified the OF code, removed
>>> unnecessary DT property and also simplified
>>> the commit message]
>>> Signed-off-by: Lad, Prabhakar <prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> ---
>>> .../devicetree/bindings/gpio/gpio-davinci.txt | 32
++++++++++++
>>> drivers/gpio/gpio-davinci.c | 54
>>> ++++++++++++++++++--
>>> 2 files changed, 83 insertions(+), 3 deletions(-)
>>> create mode 100644
>>> Documentation/devicetree/bindings/gpio/gpio-davinci.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
>>> b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
>>> new file mode 100644
>>> index 0000000..55aae1c
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt
>>> @@ -0,0 +1,32 @@
>>> +Davinci GPIO controller bindings29
>>> +
>>> +Required Properties:
>>> +- compatible: should be "ti,dm6441-gpio"
>>> +
>>> +- reg: Physical base address of the controller and the size of memory
>>> mapped
>>> + registers.
>>> +
>>> +- gpio-controller : Marks the device node as a gpio controller.
>>> +
>>> +- interrupts: Array of GPIO interrupt number.
>>
>>
>> May be meaning of <interrupts> property need to be extended, because,
>> as of now, only banked or unbanked IRQs are supported - and not both.
>>
>>
> OK
>
>>> +
>>> +- ti,ngpio: The number of GPIO pins supported.
>>> +
>>> +- ti,davinci-gpio-unbanked: The number of GPIOs that have an
individual
>>> interrupt
>>> + line to processor.
>>
>>
>> Should interrupt-controller; specifier be added here?
>>
> No
So, it would be impossible to map GPIO IRQ to device through DT. Right?
Like:
devX@0 {
compatible = "devX";
interrupt-parent = <&gpio>;
interrupts = <50 IRQ_TYPE_EDGE_FALLING>; /* gpio line 50 */
};
>
>>
>>> +
>>> +Example:
>>> +
>>> +gpio: gpio@1e26000 {
>>> + compatible = "ti,dm6441-gpio";
>>> + gpio-controller;
>>> + reg = <0x226000 0x1000>;
>>> + interrupts = <42 IRQ_TYPE_EDGE_BOTH 43 IRQ_TYPE_EDGE_BOTH
>>> + 44 IRQ_TYPE_EDGE_BOTH 45 IRQ_TYPE_EDGE_BOTH
>>> + 46 IRQ_TYPE_EDGE_BOTH 47 IRQ_TYPE_EDGE_BOTH
>>> + 48 IRQ_TYPE_EDGE_BOTH 49 IRQ_TYPE_EDGE_BOTH
>>> + 50 IRQ_TYPE_EDGE_BOTH>;
>>> + ti,ngpio = <144>;
>>> + ti,davinci-gpio-irq-base = <101>;
>>
>>
>> ^^ Is it still needed?
>>
> OOps missed to remove that.
>
Regards,
-grygorii
next prev parent reply other threads:[~2013-11-05 16:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-02 15:39 [PATCH v4 0/6] gpio: daVinci: Fixes and feature enhancement Lad, Prabhakar
2013-11-02 15:39 ` [PATCH v4 1/6] gpio: davinci: Fixed a check for unbanked gpio Lad, Prabhakar
2013-11-05 12:39 ` Linus Walleij
2013-11-06 9:33 ` Prabhakar Lad
2013-11-06 9:56 ` Linus Walleij
2013-11-06 10:15 ` Prabhakar Lad
[not found] ` <CA+V-a8tZTm9bh+arQ+uFyTVHxfdf07bWaM_Sdqo08TO=UCMMUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-06 10:49 ` Sekhar Nori
[not found] ` <527A1EC7.20400-l0cyMroinI0@public.gmane.org>
2013-11-06 11:33 ` Grygorii Strashko
[not found] ` <527A28EF.9070601-l0cyMroinI0@public.gmane.org>
2013-11-06 11:42 ` Sekhar Nori
2013-11-06 11:36 ` Linus Walleij
2013-11-02 15:39 ` [PATCH v4 2/6] gpio: davinci: remove unnecessary printk Lad, Prabhakar
2013-11-02 15:39 ` [PATCH v4 4/6] gpio: davinci: add OF support Lad, Prabhakar
[not found] ` <1383406775-14902-5-git-send-email-prabhakar.csenng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-04 18:28 ` Grygorii Strashko
2013-11-05 8:53 ` Prabhakar Lad
[not found] ` <CA+V-a8uV0g36LoQtxFjR56SaMxj7KOE2ztC+pfT_Pn1wGcqEmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-05 16:59 ` Grygorii Strashko [this message]
2013-11-06 10:08 ` Prabhakar Lad
[not found] ` <CA+V-a8tJ7yDJOPamoCiaX6Twnnqxp_o_L0rzo2dEeSDS2VoYLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-06 11:55 ` Grygorii Strashko
[not found] ` <1383406775-14902-1-git-send-email-prabhakar.csenng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-02 15:39 ` [PATCH v4 3/6] gpio: davinci: use irqdomain Lad, Prabhakar
[not found] ` <1383406775-14902-4-git-send-email-prabhakar.csenng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-04 18:27 ` Grygorii Strashko
2013-11-05 8:00 ` Prabhakar Lad
2013-11-02 15:39 ` [PATCH v4 5/6] ARM: davinci: da850: add GPIO DT node Lad, Prabhakar
2013-11-02 15:39 ` [PATCH v4 6/6] ARM: davinci: da850 evm: add GPIO pinumux entries " Lad, Prabhakar
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=527923EF.4070602@ti.com \
--to=grygorii.strashko-l0cymroini0@public.gmane.org \
--cc=alex.elder-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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).