linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Stephen Rothwell" <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, Sean MacLennan <smaclennan@pikatech.com>
Subject: Re: [RESEND][PATCH][POWERPC] PIKA Warp: Update platform code to supportRev B boards
Date: Sun, 27 Apr 2008 19:51:57 -0600	[thread overview]
Message-ID: <fa686aa40804271851t6d762a1et76fa3cc02c2205fe@mail.gmail.com> (raw)
In-Reply-To: <20080428105859.daef4d71.sfr@canb.auug.org.au>

On Sun, Apr 27, 2008 at 6:58 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Sean,
>
>
>  On Sun, 27 Apr 2008 15:25:46 -0400 Sean MacLennan <smaclennan@pikatech.com> wrote:
>  >
>  > +++ b/arch/powerpc/platforms/44x/warp-nand.c
>  > @@ -11,8 +11,10 @@
>  >  #include <linux/mtd/partitions.h>
>  >  #include <linux/mtd/nand.h>
>  >  #include <linux/mtd/ndfc.h>
>  > +#include <linux/of_platform.h>
>
>  You really want linux.of.h (unless there was some preexisting reason to
>  require of_platform.h).
>
>
>  > +static void pika_setup_critical_temp(struct i2c_client *client)
>  > +{
>  > +     struct device_node *np;
>  > +     int irq, rc;
>  > +
>  > +     /* Setup power LEDS for possible critical temp */
>  > +     np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP");
>  > +     if (np)
>  > +             np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP");
>
>  Did you really mean to test if (!np) above instead?

Actually, it looks like he's trying to find the second gpio node in the tree.

Sean, if that is true, then this is a very fragile way to do it.
Really, you should have a phandle somewhere that points to the GPIO
node that your LEDs are attached to.  Others have been addressing the
same problem and the consensus seems to be to add a 'leds' node for
each of your leds with a phandle and gpio descriptor to the gpio node.

See the documentation added by this patch (section 't'):
http://patchwork.ozlabs.org/linuxppc/patch?id=18156

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2008-04-28  1:51 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 [this message]
2008-04-28  2:25       ` Sean MacLennan
2008-04-28  4:47         ` Grant Likely
2008-04-28 17:10           ` Sean MacLennan
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=fa686aa40804271851t6d762a1et76fa3cc02c2205fe@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    --cc=smaclennan@pikatech.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).