From: Andreas Larsson <andreas@gaisler.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, software@gaisler.com
Subject: Re: [PATCH] gpio: Add device driver for GRGPIO cores
Date: Mon, 04 Feb 2013 11:27:33 +0100 [thread overview]
Message-ID: <510F8D15.30804@gaisler.com> (raw)
In-Reply-To: <CACRpkdYbJiBT5u0qJz+Krpky7W0WNqtSsO6Jo2TYZ2LRcyassA@mail.gmail.com>
On 2013-02-04 10:24, Linus Walleij wrote:
>>> And do you really have and test this regularly on both LE and BE hardware?
>>> I am worrying a bit about maintenance...
>>
>> I am more than happy to drop that. I will most probably never test this on
>> LE hardware.
>
> Will someone else? I'm more thinking whether it is customary in
> the SPARC drivers to do things like this, then we should follow
> that pattern of course.
It is definitely not customary in SPARC drivers. The module is marked
"depends on OF" in Kconfig though and there seems to be no way to depend
on an endianness. Unless someone instantiates the core in a LE system
there is no reason for it.
>> 2) The grgpio_to_irq function is very hardware specific, and there is of
>> course no gpio_to_irq support in gpio-generic.
>
> Well, the idea about gpio-generic is to use the pieces you need
> IIRC. You may override.
Ah, I see, bgpio_init is exported, so I might be able use that from my
driver to get rid of some functions. There is support for BE I saw now.
It seems broken to me (flips bits, not bytes), but that can be fixed.
>> 3) Running on SPARC, I get Open Firmware information from prom, so there is
>> no platform data to access in the probe function. Of course general Open
>> Firmware support could be added to gpio-generic, but in addition my probe
>> needs to set up very hardware specific things for gpio_to_irq.
>
> We should probably add some way to handle generic GPIO
> with compatible strings etc, but that's way outside my competence
> so OK. Maybe Rob or Grant can say something.
Might be a good idea. However, by just using bgpio_init in a separate
driver (like most other users of bgpio_init), that would not be required
or used by me anyhow.
I'll look into using bgpio_init from my driver.
Cheers,
Andreas Larsson
next prev parent reply other threads:[~2013-02-04 10:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 12:28 [PATCH] gpio: Add device driver for GRGPIO cores Andreas Larsson
[not found] ` <1359548921-14925-1-git-send-email-andreas-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2013-02-02 15:16 ` Linus Walleij
2013-02-04 8:10 ` Andreas Larsson
[not found] ` <510F6CF8.3000700-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2013-02-04 9:24 ` Linus Walleij
2013-02-04 10:27 ` Andreas Larsson [this message]
2013-02-09 22:36 ` Anton Vorontsov
2013-02-09 14:52 ` Grant Likely
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=510F8D15.30804@gaisler.com \
--to=andreas@gaisler.com \
--cc=anton.vorontsov@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=software@gaisler.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).