linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>,
	"Thomas Gleixner (tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org)"
	<tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Peter De Schrijver
	<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Subject: Re: [PATCH 2/2] gpio/tegra: Dynamically allocate IRQ base, and support DT
Date: Thu, 01 Dec 2011 23:05:15 +0100	[thread overview]
Message-ID: <4ED7FA1B.1080109@atmel.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF174FDB02BF-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>

On 12/01/2011 09:57 PM, Stephen Warren :
> Jamie Iles wrote at Thursday, December 01, 2011 9:55 AM:
>> On Thu, Dec 01, 2011 at 08:52:49AM -0800, Stephen Warren wrote:
>>> Jamie Iles wrote at Thursday, December 01, 2011 7:11 AM:
>>>> On Thu, Dec 01, 2011 at 07:42:57AM -0600, Rob Herring wrote:
>>>>> On 11/30/2011 06:45 PM, Stephen Warren wrote:
> ...
>>>>>> +	irq_domain.irq_base = irq_alloc_descs(-1, 0, TEGRA_NR_GPIOS, 0);
>>>>>> +	if (irq_domain.irq_base<  0) {
>>>>>> +		dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n");
>>>>>> +		return -ENODEV;
>>>>>> +	}
>>>>>> +	irq_domain.nr_irq = TEGRA_NR_GPIOS;
>>>>>> +	irq_domain.ops =&irq_domain_ops;
>>>>>
>>>>> Why don't you just use irq_domain_simple_ops?
>>>>
>>>> This would need the patch I posted earlier
>>>> (https://lkml.org/lkml/2011/12/1/109) so they can work for the
>>>> !CONFIG_OF case ;-)
>>>
>>> Part of my reasoning was that simple_ops appeared to be intended for
>>> DT-based controllers; is it safe to use those ops for a controller that
>>> wasn't instantiated from DT? I know that right now, the only op in that
>>> structure is dt_translate, and that won't ever be called for the non-DT
>>> case, but is there a guarantee that more functions won't be added to
>>> the simple ops, and that they won't assume DT is in use, and fail if
>>> not?
>>>
>>> If these are safe to use in the non-DT case, then yet I could build off
>>> Jamie's patch, although managing the dependencies might be awkward.
>>
>> Yes, it's absolutely fine to use it just that irq_simple_ops isn't
>> currently exported unless you have CONFIG_OF_IRQ set so you'd get an
>> undefined reference for !CONFIG_OF at the moment.
>
> OK, sounds good.
>
> So, I think we have a few options:
> 1) Merge my change as-is, and simplify it later once your patch is in.
> 2) Put your change in a branch, and merge it into both its usual place,
> and the Tegra/ARM branches, so I can rebase my patch on top of it.
> 3) Have the usual maintainer ack it (I see Rob already did, but I think
> Thomas is the maintainer here right?) and just put both patches into the
> Tegra/ARM tree. This of course means non-Tegra branches have to wait for
> it rather than the other way around.
>
> (1) seems simplest, but (2) is probably doable. Thomas?

I jump into the discussion to say that I am also interested by Jamie's 
patch. I am following the same path as Stephen at the moment with Atmel 
AT91... A chance I can read all your comments that are so valuable for 
me as well :-)

So, for me (2) will ease things...

Best regards,
-- 
Nicolas Ferre

  parent reply	other threads:[~2011-12-01 22:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  0:45 [PATCH 1/2] arm/tegra: Remove use of TEGRA_GPIO_TO_IRQ Stephen Warren
     [not found] ` <1322700336-26866-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-01  0:45   ` [PATCH 2/2] gpio/tegra: Dynamically allocate IRQ base, and support DT Stephen Warren
     [not found]     ` <1322700336-26866-2-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-01 13:42       ` Rob Herring
     [not found]         ` <4ED78461.40006-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-01 14:11           ` Jamie Iles
2011-12-01 16:52             ` Stephen Warren
     [not found]               ` <74CDBE0F657A3D45AFBB94109FB122FF174FDB01DD-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-01 16:55                 ` Jamie Iles
2011-12-01 20:57                   ` Stephen Warren
     [not found]                     ` <74CDBE0F657A3D45AFBB94109FB122FF174FDB02BF-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-01 22:05                       ` Nicolas Ferre [this message]
     [not found]                         ` <4ED7FA1B.1080109-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2011-12-08 14:15                           ` Shawn Guo
2011-12-05  6:55       ` Shawn Guo
     [not found]         ` <20111205065527.GD2980-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-12-05 13:35           ` Rob Herring
     [not found]             ` <4EDCC894.7060200-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-05 14:44               ` Shawn Guo
2011-12-05 17:19           ` Stephen Warren

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=4ED7FA1B.1080109@atmel.com \
    --to=nicolas.ferre-aife0yeh4naavxtiumwx3w@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@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).