All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Gower <graham.gower@gmail.com>
To: Marek Vasut <marek.vasut@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: UCB1400: Passing IRQ through platform_data
Date: Tue, 23 Mar 2010 09:14:26 +1030	[thread overview]
Message-ID: <4BA7F2CA.1060608@gmail.com> (raw)
In-Reply-To: <201003221413.20841.marek.vasut@gmail.com>

Marek Vasut wrote:
> Dne Po 22. března 2010 07:03:29 Graham Gower napsal(a):
>> Hi Marek,
>> I wish to use the ucb1400_ts driver on my device. But I'm having trouble
>> passing the platform_data to the ucb1400_core driver.
>>
>> I couldn't see any in tree examples of this being done and my attempts to
>> do this via registering a platform_driver for ucb1400_core have failed
>> (probably since this driver is ac97_bus_type, not a platform_driver).
>>
>> Can you provide me with info regarding the correct method for passing the
>> irq to the driver?
>>
>> Thanks,
>> -Graham
>>
> 
> static struct ucb1400_pdata pdata = {
> 	.irq	= IRQ_GPIO(123),
> };
> 
> static struct platform_device ucb1400_core = {
>         .name   = "ucb1400_core",
>         .id     = -1,
> 	.dev	= {
> 		.platform_data = &pdata,
> 	},
> };
> 
> init() {
> 	platform_device_register(&ucb1400_core);
> }
> 
> Like this ?

That is the first thing I tried and it doesn't work. I suggest you printk
the pdata in the ucb1400_core driver after having done this to confirm (I got
NULL). You don't need to register a platform driver for ucb1400_core_probe()
to be called anyway - presumably its enumerated from the ac97 bus.

> 
> btw. you don't have to pass pdata at all ... the logic for auto-detecting IRQ is 
> still there and is active if no pdata are supplied.

This does not work for me. I have not yet investigated why.

-Graham

PS: I am on mips, not arm. Arm CC removed.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-03-22 22:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4BA70831.1040606@gmail.com>
2010-03-22 13:13 ` UCB1400: Passing IRQ through platform_data Marek Vasut
2010-03-22 22:44   ` Graham Gower [this message]
2010-03-23  0:59     ` Marek Vasut
2010-03-23  1:25       ` H Hartley Sweeten
2010-03-23  1:39         ` Graham Gower
2010-03-23  2:08           ` H Hartley Sweeten
2010-03-23  3:13             ` Marek Vasut
2010-03-24  5:07               ` Graham Gower
2010-03-23  3:01           ` Marek Vasut
2010-03-23  3:31             ` Graham Gower

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=4BA7F2CA.1060608@gmail.com \
    --to=graham.gower@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=marek.vasut@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 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.