From: Scott Wood <oss@buserror.net>
To: christophe leroy <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: powerpc/8xx: Adding support of IRQ in MPC8xx GPIO
Date: Mon, 01 May 2017 13:14:21 -0500 [thread overview]
Message-ID: <1493662461.25397.29.camel@buserror.net> (raw)
In-Reply-To: <b0129071-0b09-a357-d262-19cf335f8224@c-s.fr>
On Mon, 2017-05-01 at 09:46 +0200, christophe leroy wrote:
>
> Le 30/04/2017 à 08:48, Scott Wood a écrit :
> > On Thu, Mar 09, 2017 at 10:42:04AM +0100, Christophe Leroy wrote:
> > >
> > > @@ -625,6 +641,14 @@ int cpm1_gpiochip_add16(struct device_node *np)
> > >
> > > spin_lock_init(&cpm1_gc->lock);
> > >
> > > + if (!of_property_read_u16(np, "interrupts-mask", &mask)) {
> > > + int i, j;
> > > +
> > > + for (i = 0, j = 0; i < 16; i++)
> > > + if (mask & (1 << (15 - i)))
> > > + cpm1_gc->irq[i] =
> > > irq_of_parse_and_map(np, j++);
> > > + }
> >
> > Do we really need to use MSB-first bit numbering here?
>
> Well, I think it is better to keep the GPIOs in the same order as in the
> CPM1 registers, like everywhere else in that driver, isn't it ?
>
> The registers have GPIO 0 in the MSB and GPIO15 in the LSB.
OK, if there's a specific register this is reflecting that's reasonable.
-Scott
prev parent reply other threads:[~2017-05-01 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-09 9:42 [PATCH] powerpc/8xx: Adding support of IRQ in MPC8xx GPIO Christophe Leroy
2017-04-30 6:48 ` Scott Wood
2017-05-01 7:46 ` christophe leroy
2017-05-01 18:14 ` Scott Wood [this message]
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=1493662461.25397.29.camel@buserror.net \
--to=oss@buserror.net \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.