* [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state
@ 2025-01-10 8:19 Catalin Popescu
2025-01-10 8:19 ` [PATCH net-next 2/2] net: rfkill: gpio: allow " Catalin Popescu
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Catalin Popescu @ 2025-01-10 8:19 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, robh
Cc: netdev, devicetree, linux-kernel, linux-wireless, m.felsch,
bsp-development.geo, Catalin Popescu
By default, rfkill state is set to unblocked. Sometimes, we want to boot
in blocked state and let the application unblock the rfkill.
Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
---
Documentation/devicetree/bindings/net/rfkill-gpio.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
index 9630c8466fac..22f26f1a3856 100644
--- a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
+++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
@@ -32,6 +32,10 @@ properties:
shutdown-gpios:
maxItems: 1
+ default-blocked:
+ description: configure rfkill state as blocked at boot
+ type: boolean
+
required:
- compatible
- radio-type
@@ -48,4 +52,5 @@ examples:
label = "rfkill-pcie-wlan";
radio-type = "wlan";
shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
+ default-blocked;
};
base-commit: 25cc469d6d344f5772e9fb6a5cf9d82a690afe68
prerequisite-patch-id: 0000000000000000000000000000000000000000
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH net-next 2/2] net: rfkill: gpio: allow booting in blocked state
2025-01-10 8:19 [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state Catalin Popescu
@ 2025-01-10 8:19 ` Catalin Popescu
2025-01-10 8:32 ` POPESCU Catalin
2025-01-10 8:31 ` [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable " POPESCU Catalin
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Catalin Popescu @ 2025-01-10 8:19 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, robh
Cc: netdev, devicetree, linux-kernel, linux-wireless, m.felsch,
bsp-development.geo, Catalin Popescu
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state
2025-01-10 8:19 [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state Catalin Popescu
2025-01-10 8:19 ` [PATCH net-next 2/2] net: rfkill: gpio: allow " Catalin Popescu
@ 2025-01-10 8:31 ` POPESCU Catalin
2025-01-10 9:14 ` Kalle Valo
2025-01-13 18:32 ` Conor Dooley
3 siblings, 0 replies; 6+ messages in thread
From: POPESCU Catalin @ 2025-01-10 8:31 UTC (permalink / raw)
To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, Conor Dooley, johannes@sipsolutions.net,
p.zabel@pengutronix.de
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
m.felsch@pengutronix.de, GEO-CHHER-bsp-development
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 set to unblocked. Sometimes, we want to boot
> in blocked state and let the application unblock the rfkill.
>
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
> ---
> Documentation/devicetree/bindings/net/rfkill-gpio.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> index 9630c8466fac..22f26f1a3856 100644
> --- a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> +++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> @@ -32,6 +32,10 @@ properties:
> shutdown-gpios:
> maxItems: 1
>
> + default-blocked:
> + description: configure rfkill state as blocked at boot
> + type: boolean
> +
> required:
> - compatible
> - radio-type
> @@ -48,4 +52,5 @@ examples:
> label = "rfkill-pcie-wlan";
> radio-type = "wlan";
> shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
> + default-blocked;
> };
>
> base-commit: 25cc469d6d344f5772e9fb6a5cf9d82a690afe68
> prerequisite-patch-id: 0000000000000000000000000000000000000000
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 2/2] net: rfkill: gpio: allow booting in blocked state
2025-01-10 8:19 ` [PATCH net-next 2/2] net: rfkill: gpio: allow " Catalin Popescu
@ 2025-01-10 8:32 ` POPESCU Catalin
0 siblings, 0 replies; 6+ messages in thread
From: POPESCU Catalin @ 2025-01-10 8:32 UTC (permalink / raw)
To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, Conor Dooley, johannes@sipsolutions.net,
p.zabel@pengutronix.de
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
m.felsch@pengutronix.de, GEO-CHHER-bsp-development
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;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state
2025-01-10 8:19 [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state Catalin Popescu
2025-01-10 8:19 ` [PATCH net-next 2/2] net: rfkill: gpio: allow " Catalin Popescu
2025-01-10 8:31 ` [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable " POPESCU Catalin
@ 2025-01-10 9:14 ` Kalle Valo
2025-01-13 18:32 ` Conor Dooley
3 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2025-01-10 9:14 UTC (permalink / raw)
To: Catalin Popescu
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, netdev,
devicetree, linux-kernel, linux-wireless, m.felsch,
bsp-development.geo
Catalin Popescu <catalin.popescu@leica-geosystems.com> writes:
> By default, rfkill state is set to unblocked. Sometimes, we want to boot
> in blocked state and let the application unblock the rfkill.
>
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
Don't rfkill patches go via wireless-next, not net-next?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state
2025-01-10 8:19 [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state Catalin Popescu
` (2 preceding siblings ...)
2025-01-10 9:14 ` Kalle Valo
@ 2025-01-13 18:32 ` Conor Dooley
3 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2025-01-13 18:32 UTC (permalink / raw)
To: Catalin Popescu
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, netdev,
devicetree, linux-kernel, linux-wireless, m.felsch,
bsp-development.geo
[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]
On Fri, Jan 10, 2025 at 09:19:01AM +0100, Catalin Popescu wrote:
> By default, rfkill state is set to unblocked. Sometimes, we want to boot
> in blocked state and let the application unblock the rfkill.
>
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
> ---
> Documentation/devicetree/bindings/net/rfkill-gpio.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> index 9630c8466fac..22f26f1a3856 100644
> --- a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> +++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
> @@ -32,6 +32,10 @@ properties:
> shutdown-gpios:
> maxItems: 1
>
> + default-blocked:
> + description: configure rfkill state as blocked at boot
> + type: boolean
type here should be flag, not boolean.
> +
> required:
> - compatible
> - radio-type
> @@ -48,4 +52,5 @@ examples:
> label = "rfkill-pcie-wlan";
> radio-type = "wlan";
> shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
> + default-blocked;
> };
>
> base-commit: 25cc469d6d344f5772e9fb6a5cf9d82a690afe68
> prerequisite-patch-id: 0000000000000000000000000000000000000000
> --
> 2.34.1
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-13 18:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 8:19 [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable booting in blocked state Catalin Popescu
2025-01-10 8:19 ` [PATCH net-next 2/2] net: rfkill: gpio: allow " Catalin Popescu
2025-01-10 8:32 ` POPESCU Catalin
2025-01-10 8:31 ` [PATCH net-next 1/2] dt-bindings: net: rfkill-gpio: enable " POPESCU Catalin
2025-01-10 9:14 ` Kalle Valo
2025-01-13 18:32 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).