[PATCH 1/5] regulator: dt-bindings: Unify compatible

Rob Herring robh at kernel.org
Tue May 7 14:11:12 PDT 2024


On Tue, May 07, 2024 at 05:51:54PM +0530, Neha Malcom Francis wrote:
> TPS62870/1/2/3 devices have different output currents (6A/9A/12A/15A) of
> the TPS6287x family. The I2C addresses are the same between them. There
> is no need for different compatibles for each for these devices so drop
> them and add a unified "ti,tps6287x" compatible.

And s/w will never need to know what the max output current is?

Same i2c address has no bearing. That's usually not even fixed for 1 
device.

> 
> Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
> ---
>  .../devicetree/bindings/regulator/ti,tps62870.yaml         | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/regulator/ti,tps62870.yaml b/Documentation/devicetree/bindings/regulator/ti,tps62870.yaml
> index 386989544dac..2998773db990 100644
> --- a/Documentation/devicetree/bindings/regulator/ti,tps62870.yaml
> +++ b/Documentation/devicetree/bindings/regulator/ti,tps62870.yaml
> @@ -15,10 +15,7 @@ allOf:
>  properties:
>    compatible:
>      enum:
> -      - ti,tps62870
> -      - ti,tps62871
> -      - ti,tps62872
> -      - ti,tps62873
> +      - ti,tps6287x

You just broke the existing users.

Wildcards in compatible names are generally discouraged. Maybe if this 
was a new binding and had sufficient justification why we don't need to 
distinguish parts, but this is an ABI and we're stuck with them.

If you are doing this to support more versions, then feel free to use 
an existing string. It's just a unique identifier. You have 4 to choose 
from.

Rob



More information about the linux-arm-kernel mailing list