From: Tony Lindgren <tony@atomide.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] of/platform: Fix no irq domain found errors when populating interrupts
Date: Wed, 11 Dec 2013 08:43:03 -0800 [thread overview]
Message-ID: <20131211164302.GB13171@atomide.com> (raw)
In-Reply-To: <20131211151159.GA31617@ulmo.nvidia.com>
* Thierry Reding <thierry.reding@gmail.com> [131211 07:14]:
>
> So how about we make the platform_get_irq() modification for starters,
> so that the OMAP issues can be resolved and then turn our attention to
> coming up with a more generic approach. If indeed we end up with what
> you're proposing we can easily switch platform_get_irq() to use it.
Yeah we should do the minimal fix for the $Subject bug for the -rc cycle
so I can fix the PM test regression fix for the few omap3 platforms
already made DT only.
> One of the things I'm not so sure about is how to handle other types of
> resources, since they'll be somewhat more specific to the type of
> device. That's true also for devices other than platform devices. Let's
> look at I2C devices for instance. The way to get at the IRQ number is
> via the i2c_client->irq member.
Yes. And BTW, there's also another related glitch where there's no easy
way to configure auxdata from arch/arm/mach code for some devices.
For example, consider something like this that's fairly common:
1. i2c bus driver configured with DT and can take board specific auxdata
2. i2c bus intializes connected devices as configured with DT but
cannot pass board specific auxdata as the auxdata for the i2c bus
is empty
3. i2c connected pmic driver intializes as configured with DT, but
cannot get board specifc auxdata
So we should probably add some parent or master auxdata table that's
also checked if the bus specific auxdata table is empty.
> device_get_irq() breaks down at that point because unless you want to
> add special cases for all sorts of devices you have no way of getting at
> the data if it hasn't been instantiated from DT (or ACPI). Actually, all
> devices instantiated from platform data will suffer from this if I'm not
> mistaken.
>
> If you're saying that the device_get_irq() API should only cover cases
> where some sort of firmware interface exists such as DT or ACPI, then I
> suppose it could be made to work and drivers could rely on the subsystem
> specific locations as fallback. I guess for I2C drivers you'd have to do
> something like this:
>
> err = device_get_irq(&client->dev, 0);
> if (err >= 0)
> client->irq = err;
>
> And then continue to use client->irq as usual. That obviously has the
> side-effect of having to do this for every single driver, whereas the
> original patches were meant to solve this in the core.
>
> Given enough time we could probably migrate everyone to the new
> interfaces, but it certainly is a lot of churn. Perhaps another
> alternative would be to unify this some more by making each subsystem
> provide special hooks that device_get_irq() and friends can call for
> fallback when none of the "firmware" functions were successful.
Ideally of course we'd have Linux generic way of doing this that works
for platform data, DT and ACPI without changing the existing interfaces :)
Regards,
Tony
next prev parent reply other threads:[~2013-12-11 16:43 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-23 0:43 [PATCH] of/platform: Fix no irq domain found errors when populating interrupts Tony Lindgren
[not found] ` <20131123004334.GJ10023-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-23 0:55 ` Russell King - ARM Linux
2013-11-23 1:08 ` Tony Lindgren
2013-11-23 1:15 ` Tony Lindgren
[not found] ` <20131123011515.GO10023-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-23 1:50 ` Tony Lindgren
[not found] ` <20131123015034.GP10023-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-23 15:42 ` Rob Herring
[not found] ` <CAL_JsqKV7K+QdLHS+3LtfcVx5Dpc7n6A8UwwNWKBP33Gs19c8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-23 16:32 ` Tony Lindgren
[not found] ` <20131123163240.GW5928-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2013-11-25 9:34 ` Thierry Reding
[not found] ` <20131125093434.GE22043-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-11-25 19:46 ` Tony Lindgren
2013-11-24 21:27 ` Grant Likely
2013-12-10 3:39 ` Paul Walmsley
2013-12-30 22:10 ` Paul Walmsley
[not found] ` <alpine.DEB.2.02.1312302209200.8869-rwI8Ez+7Ko+d5PgPZx9QOdBPR1lH4CV8@public.gmane.org>
2013-12-31 16:33 ` Rob Herring
2014-01-06 23:41 ` Paul Walmsley
2014-01-08 1:19 ` Tony Lindgren
2014-01-08 12:51 ` [PATCH] driver-core: platform: Resolve DT interrupt references late Thierry Reding
2014-01-08 13:41 ` Arnd Bergmann
2014-01-08 14:55 ` Thierry Reding
2014-01-08 15:11 ` Arnd Bergmann
2014-01-08 15:58 ` Thierry Reding
[not found] ` <20140108155855.GA22984-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-01-08 16:25 ` Arnd Bergmann
2014-01-08 19:59 ` Thierry Reding
[not found] ` <20140108195909.GB1298-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-01-08 20:09 ` Arnd Bergmann
2014-01-08 20:24 ` Thierry Reding
2014-01-08 21:01 ` Arnd Bergmann
[not found] ` <1389185477-507-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-01-08 16:40 ` Tony Lindgren
[not found] ` <20140108164040.GA31686-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-01-08 19:28 ` Thierry Reding
2014-01-08 21:43 ` Tony Lindgren
2013-11-23 1:07 ` [PATCH] of/platform: Fix no irq domain found errors when populating interrupts Tony Lindgren
2013-11-24 21:36 ` Grant Likely
[not found] ` <20131124213651.59750C402C3-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-11-25 9:25 ` Thierry Reding
[not found] ` < 20131125094954.GF22043@ulmo.nvidia.com>
[not found] ` <20131125092549.GD22043-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-11-25 9:49 ` Thierry Reding
2013-11-25 19:50 ` Tony Lindgren
2013-11-27 15:56 ` Grant Likely
[not found] ` <20131127155629.DB612C404EC-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-11-28 15:46 ` Thierry Reding
2013-12-11 13:45 ` Grant Likely
[not found] ` <20131211134553.2E967C4061A-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-12-11 15:12 ` Thierry Reding
2013-12-11 16:43 ` Tony Lindgren [this message]
2013-11-27 15:54 ` Grant Likely
2013-11-27 21:53 ` Tony Lindgren
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=20131211164302.GB13171@atomide.com \
--to=tony@atomide.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=thierry.reding@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).