From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 0/4] PowerPC: implement GPIO API
Date: Fri, 21 Dec 2007 23:28:24 +0300 [thread overview]
Message-ID: <20071221202824.GA4607@localhost.localdomain> (raw)
Hi all,
OF device tree GPIOs bindings are similar to IRQs:
pario0: gpio-controller@0 {
#gpio-cells = <2>;
num-ports = <7>;
};
device@0 {
gpios = <bank pin bank pin bank pin>;
gpio-parent = <&pario0>;
};
"bank pin" scheme is controller specific, so controllers that want
to implement flat mappings or any other could do so.
So far I implemented GPIO API for QE and CPM2 chips. GPIO API for
CPM1 implemented by Jochen Friedrich <jochen@scram.de>, included in
this patchset.
- QE GPIO API tested to work with FSL UPM NAND driver and
MPC8360E-RDK (STMicro NAND512W3A2BN6E);
- CPM2 GPIO API tested to work with MPC8555E+Samsung HY27UF081G6 (LP);
- CPM1 GPIO API untested.
GPIO API is described in Documentation/gpio.txt, and these
patches are tend to support most of it.
As an additional bonus, PowerPC now gets access to few pleasing
drivers:
- drivers/leds/leds-gpio.c (we could use it to play with
on-board LEDs);
- drivers/i2c/busses/i2c-gpio.c (generic I2C bit-banging driver);
- drivers/input/keyboard/gpio_keys.c - gpio keys (requires
gpio_to_irq, so far not implemented);
- Could be more (I named the ones I knew about).
Also, in the upcoming kernels, there will be GPIOLIB[1] addition to
the generic GPIO API, to support off-chip GPIO expanders (like MFDs
on I2C/LBC). But so far we support on-chip GPIOs only, with single
controller built-in.
Changes since RFC:
- Implemented #gpio-cells handling;
- Per-bank spinlocks removed;
- Added a patch which implements GPIO API for CPM1;
- Few minor fixes.
Thanks,
[1] http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.24-rc4/2.6.24-rc4-mm1/broken-out/generic-gpio-gpio_chip-support.patch
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
next reply other threads:[~2007-12-21 20:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-21 20:28 Anton Vorontsov [this message]
2007-12-21 20:31 ` [PATCH 1/4] [POWERPC] Implement GPIO API embryo Anton Vorontsov
2007-12-23 2:49 ` Segher Boessenkool
2007-12-23 3:40 ` David Gibson
2007-12-23 10:00 ` Segher Boessenkool
2007-12-21 20:31 ` [PATCH 2/4] [POWERPC] QE: implement GPIO API Anton Vorontsov
2007-12-21 20:31 ` [PATCH 3/4] [POWERPC] CPM2: " Anton Vorontsov
2007-12-21 21:16 ` Arnd Bergmann
2007-12-21 23:58 ` Anton Vorontsov
2007-12-21 20:34 ` [PATCH 4/4] [POWERPC] CPM1: " Anton Vorontsov
2007-12-22 9:54 ` Jochen Friedrich
2007-12-22 16:08 ` Jochen Friedrich
2007-12-22 18:38 ` Anton Vorontsov
2007-12-21 20:50 ` [PATCH 0/4] PowerPC: " Grant Likely
2007-12-21 21:04 ` Anton Vorontsov
2007-12-21 21:17 ` Grant Likely
2007-12-22 0:16 ` Anton Vorontsov
2007-12-23 2:47 ` Segher Boessenkool
2007-12-23 3:37 ` David Gibson
2007-12-23 9:53 ` Segher Boessenkool
2007-12-23 11:47 ` Anton Vorontsov
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=20071221202824.GA4607@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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).