diff mbox series

[v2,1/8] dt-bindings: iio: adc: rename the aspeed adc yaml

Message ID 20210723081621.29477-2-billy_tsai@aspeedtech.com
State New
Headers show
Series Add support for ast2600 ADC | expand

Commit Message

Billy Tsai July 23, 2021, 8:16 a.m. UTC
The aspeed,ast2400-adc.yaml not only descriptor the bindings of ast2400.
Rename it to aspeed,adc.yaml for all of the aspeed adc bindings.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
---
 .../iio/adc/{aspeed,ast2400-adc.yaml => aspeed,adc.yaml}        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename Documentation/devicetree/bindings/iio/adc/{aspeed,ast2400-adc.yaml => aspeed,adc.yaml} (93%)

Comments

Billy Tsai July 26, 2021, 6:53 a.m. UTC | #1
Hi Jonathan,

On 2021/7/23, 10:45 PM, "Jonathan Cameron" <Jonathan.Cameron@Huawei.com> wrote:

    On Fri, 23 Jul 2021 16:16:14 +0800
    Billy Tsai <billy_tsai@aspeedtech.com> wrote:

    >   > The aspeed,ast2400-adc.yaml not only descriptor the bindings of ast2400.

    >   > Rename it to aspeed,adc.yaml for all of the aspeed adc bindings.

    >   > 

    >   > Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>


    >   We try to avoid 'wild' card type namings most of the time and instead

    >   name after a particular part number.  I say try because clearly

    >   we let a few in over the years :(


    >   It is very hard to know if this binding will apply to 'all' future

    >   aspeed ADCs.


    >   As such I'm not sure this particular rename makes sense.


If I want to extend the yaml file to compatible more versions of the aspeed adc.
Would you suggest to add new files call aspeed,ast2600-adc.yaml or just append it
to the aspeed,ast2400-adc.yaml?

Thanks

Best Regards,
Billy Tsai
Rob Herring (Arm) July 29, 2021, 8:31 p.m. UTC | #2
On Mon, Jul 26, 2021 at 06:53:07AM +0000, Billy Tsai wrote:
> Hi Jonathan,

> 

> On 2021/7/23, 10:45 PM, "Jonathan Cameron" <Jonathan.Cameron@Huawei.com> wrote:

> 

>     On Fri, 23 Jul 2021 16:16:14 +0800

>     Billy Tsai <billy_tsai@aspeedtech.com> wrote:

> 

>     >   > The aspeed,ast2400-adc.yaml not only descriptor the bindings of ast2400.

>     >   > Rename it to aspeed,adc.yaml for all of the aspeed adc bindings.

>     >   > 

>     >   > Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>

> 

>     >   We try to avoid 'wild' card type namings most of the time and instead

>     >   name after a particular part number.  I say try because clearly

>     >   we let a few in over the years :(

> 

>     >   It is very hard to know if this binding will apply to 'all' future

>     >   aspeed ADCs.

> 

>     >   As such I'm not sure this particular rename makes sense.

> 

> If I want to extend the yaml file to compatible more versions of the aspeed adc.

> Would you suggest to add new files call aspeed,ast2600-adc.yaml or just append it

> to the aspeed,ast2400-adc.yaml?


If 2600 is not backwards compatible with 2400, then probably a new 
schema file. Given you are adding new properties (which only apply to 
2600?), then most likely a new schema file. Depends at which point there 
are too many conditional (if/then/else) schemas.

Rob
Jonathan Cameron July 31, 2021, 5:27 p.m. UTC | #3
On Thu, 29 Jul 2021 14:31:35 -0600
Rob Herring <robh@kernel.org> wrote:

> On Mon, Jul 26, 2021 at 06:53:07AM +0000, Billy Tsai wrote:

> > Hi Jonathan,

> > 

> > On 2021/7/23, 10:45 PM, "Jonathan Cameron" <Jonathan.Cameron@Huawei.com> wrote:

> > 

> >     On Fri, 23 Jul 2021 16:16:14 +0800

> >     Billy Tsai <billy_tsai@aspeedtech.com> wrote:

> >   

> >     >   > The aspeed,ast2400-adc.yaml not only descriptor the bindings of ast2400.

> >     >   > Rename it to aspeed,adc.yaml for all of the aspeed adc bindings.

> >     >   > 

> >     >   > Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>  

> >   

> >     >   We try to avoid 'wild' card type namings most of the time and instead

> >     >   name after a particular part number.  I say try because clearly

> >     >   we let a few in over the years :(  

> >   

> >     >   It is very hard to know if this binding will apply to 'all' future

> >     >   aspeed ADCs.  

> >   

> >     >   As such I'm not sure this particular rename makes sense.  

> > 

> > If I want to extend the yaml file to compatible more versions of the aspeed adc.

> > Would you suggest to add new files call aspeed,ast2600-adc.yaml or just append it

> > to the aspeed,ast2400-adc.yaml?  

> 

> If 2600 is not backwards compatible with 2400, then probably a new 

> schema file. Given you are adding new properties (which only apply to 

> 2600?), then most likely a new schema file. Depends at which point there 

> are too many conditional (if/then/else) schemas.


Agreed.  It's a judgement call you need to make on when it is worth the new file.
Note that doesn't have anything to do with splitting the driver.  We have mulitple
binding files for single drivers and for that matter multiple drivers for single binding
files.

If it is 'compatible' enough to not make the file to complex, then add to the existing
ast2400 file without renaming.

Jonathan

> 

> Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml
similarity index 93%
rename from Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
rename to Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml
index 7f534a933e92..23f3da1ffca3 100644
--- a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/aspeed,adc.yaml
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
+$id: http://devicetree.org/schemas/iio/adc/aspeed,adc.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: ADC that forms part of an ASPEED server management processor.