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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html