summaryrefslogtreecommitdiff
path: root/net/rfkill
diff options
context:
space:
mode:
authorCatalin Popescu <catalin.popescu@leica-geosystems.com>2025-01-16 09:47:02 +0100
committerJohannes Berg <johannes.berg@intel.com>2025-02-11 11:55:55 +0100
commit2882bf7dd4f5dc732aa98d206026582cc136cb4d (patch)
tree1f14eed55ae399c158933f019a577f9c304b33b9 /net/rfkill
parent7951e8099c2f12c1b98ce964ee05fd6bb7f2e7e7 (diff)
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 <catalin.popescu@leica-geosystems.com> Link: https://patch.msgid.link/20250116084702.3473176-2-catalin.popescu@leica-geosystems.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/rfkill')
-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;