On Sat, Sep 27, 2008 at 06:01:13PM -0700, David Brownell wrote: > On Friday 26 Septemb.er 2008, Felipe Balbi wrote: > > + if (twl_has_usb() && pdata->usb) { > > + pdev = platform_device_alloc("twl4030_usb", -1); > > + if (pdev) { > > + twl = &twl4030_modules[TWL4030_SLAVENUM_NUM0]; > > + pdev->dev.parent = &twl->client->dev; > > + device_init_wakeup(&pdev->dev, 1); > > + status = platform_device_add_data(pdev, pdata->usb, > > + sizeof(*pdata->usb)); > > + if (status < 0) { > > + platform_device_put(pdev); > > + goto err; > > + } > > + status = platform_device_add(pdev); > > + if (status < 0) > > + platform_device_put(pdev); > > + } else { > > + status = -ENOMEM; > > + goto err; > > + } > > + } > > I notice that here -- and elsewhere! -- you're not adding an IRQ > resource. We should get rid of the TWL4030_MODIRQ_* and *_PWRIRQ_* > symbols ... I think you'll observe that the twl_has_gpio() branch > is a slightly better model than the original twl_has_rtc() code, > in terms of how to add each child that uses interrupts. > > In this case you can add an IRQ resource 4 more than the base IRQ > (GPIO using 0 more), switch the relevant USB code over so that it's > using platform_get_irq(), and comment out TWL4030_MODIRQ_USB in > the header (now that nobody's using it). > > I'll send a small IRQ cleanup patch doing that for the RTC in a > bit, after I sanity check it. Sure, I'll update soonish, I'll mail for you only a new series so you can work on top of that. I changed a few bits, but i'm not keen to flood linux-omap with unfinished patches again :-p -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html