devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc@codeaurora.org>
To: Tien Hock Loh <thloh@altera.com>
Cc: robh+dt@kernel.org, pawel.moll@arm.com,
	Mark Rutland <mark.rutland@arm.com>,
	ijc+devicetree@hellion.org.uk, Kumar Gala <galak@codeaurora.org>,
	Rob Landley <rob@landley.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	dinguyen@altera.com, "lftan@altera.com" <lftan@altera.com>
Subject: Re: [PATCH V7 1/1] drivers/gpio: Altera soft IP GPIO driver and devicetree binding
Date: Mon, 7 Apr 2014 12:11:15 -0500	[thread overview]
Message-ID: <20140407171115.GA3956@joshc.qualcomm.com> (raw)
In-Reply-To: <CAOLUe6aPWmkJJSiBLL8tmw2MNfpaeLpSp3CSwP1u7q+qXxCh9Q@mail.gmail.com>

On Mon, Apr 07, 2014 at 04:00:43PM +0800, Tien Hock Loh wrote:
> On Wed, Mar 19, 2014 at 6:09 PM, Tien Hock Loh <thloh@altera.com> wrote:
> > On Fri, Mar 7, 2014 at 11:14 PM, Josh Cartwright <joshc@codeaurora.org> wrote:
> >> On Mon, Mar 03, 2014 at 06:27:43PM +0800, thloh@altera.com wrote:
> >>> From: Tien Hock Loh <thloh@altera.com>
[..]
> >>> +     altera_gc->mapped_irq = irq_of_parse_and_map(node, 0);
> >>>
> >>
> >> platform_get_irq(pdev, 0);
> >>
> > OK.
> >
>
> platform_get_irq doesn't create the irq mapping which is needed by the
> driver. Since this driver is targeted at using of, should I be using
> irq_of_parse_and_map or should I still redo the codes with
> platform_get_irq and irq_create_mapping? I think the latter would be
> introducing code redundancy. Please advice.

Yes, it is technically true that platform_get_irq() doesn't do the
mapping directly, but that's because the mapping is setup earlier, when
of_device_alloc() (drivers/of/platform.c) allocates resources for your
platform device.

Calling irq_of_parse_and_map() should be unnecessary.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2014-04-07 17:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 10:27 [PATCH V7 1/1] drivers/gpio: Altera soft IP GPIO driver and devicetree binding thloh
2014-03-07  3:31 ` Linus Walleij
2014-03-08 11:50   ` Gerhard Sittig
2014-03-12 14:52     ` Linus Walleij
2014-03-07 15:14 ` Josh Cartwright
2014-03-19 10:09   ` Tien Hock Loh
2014-04-07  8:00     ` Tien Hock Loh
2014-04-07 17:11       ` Josh Cartwright [this message]
2014-04-21  2:21         ` Tien Hock Loh
2014-04-29 14:14         ` Grant Likely
2014-04-15 10:00       ` Tien Hock Loh
2014-03-08 11:44 ` Gerhard Sittig
2014-03-31 10:38   ` Tien Hock Loh
2014-04-23 13:32 ` Linus Walleij
2014-04-24  0:55   ` Tien Hock Loh

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=20140407171115.GA3956@joshc.qualcomm.com \
    --to=joshc@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@altera.com \
    --cc=galak@codeaurora.org \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lftan@altera.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=thloh@altera.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).