[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <abdb216d-5ee3-d46a-7d2d-7f7c28f11036@roeck-us.net>
Date: Thu, 18 Aug 2016 06:32:44 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Felipe Balbi <felipe.balbi@...ux.intel.com>,
Peter Chen <hzpeterchen@...il.com>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg KH <gregkh@...uxfoundation.org>,
Oliver Neukum <oneukum@...e.com>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCH v5 2/2] usb: typec: add driver for Intel Whiskey Cove PMIC
USB Type-C PHY
On 08/17/2016 11:33 PM, Felipe Balbi wrote:
>
> Hi,
>
> Peter Chen <hzpeterchen@...il.com> writes:
>> On Wed, Aug 17, 2016 at 03:53:24PM +0300, Felipe Balbi wrote:
>>>
>>> Hi,
>>>
>>> Heikki Krogerus <heikki.krogerus@...ux.intel.com> writes:
>>>
>>> [...]
>>>
>>>> +static struct platform_driver wcove_typec_driver = {
>>>> + .driver = {
>>>> + .name = "bxt_wcove_usbc",
>>>> + },
>>>> + .probe = wcove_typec_probe,
>>>> + .remove = wcove_typec_remove,
>>>> +};
>>>> +
>>>> +module_platform_driver(wcove_typec_driver);
>>>> +
>>>> +MODULE_AUTHOR("Intel Corporation");
>>>> +MODULE_LICENSE("GPL v2");
>>>> +MODULE_DESCRIPTION("WhiskeyCove PMIC USB Type-C PHY driver");
>>>
>>> you need to add:
>>>
>>> MODULE_ALIAS("platform:bxt_wcove_usbc");
>>>
>>> otherwise this won't probe() automagically.
>>>
>>
>> What do you mean, Felipe? If there is a platform device named
>> "bxt_wcove_usbc", why it will not be probed?
>
> IIRC default module alias is added based on file name, not
> platform_driver name, so this would be
> MODULE_ALIAS("platform:typec_wcove") by default... I could be wrong,
> really don't remember the details of that now.
>
AFAIK one either needs MODULE_ALIAS or MODULE_DEVICE_TABLE for platform
device autoloading. I have seen many patches along the line of "Add missing
MODULE_ALIAS", so I'd be a bit surprised if that was no longer needed.
Guenter
Powered by blists - more mailing lists