aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Popescu <[email protected]>2025-01-16 08:47:02 +0000
committerJohannes Berg <[email protected]>2025-02-11 10:55:55 +0000
commit2882bf7dd4f5dc732aa98d206026582cc136cb4d (patch)
tree1f14eed55ae399c158933f019a577f9c304b33b9
parentdt-bindings: net: rfkill-gpio: enable booting in blocked state (diff)
downloadkernel-2882bf7dd4f5dc732aa98d206026582cc136cb4d.tar.gz
kernel-2882bf7dd4f5dc732aa98d206026582cc136cb4d.zip
net: rfkill: gpio: allow booting in blocked state
By default, rfkill state is unblocked and this behavior is not configurable. Add support for booting in blocked state based on the presence of a devicetree property. Signed-off-by: Catalin Popescu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
-rw-r--r--net/rfkill/rfkill-gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index 9fa019e0dcad..41e657e97761 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -162,6 +162,9 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
if (!rfkill->rfkill_dev)
return -ENOMEM;
+ if (device_property_present(&pdev->dev, "default-blocked"))
+ rfkill_init_sw_state(rfkill->rfkill_dev, true);
+
ret = rfkill_register(rfkill->rfkill_dev);
if (ret < 0)
goto err_destroy;