From: Sean MacLennan <smaclennan@pikatech.com>
To: "Grant Likely" <grant.likely@secretlab.ca>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linuxppc-dev@ozlabs.org
Subject: Re: [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code to supportRev B boards
Date: Mon, 28 Apr 2008 13:10:01 -0400 [thread overview]
Message-ID: <20080428131001.052be010@lappy.seanm.ca> (raw)
In-Reply-To: <fa686aa40804272147y54df795fj7e8dad89dc237ecd@mail.gmail.com>
On Sun, 27 Apr 2008 22:47:43 -0600
"Grant Likely" <grant.likely@secretlab.ca> wrote:
> If your LEDs are attached to gpio pins, then you should use the
> current draft led->gpio bindings as shown in the above patch. Then,
> let your platform code extract whatever data it needs from the device
> tree to set up the LEDs.
I added the following to the dts:
led@31 {
compatible = "linux,gpio-led";
linux,name = "green";
gpios = <&GPIO1 31>;
};
led@30 {
compatible = "linux,gpio-led";
linux,name = "red";
gpios = <&GPIO1 30>;
};
I then map the gpio base as follows (I removed the if checks just to
make things short and sweet):
np = of_find_compatible_node(NULL, NULL, "linux,gpio-led");
gpios = of_get_property(np, "gpios", &lenp);
of_node_put(np);
np = of_find_node_by_phandle(gpios[0]);
gpio_base = of_iomap(np, 0);
of_node_put(np);
Comments?
Cheers,
Sean
next prev parent reply other threads:[~2008-04-28 17:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 19:22 [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code to support Rev B boards Sean MacLennan
2008-04-27 19:25 ` [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code to supportRev " Sean MacLennan
2008-04-28 0:58 ` Stephen Rothwell
2008-04-28 1:51 ` Grant Likely
2008-04-28 2:25 ` Sean MacLennan
2008-04-28 4:47 ` Grant Likely
2008-04-28 17:10 ` Sean MacLennan [this message]
2008-04-28 17:44 ` Grant Likely
2008-04-28 17:59 ` Sean MacLennan
2008-04-28 20:44 ` Richard Purdie
2008-04-28 21:24 ` [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code tosupportRev " Sean MacLennan
2008-04-28 21:36 ` Richard Purdie
2008-04-28 2:31 ` [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code to supportRev " Sean MacLennan
2008-04-28 18:53 ` Sean MacLennan
2008-04-28 19:56 ` Grant Likely
2008-04-28 21:37 ` Sean MacLennan
2008-04-28 21:54 ` Scott Wood
2008-04-28 22:07 ` Sean MacLennan
2008-04-30 0:48 ` Josh Boyer
2008-04-28 22:07 ` Grant Likely
2008-04-29 1:47 ` [RESEND][PATCH 1/2][POWERPC] " Sean MacLennan
2008-04-29 1:50 ` [RESEND][PATCH 2/2][POWERPC] " Sean MacLennan
2008-04-29 1:58 ` Grant Likely
2008-04-29 3:27 ` Sean MacLennan
2008-04-29 3:28 ` [RESEND][PATCH 1/2][POWERPC] " Sean MacLennan
2008-04-29 5:08 ` Paul Mackerras
2008-04-29 5:42 ` [RESEND][PATCH 1/2][POWERPC] PIKA Warp: Update platform code tosupportRev " Sean MacLennan
2008-05-06 15:27 ` Sean MacLennan
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=20080428131001.052be010@lappy.seanm.ca \
--to=smaclennan@pikatech.com \
--cc=grant.likely@secretlab.ca \
--cc=linuxppc-dev@ozlabs.org \
--cc=sfr@canb.auug.org.au \
/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).