2021-04-09 18:46:45

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-binding: bcm43xx-fmac: add optional brcm,ccode-map

On Thu, Apr 08, 2021 at 07:30:21PM +0800, Shawn Guo wrote:
> Add optional brcm,ccode-map property to support translation from ISO3166
> country code to brcmfmac firmware country code and revision.
>
> Signed-off-by: Shawn Guo <[email protected]>
> ---
> .../devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 7 +++++++
> 1 file changed, 7 insertions(+)

Can you convert this to schema first.

>
> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> index cffb2d6876e3..a65ac4384c04 100644
> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> @@ -15,6 +15,12 @@ Optional properties:
> When not specified the device will use in-band SDIO interrupts.
> - interrupt-names : name of the out-of-band interrupt, which must be set
> to "host-wake".
> + - brcm,ccode-map : multiple strings for translating ISO3166 country code to
> + brcmfmac firmware country code and revision. Each string must be in
> + format "AA-BB-num" where:
> + AA is the ISO3166 country code which must be 2 characters.
> + BB is the firmware country code which must be 2 characters.
> + num is the revision number which must fit into signed integer.

Signed? So "AA-BB--num"?

You should be able to do something like:

items:
pattern: '^[A-Z][A-Z]-[A-Z][A-Z]-[0-9]+$'

>
> Example:
>
> @@ -34,5 +40,6 @@ mmc3: mmc@1c12000 {
> interrupt-parent = <&pio>;
> interrupts = <10 8>; /* PH10 / EINT10 */
> interrupt-names = "host-wake";
> + brcm,ccode-map = "JP-JP-78", "US-Q2-86";
> };
> };
> --
> 2.17.1
>


2021-04-12 01:21:29

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-binding: bcm43xx-fmac: add optional brcm,ccode-map

On Fri, Apr 09, 2021 at 01:46:06PM -0500, Rob Herring wrote:
> On Thu, Apr 08, 2021 at 07:30:21PM +0800, Shawn Guo wrote:
> > Add optional brcm,ccode-map property to support translation from ISO3166
> > country code to brcmfmac firmware country code and revision.
> >
> > Signed-off-by: Shawn Guo <[email protected]>
> > ---
> > .../devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 7 +++++++
> > 1 file changed, 7 insertions(+)
>
> Can you convert this to schema first.

Yes. Will do, after driver maintainers agree with the direction.
>
> >
> > diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > index cffb2d6876e3..a65ac4384c04 100644
> > --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt
> > @@ -15,6 +15,12 @@ Optional properties:
> > When not specified the device will use in-band SDIO interrupts.
> > - interrupt-names : name of the out-of-band interrupt, which must be set
> > to "host-wake".
> > + - brcm,ccode-map : multiple strings for translating ISO3166 country code to
> > + brcmfmac firmware country code and revision. Each string must be in
> > + format "AA-BB-num" where:
> > + AA is the ISO3166 country code which must be 2 characters.
> > + BB is the firmware country code which must be 2 characters.
> > + num is the revision number which must fit into signed integer.
>
> Signed? So "AA-BB--num"?

Hmm, for some reason, kernel driver uses signed integer to hold the
revision. It's just a reflecting of that.

>
> You should be able to do something like:
>
> items:
> pattern: '^[A-Z][A-Z]-[A-Z][A-Z]-[0-9]+$'

Ah, yes, that's much better and distinct. Thanks for the suggestion.

Shawn

>
> >
> > Example:
> >
> > @@ -34,5 +40,6 @@ mmc3: mmc@1c12000 {
> > interrupt-parent = <&pio>;
> > interrupts = <10 8>; /* PH10 / EINT10 */
> > interrupt-names = "host-wake";
> > + brcm,ccode-map = "JP-JP-78", "US-Q2-86";
> > };
> > };
> > --
> > 2.17.1
> >

2021-04-13 15:10:43

by Arend van Spriel

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-binding: bcm43xx-fmac: add optional brcm,ccode-map

On 09-04-2021 20:46, Rob Herring wrote:
> On Thu, Apr 08, 2021 at 07:30:21PM +0800, Shawn Guo wrote:
>> Add optional brcm,ccode-map property to support translation from ISO3166
>> country code to brcmfmac firmware country code and revision.
>>
>> Signed-off-by: Shawn Guo<[email protected]>
>> ---
>> .../devicetree/bindings/net/wireless/brcm,bcm43xx-fmac.txt | 7 +++++++
>> 1 file changed, 7 insertions(+)
> Can you convert this to schema first.
Hi Rob,

You mean to change it to YAML, right? You already applied a patch for
that a few weeks ago:

https://lore.kernel.org/linux-devicetree/[email protected]/

Regards,
Arend

--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.


Attachments:
smime.p7s (4.12 kB)
S/MIME Cryptographic Signature