Re: [PATCH 1/5 RESEND] ARM: OMAP: USB: HOST TLL platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 19, 2012 at 3:36 PM, Felipe Balbi <balbi@xxxxxx> wrote:
> Hi,
>
> On Mon, Mar 19, 2012 at 12:18:31PM +0530, Keshava Munegowda wrote:
>> +     ver =  usbtll_read(base, OMAP_USBTLL_REVISION);
>> +     if (ver == OMAP_USBTLL_REV1)
>> +             count = OMAP_TLL_CHANNEL_COUNT;
>> +     else if (ver == OMAP_USBTLL_REV2)
>> +             count = OMAP_REV2_TLL_CHANNEL_COUNT;
>> +     else {
>> +             dev_err(dev, "TLL version failed\n");
>> +             ret = -ENODEV;
>> +             goto err_ioremap;
>> +     }
>
> wrong coding style.
>
>> +static const struct dev_pm_ops usbtllomap_dev_pm_ops = {
>> +     .runtime_suspend        = usbtll_runtime_suspend,
>> +     .runtime_resume         = usbtll_runtime_resume,
>
> use SET_RUNTIME_PM_OPS()
>
>> +static struct platform_driver usbtll_omap_driver = {
>> +     .driver = {
>> +             .name           = (char *)usbtll_driver_name,
>> +             .owner          = THIS_MODULE,
>> +             .pm             = &usbtllomap_dev_pm_ops,
>> +     },
>> +     .remove         = __exit_p(usbtll_omap_remove),
>
> __devexit_p()
>
>> +};
>> +
>> +int omap_tll_enable(void)
>> +{
>> +     if (!tll_pdev) {
>> +             dev_dbg(&tll_pdev->dev, "missing platform_data\n");
>> +             return  -ENODEV;
>> +     }
>> +     return pm_runtime_get_sync(&tll_pdev->dev);
>> +}
>> +EXPORT_SYMBOL_GPL(omap_tll_enable);
>
> why ?

the usb hs core driver uses omap_tll_enable and omap_tll_disable
apis based on the port selection in ./drivers/mfd/omap-usb-host.c file.


>> +
>> +int omap_tll_disable(void)
>> +{
>> +     if (!tll_pdev) {
>> +             dev_dbg(&tll_pdev->dev, "missing platform_data\n");
>> +             return  -ENODEV;
>> +     }
>> +     return pm_runtime_put_sync(&tll_pdev->dev);
>> +}
>> +EXPORT_SYMBOL_GPL(omap_tll_disable);
>
> why ?
>
>> +MODULE_AUTHOR("Keshava Munegowda <keshava_mgowda@xxxxxx>");
>> +MODULE_ALIAS("platform:" USBHS_DRIVER_NAME);
>> +MODULE_LICENSE("GPL v2");
>> +MODULE_DESCRIPTION("usb tll driver for TI OMAP EHCI and OHCI controllers");
>> +
>> +static int __init omap_usbtll_drvinit(void)
>> +{
>> +     return platform_driver_probe(&usbtll_omap_driver, usbtll_omap_probe);
>
> please don't. Make sure you use platform_driver_register, instead.


Here , omap_usbtll_drvinit is registered through fs_initcall call;
this is required because, the TLL driver is required to initialized
before the UHH ( usb host core) driver.

regards
keshava



>
> --
> 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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux