From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Jarno Manninen" <jarno.manninen@tut.fi>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: DTS question - MPC5200b
Date: Tue, 12 Feb 2008 12:47:17 -0700 [thread overview]
Message-ID: <fa686aa40802121147g2a639982oa13b39e770e3f940@mail.gmail.com> (raw)
In-Reply-To: <200802122007.41259.jarno.manninen@tut.fi>
On Feb 12, 2008 11:07 AM, Jarno Manninen <jarno.manninen@tut.fi> wrote:
> On Tuesday 12 February 2008 19:37:07 Nick wrote:
>
> > How do I specify the timer based on the cell-index?
>
> I don't know if that is possible to do in a one call, but maybe using the
> approach from mpc52xx_uart might help?
>
> --clip--
> for_each_node_by_type(np, "serial") {
> if (!of_match_node(mpc52xx_uart_of_match, np))
> continue;
>
> /* Is a particular device number requested? */
> devno = of_get_property(np, "port-number", NULL);
> mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1);
> }
> --clip--
This code has actually changed in 2.6.25-rc1. It is now
for_each_matching_node() and the call to of_match_node is no longer
necessary.
>
> And change serial->gpt, port-number to cell-index and add some logic to
> select the devices you want.
use 'reg' instead. cell-index (and port-number for that matter) will
probably be going away in the near future.
> Or if you wan't to do it a bit differently you
> could add a pseudo device outside the main tree like
>
> mydev {
> gpt-dev = <&the_gpt_dev>:
> };
>
> And get it that way. However I don't know if this is recommended approach, but
> I've used it for some simple stuff like binding gpt in PWM mode to
> framebuffer backlight, along with power-pin.
Yes, this is a good approach too.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-02-12 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 17:37 DTS question - MPC5200b Nick
2008-02-12 18:07 ` Jarno Manninen
2008-02-12 19:47 ` Grant Likely [this message]
2008-02-12 18:28 ` Grant Likely
2008-02-12 22:49 ` David Gibson
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=fa686aa40802121147g2a639982oa13b39e770e3f940@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=jarno.manninen@tut.fi \
--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).