From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: linuxppc-dev@ozlabs.org
Cc: Arnd Bergmann <arnd@arndb.de>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH RFC 0/3] PowerPC: implement support for GPIO LIB API
Date: Tue, 8 Jan 2008 21:43:41 +0300 [thread overview]
Message-ID: <20080108184341.GA29753@localhost.localdomain> (raw)
Hi all,
Thanks for the previous review and ideas. Here is the RFC for the
GPIO LIB support.
I'm using it like this:
qe_pio_a: gpio-controller@1400 {
#gpio-cells = <1>;
compatible = "fsl,qe-pario-bank";
reg = <0x1400 0x18>;
gpio-controller;
};
qe_pio_e: gpio-controller@1460 {
#gpio-cells = <1>;
compatible = "fsl,qe-pario-bank";
reg = <0x1460 0x18>;
gpio-controller;
};
nand-flash@1,0 {
compatible = "stmicro,NAND512W3A2BN6E", "fsl,upm-nand";
reg = <1 0 1>;
width = <1>;
upm = "A";
upm-addr-offset = <16>;
upm-cmd-offset = <8>;
gpios = <&qe_pio_e 18 &qe_pio_a 9>;
wait-pattern;
wait-write;
};
As you can see I've split single "par_io" node into banks, thus
the benefits:
- we can handle banks of different width (Jochen Friedrich asked for
this, IIRC. Or I've misunderstood ;-).
- we can handle banks with different paddings (no more #ifdef PPC85xx).
Also, it's possible to specify different gpio-controllers in the
gpios = <> property. gpio-specifier is controller specific.
The remaining question is about gpio.c placement. prom_parse.c doesn't
feel as the appropriate place anymore. I think of:
- drivers/gpio/of_gpio.c (driver/gpio/ is in -mm tree);
- drivers/of/gpio.c
- keep it in arch/powerpc/kernel/ (though, there is nothing
much PowerPC specific).
So, to try these patches you'll need apply these from the -mm tree:
generic-gpio-gpio_chip-support.patch
generic-gpio-gpio_chip-support-fix.patch
generic-gpio-gpio_chip-support-gpiolib-locking-simplified.patch
Or just issue this in your working tree:
git pull git://git.infradead.org/users/cbou/powerpc-gpio.git gpiolib
powerpc-gpio.git's gpiolib branch is galak/powerpc.git master branch +
-mm patches + these patches.
Support for CPM2 is pending.
Thanks!
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
next reply other threads:[~2008-01-08 18:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 18:43 Anton Vorontsov [this message]
2008-01-08 18:45 ` [PATCH 1/3] [POWERPC] Implement support for the GPIO LIB API Anton Vorontsov
2008-01-09 0:20 ` Stephen Rothwell
2008-01-08 18:45 ` [PATCH 2/3] [POWERPC] QE: split par_io_config_pin() Anton Vorontsov
2008-01-08 18:45 ` [PATCH 3/3] [POWERPC] QE: implement GPIO LIB API Anton Vorontsov
2008-01-27 13:42 ` Jochen Friedrich
2008-01-27 16:08 ` Anton Vorontsov
2008-01-27 20:59 ` Grant Likely
2008-01-27 21:23 ` Anton Vorontsov
2008-01-08 18:50 ` [PATCH RFC 0/3] PowerPC: implement support for " 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=20080108184341.GA29753@localhost.localdomain \
--to=avorontsov@ru.mvista.com \
--cc=arnd@arndb.de \
--cc=david@gibson.dropbear.id.au \
--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 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.