[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DA7VC87A0OMF.1X5XEWVCHFLE5@linaro.org>
Date: Wed, 28 May 2025 15:37:46 +0100
From: "Alexey Klimov" <alexey.klimov@...aro.org>
To: "Krzysztof Kozlowski" <krzysztof.kozlowski@...aro.org>
Cc: "Srinivas Kandagatla" <srini@...nel.org>, "Mark Brown"
<broonie@...nel.org>, <linux-sound@...r.kernel.org>, "Liam Girdwood"
<lgirdwood@...il.com>, "Rob Herring" <robh@...nel.org>, "Krzysztof
Kozlowski" <krzk+dt@...nel.org>, "Conor Dooley" <conor+dt@...nel.org>,
"Bjorn Andersson" <andersson@...nel.org>, "Dmitry Baryshkov"
<lumag@...nel.org>, "Konrad Dybcio" <konradybcio@...nel.org>, "Konrad
Dybcio" <konrad.dybcio@....qualcomm.com>, "Jaroslav Kysela"
<perex@...ex.cz>, "Takashi Iwai" <tiwai@...e.com>,
<linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v3 02/12] dt-bindings: arm: qcom-soc: ignore "wsa" from
being selected as SoC component
On Fri May 23, 2025 at 9:12 AM BST, Krzysztof Kozlowski wrote:
> On Thu, May 22, 2025 at 06:40:52PM GMT, Alexey Klimov wrote:
>> The pattern matching incorrectly selects "wsa" because of "sa" substring
>> and evaluates it as a SoC component or block.
>>
>> Wsa88xx are family of amplifiers and should not be evaluated here.
>>
>> Signed-off-by: Alexey Klimov <alexey.klimov@...aro.org>
>> ---
>> Documentation/devicetree/bindings/arm/qcom-soc.yaml | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/qcom-soc.yaml b/Documentation/devicetree/bindings/arm/qcom-soc.yaml
>> index a77d68dcad4e52e4fee43729ac8dc1caf957262e..99521813a04ca416fe90454a811c4a13143efce3 100644
>> --- a/Documentation/devicetree/bindings/arm/qcom-soc.yaml
>> +++ b/Documentation/devicetree/bindings/arm/qcom-soc.yaml
>> @@ -23,7 +23,7 @@ description: |
>> select:
>> properties:
>> compatible:
>> - pattern: "^qcom,.*(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sar|sc|sd[amx]|sm|x1[ep])[0-9]+.*$"
>> + pattern: "^qcom,(?!.*wsa)(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sa|sar|sc|sd[amx]|smx1[ep])[0-9]+.*$"
>
> Why dropping front .*? Are you sure this matches what we want - so
> incorrect compatibles? To me it breaks the entire point of this select,
> so I am sure you did not test whether it still works. To remind: this is
> to select incorrect compatibles.
Thanks, great point. I tested it with regular dtbs checks with different
dtb files but I didn't check if it selects incorrect compatibles.
> (?!wsa)
> Because qcom,x-wsa8845 should be matched and cause warnings.
This is now confusing. I thought that the main job for the pattern above
is to avoid selecting wsa88xx amplifiers in the first place. Or, if I can
quote yourself: "What is WSA8815 that it should be here?"
If said wsa8845 with incorrect or correct should be selected by that pattern
then why not just leave that pattern as it is then? I am lost.
> And probably we are getting past the point of readability, so could you
> try:
>
> compatible:
> anyOf:
> - pattern: "^qcom,.*(apq|ipq|mdm|msm|qcm|qcs|q[dr]u|sar|sc|sd[amx]|sm|x1[ep])[0-9]+.*$"
> - pattern: "^qcom,.*(?!wsa)sa[0-9]+.*$"
Thanks, that one is much better for readability. I'll test that one then.
Best regards,
Alexey
Powered by blists - more mailing lists