Commit 1bd71816 authored by Michael Walle's avatar Michael Walle Committed by Greg Kroah-Hartman

usb: gadget: udc: atmel: convert to platform driver

The driver won't probe on a LAN9668 because the pinctrl driver isn't
ready yet. Probe deferral is not supported because the init section
is already discarded. With fw_devlink enabled, the probe won't even
be called. Convert the driver to a proper platform driver.
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220705131951.1388968-2-michael@walle.ccSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e89676f6
...@@ -2060,7 +2060,7 @@ static const struct usba_udc_errata at91sam9g45_errata = { ...@@ -2060,7 +2060,7 @@ static const struct usba_udc_errata at91sam9g45_errata = {
.pulse_bias = at91sam9g45_pulse_bias, .pulse_bias = at91sam9g45_pulse_bias,
}; };
static const struct usba_ep_config ep_config_sam9[] __initconst = { static const struct usba_ep_config ep_config_sam9[] = {
{ .nr_banks = 1 }, /* ep 0 */ { .nr_banks = 1 }, /* ep 0 */
{ .nr_banks = 2, .can_dma = 1, .can_isoc = 1 }, /* ep 1 */ { .nr_banks = 2, .can_dma = 1, .can_isoc = 1 }, /* ep 1 */
{ .nr_banks = 2, .can_dma = 1, .can_isoc = 1 }, /* ep 2 */ { .nr_banks = 2, .can_dma = 1, .can_isoc = 1 }, /* ep 2 */
...@@ -2070,7 +2070,7 @@ static const struct usba_ep_config ep_config_sam9[] __initconst = { ...@@ -2070,7 +2070,7 @@ static const struct usba_ep_config ep_config_sam9[] __initconst = {
{ .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 6 */ { .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 6 */
}; };
static const struct usba_ep_config ep_config_sama5[] __initconst = { static const struct usba_ep_config ep_config_sama5[] = {
{ .nr_banks = 1 }, /* ep 0 */ { .nr_banks = 1 }, /* ep 0 */
{ .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 1 */ { .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 1 */
{ .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 2 */ { .nr_banks = 3, .can_dma = 1, .can_isoc = 1 }, /* ep 2 */
...@@ -2449,6 +2449,7 @@ static int usba_udc_resume(struct device *dev) ...@@ -2449,6 +2449,7 @@ static int usba_udc_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume); static SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume);
static struct platform_driver udc_driver = { static struct platform_driver udc_driver = {
.probe = usba_udc_probe,
.remove = usba_udc_remove, .remove = usba_udc_remove,
.driver = { .driver = {
.name = "atmel_usba_udc", .name = "atmel_usba_udc",
...@@ -2456,8 +2457,7 @@ static struct platform_driver udc_driver = { ...@@ -2456,8 +2457,7 @@ static struct platform_driver udc_driver = {
.of_match_table = atmel_udc_dt_ids, .of_match_table = atmel_udc_dt_ids,
}, },
}; };
module_platform_driver(udc_driver);
module_platform_driver_probe(udc_driver, usba_udc_probe);
MODULE_DESCRIPTION("Atmel USBA UDC driver"); MODULE_DESCRIPTION("Atmel USBA UDC driver");
MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment