From: Krzysztof Kozlowski <krzk@kernel.org>
To: Philipp Zabel <p.zabel@pengutronix.de>, Rob Herring <robh@kernel.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding
Date: Thu, 22 Dec 2022 11:32:27 +0100 [thread overview]
Message-ID: <ace9cc9d-ccf1-fffa-3504-6504fdfb5a20@kernel.org> (raw)
In-Reply-To: <432ed015f4ba99d6bddd0a10af72324fea1388da.camel@pengutronix.de>
On 21/12/2022 16:36, Philipp Zabel wrote:
>>> + $ref: /schemas/types.yaml#/definitions/string
>>> + description: rfkill switch name, defaults to node name
>>> +
>>> + type:
>>
>> Too generic. Property names should ideally have 1 type globally. I think
>> 'type' is already in use. 'radio-type' instead?
>
> These values correspond to the 'enum rfkill_type' in Linux UAPI, but I
> think in this context 'radio-type' would be better than 'rfkill-type'.
Do not map Linux driver to DT, but rather describe the actual hardware.
>
>>> + description: rfkill radio type
>>> + enum:
>>> + - wlan
>>> + - bluetooth
>>> + - ultrawideband
>>> + - wimax
>>> + - wwan
>>> + - gps
>>> + - fm
>>> + - nfc
>>> +
>>> + shutdown-gpios:
>>> + maxItems: 1
>>> +
>>> + reset-gpios:
>>> + maxItems: 1
>>
>> I'm lost as to why there are 2 GPIOs.
>
> I don't know either. My assumption is that this is for devices that
> are radio silenced by just asserting their reset pin (for example GPS
> chips). The driver handles them the same.
>
> I could remove reset-gpios and make shutdown-gpios required.
>
>>> +
>>> +required:
>>> + - compatible
>>> + - type
>>> +
>>> +oneOf:
>>> + - required:
>>> + - shutdown-gpios
>>> + - required:
>>> + - reset-gpios
>>
>> But only 1 can be present? So just define 1 GPIO name.
>
> The intent was that only one of them would be required.
>
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> + - |
>>> + #include <dt-bindings/gpio/gpio.h>
>>> +
>>> + rfkill-pcie-wlan {
>>
>> Node names should be generic.
>
> What could be a generic name for this - is "rfkill" acceptable even
> though it is a Linux subsystem name? Or would "rf-kill-switch" be
> better?
rfkill
>
> How should they be called if there are multiple of them?
The same as in all other cases (leds, gpios, regulators), so rfkill-1,
rfkill-2...
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-12-22 10:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 10:48 [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding Philipp Zabel
2022-12-21 10:48 ` [PATCH 2/2] net: rfkill: gpio: add DT support Philipp Zabel
2022-12-22 10:32 ` Krzysztof Kozlowski
2022-12-21 14:45 ` [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding Rob Herring
2022-12-21 15:36 ` Philipp Zabel
2022-12-22 10:32 ` Krzysztof Kozlowski [this message]
2022-12-22 10:20 ` Krzysztof Kozlowski
2023-01-02 17:40 ` Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ace9cc9d-ccf1-fffa-3504-6504fdfb5a20@kernel.org \
--to=krzk@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=johannes@sipsolutions.net \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).