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
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to