From: Lee Jones <lee.jones@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: sameo@linux.intel.com, devicetree-discuss@lists.ozlabs.org,
linux-kernel@vger.kernel.org, spear-devel@list.st.com,
Vipul Kumar Samar <vipulkumar.samar@st.com>
Subject: Re: [PATCH V2 2/2] mfd: stmpe: Extend DT support in stmpe driver
Date: Fri, 23 Nov 2012 09:23:28 +0000 [thread overview]
Message-ID: <20121123092328.GB17471@gmail.com> (raw)
In-Reply-To: <CAKohpok6v65TH5yZAthyxcH7bCVgF8A8m2bY_mp3yS_Y_yH1Xw@mail.gmail.com>
On Thu, 22 Nov 2012, Viresh Kumar wrote:
> On 22 November 2012 21:16, Lee Jones <lee.jones@linaro.org> wrote:
> >> >> diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt b/Documentation/devicetree/bindings/mfd/stmpe.txt
> >> >> +- irq-over-gpio: bool, true if gpio is used to get irq
> >> >> +- irq-gpios: gpio number over which irq will be requested (significant only if
> >> >> + irq-over-gpio is true)
> >> >
> >> > You don't need these. Use gpio_to_irq() instead.
> >>
> >> I am passing gpio numbers here and am doing gpio_to_irq() in driver.
> >> Didn't get this one :(
> >
> > For a start you have 'irq-over-gpio' in the binding document and Device Tree
> > and 'irq_over_gpio' in the code. Has it even been tested?
> >
> > GPIOs are used as IRQ lines in many other previously DT:ed drivers. Take a
> > look to see how they are handled without adding unnecessary DT bindings.
>
> I already knew it, should have picked that up. :(
>
> >> stmpe is an interrupt controller for the IP's which are present inside
> >> it: gpio, adc.
> >> But interrupt lines for them are managed by stmpe driver internally. So should
> >> we really add interrupt-controller for it?
> >
> > You can't manage IRQ lines internally, you have to go through
> > the IRQ subsystem. When you request an IRQ via device tree you
> > will do so like this:
>
> By that i meant, there is no external node which would have stmpe as
> interrupt controller. Because all of them would be its child node.
>
> This is guaranteed because stmpe is an external device is present on board.
> So, it will have its entry in board dts file, and so wouldn't be
> scattered in different
> files.
It doesn't matter how it's wired up.
If another node references it as it's IRQ controller you have to
declare it as one using the interrupt-controller binding.
> > The STMPE GPIO controller can't be used by Device Tree yet in any case,
> > because it doesn't have an IRQ domain. This is compulsory, or it won't
> > work. Have you tried to test this functionality yet?
>
> I don't have SPEAr board to test it anymore. I have moved out of ST now and
> working in linaro as ARM asignee. Just pushing these as an part time activity.
Surely you can't push patches which haven't been tested?!
Try to get yourself some hardware. Does anyone near you have an HREF?
In the mean-time, I will write you an IRQ domain.
> Though ST guys would have tested stmpe, but stmpe-gpio, i am not sure about.
It needs to be tested before being accpeted.
> > I didn't go through them, but are you sure that:
> >
> > 1. Can I do without them?
> > 1.1 Can I derive the configuration from other things?
> > 2.2 Are they _really_ required, or am I just blindly copying platform data?
> > 2. Does a similar binding already exist?
> > 3. Can other drivers make use of them?
> > 3.1 If so, create a generic binding
> > 3.2 If not, prepend the binding with "<vendor>,"
>
> I will go through them again.
Thanks.
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2012-11-23 9:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 5:10 [PATCH V2 1/2] mfd: stmpe: Use devm_*() routines Viresh Kumar
[not found] ` <f1d508c64a01dfd492a1ab1fda28af4b7647d8ab.1353560936.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-22 5:10 ` [PATCH V2 2/2] mfd: stmpe: Extend DT support in stmpe driver Viresh Kumar
[not found] ` <b81641051dad9660b72b0028d001e5620d901160.1353560936.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2012-11-22 11:24 ` Lee Jones
[not found] ` <20121122112451.GE4328-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-22 13:54 ` Viresh Kumar
[not found] ` <CAKohpo=F91sZ7St3XVXqwAEgmSWXjAxxXwRs1RD5qPyW99P1vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-22 15:46 ` Lee Jones
[not found] ` <20121122154612.GC10986-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-22 17:01 ` Viresh Kumar
2012-11-23 3:45 ` Shiraz Hashim
[not found] ` <20121123034557.GB5384-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2012-11-23 9:33 ` Lee Jones
2012-11-23 9:23 ` Lee Jones [this message]
2012-11-22 18:31 ` Viresh Kumar
2012-11-23 9:39 ` Lee Jones
2012-11-23 4:29 ` Viresh Kumar
2012-11-23 9:36 ` Lee Jones
2012-11-23 12:39 ` Viresh Kumar
2012-11-23 15:43 ` Lee Jones
2012-11-23 15:45 ` Viresh Kumar
2012-11-22 10:27 ` [PATCH V2 1/2] mfd: stmpe: Use devm_*() routines Lee Jones
[not found] ` <20121122102710.GD4328-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-22 10:30 ` Viresh Kumar
2012-11-22 17:10 ` Viresh Kumar
[not found] ` <CAKohpo=gctcd5+bZ8xeJn-Cx3=+=+uxaCzEoZhFmp+XaJSpf9Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-23 9:40 ` Lee Jones
2012-11-23 9:42 ` Lee Jones
2012-11-23 9:44 ` Viresh Kumar
2012-11-23 11:03 ` Samuel Ortiz
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=20121123092328.GB17471@gmail.com \
--to=lee.jones@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=spear-devel@list.st.com \
--cc=vipulkumar.samar@st.com \
--cc=viresh.kumar@linaro.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).