From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: linuxppc-dev@lists.ozlabs.org
Subject: Q: how to access the MPC5200B's timer gipo's?
Date: Wed, 9 Dec 2009 17:28:13 +0100 (CET) [thread overview]
Message-ID: <10228901.1260376093135.JavaMail.ngmail@webmail18.arcor-online.net> (raw)
Hi all,
I have a (probably dumb) question regarding the access to the MPC5200B's timer gpio's. I added e.g.
timer@640 { // General Purpose Timer 4
compatible = "fsl,mpc5200b-gpt","fsl,mpc5200-gpt";
reg = <0x640 0x10>;
interrupts = <1 13 0>;
interrupt-parent = <&mpc5200_pic>;
gpio-controller;
#gpio-cells = <2>;
};
in the DTS file to several timers. Several gpiochipxxx folders are now present in /sys/class/gpio/.
In my code, I grab the node by calling of_find_node_by_path("/soc5200@f0000000/timer@640"), which returns the proper node. Then I try to get the gpio number (for a call to gpio_set_value()) by calling of_get_gpio(node, 0) with the node found above. However, this call always dumps
of_get_gpio_flags: can't parse gpios property
of_get_gpio_flags exited with status -2
What would be the proper way to determine the gpio number for a timer's gpio pin from the node name or path?
Thanks for any help,
Albrecht.
Es weihnachtet sehr! Vom leckerem Backrezept bis zum leckeren Schneehasen finden Sie alles im Weihnachtsspecial von Arcor.de:
http://www.arcor.de/rd/footer.weihnachten
Feliz Navidad, God Yul, Merry X-Mas und ein frohes Fest!
next reply other threads:[~2009-12-09 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 16:28 Albrecht Dreß [this message]
2009-12-11 6:02 ` Q: how to access the MPC5200B's timer gipo's? Grant Likely
2009-12-11 17:55 ` Albrecht Dreß
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=10228901.1260376093135.JavaMail.ngmail@webmail18.arcor-online.net \
--to=albrecht.dress@arcor.de \
--cc=linuxppc-dev@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.