Message ID | 20250110081902.1846296-2-catalin.popescu@leica-geosystems.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state | expand |
Due to typo in my send-email command, some recipients were truncated. Adding them here. BR, Catalin On 10/01/2025 09:19, Catalin Popescu wrote: > 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> > --- > net/rfkill/rfkill-gpio.c | 3 +++ > 1 file changed, 3 insertions(+) > > 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;
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;
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> --- net/rfkill/rfkill-gpio.c | 3 +++ 1 file changed, 3 insertions(+)