netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: net: rfkill-gpio: add reset-gpio property
@ 2024-03-19 10:13 Josua Mayer
  2024-03-19 10:25 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Josua Mayer @ 2024-03-19 10:13 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Johannes Berg,
	Philipp Zabel
  Cc: netdev, devicetree, linux-kernel, Josua Mayer

rfkill-gpio driver supports management of two gpios: reset, shutdown.
Reset seems to have been missed when bindings were added.

Add binding for the supported reset-gpios property.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 Documentation/devicetree/bindings/net/rfkill-gpio.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
index 9630c8466fac..d01cefef6115 100644
--- a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
+++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
@@ -29,6 +29,9 @@ properties:
       - wlan
       - wwan
 
+  reset-gpios:
+    maxItems: 1
+
   shutdown-gpios:
     maxItems: 1
 

---
base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
change-id: 20240319-rfkill-reset-gpio-binding-5e9bfefb5f76

Sincerely,
-- 
Josua Mayer <josua@solid-run.com>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: net: rfkill-gpio: add reset-gpio property
  2024-03-19 10:13 [PATCH] dt-bindings: net: rfkill-gpio: add reset-gpio property Josua Mayer
@ 2024-03-19 10:25 ` Krzysztof Kozlowski
  2024-03-19 11:27   ` Josua Mayer
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-19 10:25 UTC (permalink / raw)
  To: Josua Mayer, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Johannes Berg, Philipp Zabel
  Cc: netdev, devicetree, linux-kernel

On 19/03/2024 11:13, Josua Mayer wrote:
> rfkill-gpio driver supports management of two gpios: reset, shutdown.
> Reset seems to have been missed when bindings were added.

No, you do not add properties just because driver supports them.
Bindings are for hardware, not for drivers.

You now revert all the comments from v1, without actually addressing them.

NAK. Or provide rationale why my previous comments, from adding the
binding, should be reversed/ignored/overruled.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: net: rfkill-gpio: add reset-gpio property
  2024-03-19 10:25 ` Krzysztof Kozlowski
@ 2024-03-19 11:27   ` Josua Mayer
  0 siblings, 0 replies; 3+ messages in thread
From: Josua Mayer @ 2024-03-19 11:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Johannes Berg, Philipp Zabel
  Cc: netdev, devicetree, linux-kernel

Am 19.03.24 um 11:25 schrieb Krzysztof Kozlowski:
> On 19/03/2024 11:13, Josua Mayer wrote:
>> rfkill-gpio driver supports management of two gpios: reset, shutdown.
>> Reset seems to have been missed when bindings were added.
> No, you do not add properties just because driver supports them.
> Bindings are for hardware, not for drivers.
>
> You now revert all the comments from v1, without actually addressing them.
"Reset of rfkill? It seems entire binding is a workaround of missing
reset in your device. I don't think this is suitable for binding."
> NAK.
Ack. I provide rationale below, but ultimately agree with your NAK.
> Or provide rationale why my previous comments, from adding the
> binding, should be reversed/ignored/overruled.
As mentioned by Philipp, reset signal might be used to radio-silence
a device in case more appropriate signals are not available or wired.

M.2 connector has two interesting signals that fit surprisingly well
to the rfkill-gpio driver's signal names:

FULL_CARD_POWER_OFF# and RESET#.

If for some reason both signals are under software control,
and a specific radio card is known to be connected,
then it would seem correct to describe both reset and shutdown gpios.


However your remark
("It seems entire binding is a workaround of missing reset in your device")
still stands:

When we have a standard m.2 connector, users might connect any
compatible card, and we know cards are often composite devices
utilizing multiple buses.

After thinking this through I agree that combining reset- and shutdown-gpio
in rfkill is a workaround to a different problem:
We are unable to describe control signals shared by multiple components
from different buses, i.e. usb, i2c, pci-e, sata.

Perhaps an m.2 connector should be its own entity, with various
gpios and buses linked to it.
Such a structural change is currently beyond my capabilities.

sincerely
Josua Mayer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-19 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19 10:13 [PATCH] dt-bindings: net: rfkill-gpio: add reset-gpio property Josua Mayer
2024-03-19 10:25 ` Krzysztof Kozlowski
2024-03-19 11:27   ` Josua Mayer

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).