linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jarno Manninen <jarno.manninen@tut.fi>
To: Nick <ndroogh@rogers.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: DTS question - MPC5200b
Date: Tue, 12 Feb 2008 20:07:41 +0200	[thread overview]
Message-ID: <200802122007.41259.jarno.manninen@tut.fi> (raw)
In-Reply-To: <47B1D943.6020708@rogers.com>

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--

And change  serial->gpt, port-number to cell-index and add some logic to 
select the devices you want. 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.

Please correct any mistakes you who know better. 

- Jarno

  reply	other threads:[~2008-02-12 19:17 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 [this message]
2008-02-12 19:47   ` Grant Likely
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=200802122007.41259.jarno.manninen@tut.fi \
    --to=jarno.manninen@tut.fi \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ndroogh@rogers.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).