]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rt2800soc: allow loading from OF
authorRosen Penev <rosenp@gmail.com>
Tue, 22 Jul 2025 21:28:52 +0000 (14:28 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 23 Jul 2025 10:29:08 +0000 (12:29 +0200)
Add a single binding 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.

Added OF dependency to SOC CONFIG as adding of_match_table without OF
being present makes no sense.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Link: https://patch.msgid.link/20250722212856.11343-4-rosenp@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ralink/rt2x00/Kconfig
drivers/net/wireless/ralink/rt2x00/rt2800soc.c

index 3a32ceead54f215d515cde11d7be3cd0d01572cf..a0dc9a751234765333a8ce23840a29fdb43278d0 100644 (file)
@@ -202,7 +202,7 @@ endif
 
 config RT2800SOC
        tristate "Ralink WiSoC support"
-       depends on SOC_RT288X || SOC_RT305X || SOC_MT7620 || COMPILE_TEST
+       depends on OF && (SOC_RT288X || SOC_RT305X || SOC_MT7620 || COMPILE_TEST)
        select RT2X00_LIB_SOC
        select RT2X00_LIB_MMIO
        select RT2X00_LIB_CRYPTO
index e73394cf6ea64ba0f0e5f768cee376dc1b52e6a6..8015089c4a39784f33a7dbe3530054414e5cf828 100644 (file)
@@ -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" },
+       {},
+};
+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,