Skip to contentSkip to conversation

usb: fix module autoloading

PATCH In review Liao Chen 3 participants 8 messages Aug 22, 2024 – Aug 26, 2024

Subsystems (6)
lore
Share & tools
lore

Liao Chen

author
#0 lore raw

cover usb: fix module autoloading

Hi all,

This patchset aims to enable autoloading of some use modules. By registering MDT, the kernel is allowed to automatically bind the module to devices that match the specified compatible strings.

Liao Chen (4):
usb: phy: phy-gpio-vbus-usb: fix module autoloading
usb: misc: brcmstb-usb-pinmap: fix module autoloading
usb: typec: fix module autoloading
usb: ehci-brcm: fix module autoloading

 drivers/usb/host/ehci-brcm.c          | 1 +
 drivers/usb/misc/brcmstb-usb-pinmap.c | 1 +
 drivers/usb/phy/phy-gpio-vbus-usb.c   | 1 +
 drivers/usb/typec/anx7411.c           | 1 +
 4 files changed, 4 insertions(+)
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 1/4 usb: phy: phy-gpio-vbus-usb: fix module autoloading

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/usb/phy/phy-gpio-vbus-usb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/phy/phy-gpio-vbus-usb.c +1 -0
index 817c242a76ca..5428b2b67de1 100644
@@ -374,6 +374,7 @@ static const struct of_device_id gpio_vbus_of_match[] = {
 	},
 	{},
 };
+MODULE_DEVICE_TABLE(of, gpio_vbus_of_match);
 
 static struct platform_driver gpio_vbus_driver = {
 	.driver = {
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 2/4 usb: misc: brcmstb-usb-pinmap: fix module autoloading

In reply to Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/usb/misc/brcmstb-usb-pinmap.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/misc/brcmstb-usb-pinmap.c +1 -0
index 2b2019c19cde..1ce885e4184c 100644
@@ -335,6 +335,7 @@ static const struct of_device_id brcmstb_usb_pinmap_of_match[] = {
 	{ .compatible = "brcm,usb-pinmap" },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, brcmstb_usb_pinmap_of_match);
 
 static struct platform_driver brcmstb_usb_pinmap_driver = {
 	.driver = {
Signature · 1 line
2.34.1
author
#4 lore raw

PATCH 3/4 usb: typec: fix module autoloading

In reply to Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/usb/typec/anx7411.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/anx7411.c +1 -0
index 5a5bf3532ad7..33ff301b918f 100644
@@ -1576,6 +1576,7 @@ static const struct of_device_id anx_match_table[] = {
 	{.compatible = "analogix,anx7411",},
 	{},
 };
+MODULE_DEVICE_TABLE(of, anx_match_table);
 
 static struct i2c_driver anx7411_driver = {
 	.driver = {
Signature · 1 line
2.34.1
maintainer Acked-by on v1 3/4
#5 lore raw

Re: [PATCH -next 3/4] usb: typec: fix module autoloading

Quoted 4 lines · Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

Quoted 18 lines
---
 drivers/usb/typec/anx7411.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/typec/anx7411.c +1 -0
index 5a5bf3532ad7..33ff301b918f 100644
@@ -1576,6 +1576,7 @@ static const struct of_device_id anx_match_table[] = {
 	{.compatible = "analogix,anx7411",},
 	{},
 };
+MODULE_DEVICE_TABLE(of, anx_match_table);
 
 static struct i2c_driver anx7411_driver = {
 	.driver = {
Signature · 1 line
2.34.1
Signature · 1 line
heikki
author
#6 lore raw

PATCH 4/4 usb: ehci-brcm: fix module autoloading

In reply to Liao Chen

Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.

---
 drivers/usb/host/ehci-brcm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-brcm.c +1 -0
index 77e42c739c58..68cad0620f1a 100644
@@ -246,6 +246,7 @@ static const struct of_device_id brcm_ehci_of_match[] = {
 	{ .compatible = "brcm,bcm7445-ehci", },
 	{}
 };
+MODULE_DEVICE_TABLE(of, brcm_ehci_of_match);
 
 static struct platform_driver ehci_brcm_driver = {
 	.probe		= ehci_brcm_probe,
Signature · 1 line
2.34.1