From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Ravi Gupta <dceravigupta@gmail.com>
Cc: linuxppc-dev@ozlabs.org, MJ embd <mj.embd@gmail.com>,
linuxppc-dev@lists.ozlabs.org,
"Ira W. Snyder" <iws@ovro.caltech.edu>
Subject: Re: How to use mpc8xxx_gpio.c device driver
Date: Fri, 13 Aug 2010 17:16:18 +0400 [thread overview]
Message-ID: <20100813131618.GA25414@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <AANLkTi=H1sKaGL8cHm9LAZm1tzm88dvkReXk12hmkWLj@mail.gmail.com>
Hi,
On Fri, Aug 13, 2010 at 03:29:11PM +0530, Ravi Gupta wrote:
[...]
> Thanks for the reply.
> I had added the entries for gpio pin 9 for both controllers(I was not sure
> with controller's pin is connected to LED, but now I know it is pin no. 233
> i.e 224+9) in the mpc8377_rdb.dts file. Below is a portion of my dts file, I
> have attached the complete dts file as attachment.
>
> immr@e0000000 {
[...]
> * led@0 {
> compatible = "gpio-leds";
> label = "hdd";
> gpios = <&gpio1 9 0>;
> };
What kernel version you look at? Please see the latest kernel,
it has MCU GPIO LED nodes already, and you can just add some
additional nodes.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/powerpc/boot/dts/mpc8377_rdb.dts#l490
[...]
> Also I have enabled drivers/leds/leds-gpio.c in my kernel. To test whether
> the leds entires in dts file get attached to leds-gpio driver, I added
> printks in the probe function of the driver.
>
> static int gpio_led_probe(struct platform_device *pdev)
> {
> struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
> struct gpio_led *cur_led;
> struct gpio_led_data *leds_data, *led_dat;
> int i, ret = 0;
>
> *printk(KERN_INFO "led: inside gpio_led_probe.\n");*
You have put the printk into the wrong function. It should
have been of_gpio_leds_probe():
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/leds/leds-gpio.c#l227
If you don't have that function then you use too old kernel.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
next prev parent reply other threads:[~2010-08-13 13:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 13:27 How to use mpc8xxx_gpio.c device driver Ravi Gupta
2010-08-11 14:19 ` Ravi Gupta
2010-08-11 16:25 ` Ira W. Snyder
2010-08-11 16:45 ` Anton Vorontsov
2010-08-13 9:59 ` Ravi Gupta
2010-08-13 13:16 ` Anton Vorontsov [this message]
2010-08-18 12:45 ` Ravi Gupta
2010-08-11 16:15 ` MJ embd
2010-08-12 10:25 ` Ravi Gupta
2010-08-12 15:36 ` Ira W. Snyder
2010-08-13 10:01 ` Ravi Gupta
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=20100813131618.GA25414@oksana.dev.rtsoft.ru \
--to=cbouatmailru@gmail.com \
--cc=dceravigupta@gmail.com \
--cc=iws@ovro.caltech.edu \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mj.embd@gmail.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).