[PATCH v4 01/22] dt-bindings: mux: Remove nodename pattern constraints

Tommaso Merciai posted 22 patches 1 week, 3 days ago
There is a newer version of this series
[PATCH v4 01/22] dt-bindings: mux: Remove nodename pattern constraints
Posted by Tommaso Merciai 1 week, 3 days ago
The nodename pattern in  created an unnecessary restriction that forced
all mux nodes to be named with the 'mux-controller' prefix.
This prevented valid use cases where mux functionality is part of other
hardware blocks that should use more specific naming conventions.

Remove the $nodename pattern constraints from both the 'select' keyword
and the properties section of the mux-controller schema.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
---
v3->v4:
 - New patch.

 Documentation/devicetree/bindings/mux/mux-controller.yaml | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/mux/mux-controller.yaml b/Documentation/devicetree/bindings/mux/mux-controller.yaml
index 78340bbe4df6..6defb9da10f7 100644
--- a/Documentation/devicetree/bindings/mux/mux-controller.yaml
+++ b/Documentation/devicetree/bindings/mux/mux-controller.yaml
@@ -63,18 +63,12 @@ description: |
 
 select:
   anyOf:
-    - properties:
-        $nodename:
-          pattern: '^mux-controller'
     - required:
         - '#mux-control-cells'
     - required:
         - '#mux-state-cells'
 
 properties:
-  $nodename:
-    pattern: '^mux-controller(@.*|-([0-9]|[1-9][0-9]+))?$'
-
   '#mux-control-cells':
     enum: [ 0, 1 ]
 
-- 
2.43.0
Re: [PATCH v4 01/22] dt-bindings: mux: Remove nodename pattern constraints
Posted by Conor Dooley 1 week, 3 days ago
On Fri, Nov 21, 2025 at 04:11:50PM +0100, Tommaso Merciai wrote:
> The nodename pattern in  created an unnecessary restriction that forced
> all mux nodes to be named with the 'mux-controller' prefix.
> This prevented valid use cases where mux functionality is part of other
> hardware blocks that should use more specific naming conventions.
> 
> Remove the $nodename pattern constraints from both the 'select' keyword
> and the properties section of the mux-controller schema.
> 
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

Funnily enough, there's another patch that I saw today that hit this
same thing:
https://lore.kernel.org/all/176373269741.263545.10849918874919174841.robh@kernel.org/

> ---
> v3->v4:
>  - New patch.
> 
>  Documentation/devicetree/bindings/mux/mux-controller.yaml | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mux/mux-controller.yaml b/Documentation/devicetree/bindings/mux/mux-controller.yaml
> index 78340bbe4df6..6defb9da10f7 100644
> --- a/Documentation/devicetree/bindings/mux/mux-controller.yaml
> +++ b/Documentation/devicetree/bindings/mux/mux-controller.yaml
> @@ -63,18 +63,12 @@ description: |
>  
>  select:
>    anyOf:
> -    - properties:
> -        $nodename:
> -          pattern: '^mux-controller'
>      - required:
>          - '#mux-control-cells'
>      - required:
>          - '#mux-state-cells'
>  

>  properties:
> -  $nodename:
> -    pattern: '^mux-controller(@.*|-([0-9]|[1-9][0-9]+))?$'

I need to apologise, I told you to delete the wrong thing in my DM
earlier. Only deleting this part was actually required, deleting the
select portion doesn't really do anything for your problem.
What you've done is probably fine though, since anything actually acting
as a mux-controller will have the cells properties.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

> -
>    '#mux-control-cells':
>      enum: [ 0, 1 ]
>  
> -- 
> 2.43.0
> 
Re: [PATCH v4 01/22] dt-bindings: mux: Remove nodename pattern constraints
Posted by Tommaso Merciai 1 week ago
Hi Conor,
Thank you for your review!

On Fri, Nov 21, 2025 at 06:24:03PM +0000, Conor Dooley wrote:
> On Fri, Nov 21, 2025 at 04:11:50PM +0100, Tommaso Merciai wrote:
> > The nodename pattern in  created an unnecessary restriction that forced
> > all mux nodes to be named with the 'mux-controller' prefix.
> > This prevented valid use cases where mux functionality is part of other
> > hardware blocks that should use more specific naming conventions.
> > 
> > Remove the $nodename pattern constraints from both the 'select' keyword
> > and the properties section of the mux-controller schema.
> > 
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> 
> Funnily enough, there's another patch that I saw today that hit this
> same thing:
> https://lore.kernel.org/all/176373269741.263545.10849918874919174841.robh@kernel.org/

:)

> 
> > ---
> > v3->v4:
> >  - New patch.
> > 
> >  Documentation/devicetree/bindings/mux/mux-controller.yaml | 6 ------
> >  1 file changed, 6 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mux/mux-controller.yaml b/Documentation/devicetree/bindings/mux/mux-controller.yaml
> > index 78340bbe4df6..6defb9da10f7 100644
> > --- a/Documentation/devicetree/bindings/mux/mux-controller.yaml
> > +++ b/Documentation/devicetree/bindings/mux/mux-controller.yaml
> > @@ -63,18 +63,12 @@ description: |
> >  
> >  select:
> >    anyOf:
> > -    - properties:
> > -        $nodename:
> > -          pattern: '^mux-controller'
> >      - required:
> >          - '#mux-control-cells'
> >      - required:
> >          - '#mux-state-cells'
> >  
> 
> >  properties:
> > -  $nodename:
> > -    pattern: '^mux-controller(@.*|-([0-9]|[1-9][0-9]+))?$'
> 
> I need to apologise, I told you to delete the wrong thing in my DM
> earlier. Only deleting this part was actually required, deleting the
> select portion doesn't really do anything for your problem.
> What you've done is probably fine though, since anything actually acting
> as a mux-controller will have the cells properties.

No worries! :)
Thank you for your review/hint!

> 
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> pw-bot: not-applicable
> 
> > -
> >    '#mux-control-cells':
> >      enum: [ 0, 1 ]
> >  
> > -- 
> > 2.43.0
> > 

Thanks & Regards,
Tommaso