diff mbox series

[net-next,2/2] net: rfkill: gpio: allow booting in blocked state

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

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers fail 1 maintainers not CCed: johannes@sipsolutions.net
netdev/build_clang success Errors and warnings before: 1 this patch: 1
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-01-10--15-00 (tests: 882)

Commit Message

POPESCU Catalin Jan. 10, 2025, 8:19 a.m. UTC
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(+)

Comments

POPESCU Catalin Jan. 10, 2025, 8:32 a.m. UTC | #1
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 mbox series

Patch

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;