mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
This commit is contained in:
parent
7951e8099c
commit
2882bf7dd4
@ -162,6 +162,9 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
|
|||||||
if (!rfkill->rfkill_dev)
|
if (!rfkill->rfkill_dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
if (device_property_present(&pdev->dev, "default-blocked"))
|
||||||
|
rfkill_init_sw_state(rfkill->rfkill_dev, true);
|
||||||
|
|
||||||
ret = rfkill_register(rfkill->rfkill_dev);
|
ret = rfkill_register(rfkill->rfkill_dev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err_destroy;
|
goto err_destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user