[PATCH 3/6] wifi: rt2800soc: allow loading from OF

From: Rosen Penev
Date: Sun Jul 06 2025 - 17:42:31 EST


Add a single bindng to help the already present dts files load the
driver. More are possible but there doesn't seem to be a significant
difference between them to justify this.

Use wifi name per dtschema requirements.

The data field will be used to remove the custom non static probe
function and use of_device_get_match_data.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
index e73394cf6ea6..db8d01f0cdc3 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
@@ -243,9 +243,16 @@ static int rt2800soc_probe(struct platform_device *pdev)
return rt2x00soc_probe(pdev, &rt2800soc_ops);
}

+static const struct of_device_id rt2880_wmac_match[] = {
+ { .compatible = "ralink,rt2880-wifi", .data = &rt2800soc_ops },
+ {},
+};
+MODULE_DEVICE_TABLE(of, rt2880_wmac_match);
+
static struct platform_driver rt2800soc_driver = {
.driver = {
.name = "rt2800_wmac",
+ .of_match_table = rt2880_wmac_match,
},
.probe = rt2800soc_probe,
.remove = rt2x00soc_remove,
--
2.50.0