[v5] dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes

Message ID 20221216231349.22835-1-quic_molvera@quicinc.com
State New
Headers
Series [v5] dt-bindings: soc: qcom,rpmh-rsc: Update to allow for generic nodes |

Commit Message

Melody Olvera Dec. 16, 2022, 11:13 p.m. UTC
  Update the bindings to allow for generic regulator nodes instead of
device-specific node names.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
---

Changes from v4:
* updated regulator pattern to accommodate more regulators

This patch comes from discussions on [1] and is separated out. It also
has updated pattern matching to match the comments left from [1].

[1] https://lore.kernel.org/all/20221026200429.162212-2-quic_molvera@quicinc.com/

---
 Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: ca39c4daa6f7f770b1329ffb46f1e4a6bcc3f291
  

Comments

Konrad Dybcio Dec. 17, 2022, 2:29 p.m. UTC | #1
On 17.12.2022 00:13, Melody Olvera wrote:
> Update the bindings to allow for generic regulator nodes instead of
> device-specific node names.
> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> ---
> 
> Changes from v4:
> * updated regulator pattern to accommodate more regulators
> 
> This patch comes from discussions on [1] and is separated out. It also
> has updated pattern matching to match the comments left from [1].
> 
> [1] https://lore.kernel.org/all/20221026200429.162212-2-quic_molvera@quicinc.com/
> 
> ---
>  Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
> index b246500d3d5d..5bb624f62edc 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
> @@ -112,8 +112,9 @@ properties:
>      $ref: /schemas/power/qcom,rpmpd.yaml#
>  
>  patternProperties:
> -  '-regulators$':
> +  '^regulators(-[09])?$':
Wouldn't this only allow regulators-0 and regulators-9?

Konrad
>      $ref: /schemas/regulator/qcom,rpmh-regulator.yaml#
> +    unevaluatedProperties: false
>  
>  required:
>    - compatible
> 
> base-commit: ca39c4daa6f7f770b1329ffb46f1e4a6bcc3f291
  
Melody Olvera Dec. 19, 2022, 10:24 p.m. UTC | #2
On 12/17/2022 8:29 AM, Konrad Dybcio wrote:
>
> On 17.12.2022 00:13, Melody Olvera wrote:
>> Update the bindings to allow for generic regulator nodes instead of
>> device-specific node names.
>>
>> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
>> ---
>>
>> Changes from v4:
>> * updated regulator pattern to accommodate more regulators
>>
>> This patch comes from discussions on [1] and is separated out. It also
>> has updated pattern matching to match the comments left from [1].
>>
>> [1] https://lore.kernel.org/all/20221026200429.162212-2-quic_molvera@quicinc.com/
>>
>> ---
>>  Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
>> index b246500d3d5d..5bb624f62edc 100644
>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
>> @@ -112,8 +112,9 @@ properties:
>>      $ref: /schemas/power/qcom,rpmpd.yaml#
>>  
>>  patternProperties:
>> -  '-regulators$':
>> +  '^regulators(-[09])?$':
> Wouldn't this only allow regulators-0 and regulators-9?

Yup; my bad. Will update regex here.

Thanks,
Melody

>
> Konrad
>>      $ref: /schemas/regulator/qcom,rpmh-regulator.yaml#
>> +    unevaluatedProperties: false
>>  
>>  required:
>>    - compatible
>>
>> base-commit: ca39c4daa6f7f770b1329ffb46f1e4a6bcc3f291
  

Patch

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
index b246500d3d5d..5bb624f62edc 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,rpmh-rsc.yaml
@@ -112,8 +112,9 @@  properties:
     $ref: /schemas/power/qcom,rpmpd.yaml#
 
 patternProperties:
-  '-regulators$':
+  '^regulators(-[09])?$':
     $ref: /schemas/regulator/qcom,rpmh-regulator.yaml#
+    unevaluatedProperties: false
 
 required:
   - compatible