diff mbox series

[4/5] ASoC: samsung: Document compatible strings for Odroid X/X2, Odroid XU3

Message ID 20180314164242.22927-1-s.nawrocki@samsung.com
State Changes Requested, archived
Headers show
Series None | expand

Commit Message

Sylwester Nawrocki March 14, 2018, 4:42 p.m. UTC
There are no significant differences across Odroid X, Odroid-X2, Odroid-U3
and Odroid-XU3 with regards to the audio subsystem so add more entries
to the compatible strings list.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 Documentation/devicetree/bindings/sound/samsung,odroid.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski March 16, 2018, 7:37 a.m. UTC | #1
On Wed, Mar 14, 2018 at 5:42 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> There are no significant differences across Odroid X, Odroid-X2, Odroid-U3
> and Odroid-XU3 with regards to the audio subsystem so add more entries
> to the compatible strings list.
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  Documentation/devicetree/bindings/sound/samsung,odroid.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.txt b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
> index f35a2694eb04..a50a0c6a354b 100644
> --- a/Documentation/devicetree/bindings/sound/samsung,odroid.txt
> +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
> @@ -1,8 +1,10 @@
> -Samsung Exynos Odroid XU3/XU4 audio complex with MAX98090 codec
> +Hardkernel Odroid X/X2/U3/XU3/XU4 audio complex with MAX98090 codec
>
>  Required properties:
>
> - - compatible - "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
> + - compatible - "hardkernel,odroid-u3-audio" - for Odroid U3 board,
> +               "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2 boards,
> +               "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
>                 "hardkernel,odroid-xu4-audio" - for Odroid XU4 board

These are the same so I think they should not get separate
compatibles. By definition [2] the compatible expresses the
compatibility with family of devices. In this case - these belong to
the same family.

The same applies to patch 5/5 (implementation of this).

Best regards,
Krzysztof

[1] DeviceTree specification v0.2: "They allow a device to express its
compatibility with a family of similar devices, potentially allowing a
single device driver to match against several devices."
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown March 19, 2018, 1:45 a.m. UTC | #2
On Fri, Mar 16, 2018 at 08:37:28AM +0100, Krzysztof Kozlowski wrote:
> On Wed, Mar 14, 2018 at 5:42 PM, Sylwester Nawrocki

> > - - compatible - "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
> > + - compatible - "hardkernel,odroid-u3-audio" - for Odroid U3 board,
> > +               "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2 boards,
> > +               "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
> >                 "hardkernel,odroid-xu4-audio" - for Odroid XU4 board

> These are the same so I think they should not get separate
> compatibles. By definition [2] the compatible expresses the
> compatibility with family of devices. In this case - these belong to
> the same family.

> The same applies to patch 5/5 (implementation of this).

I don't see a problem with adding the compatibles - the software
handling might be identical but it's not really causing a problem to
explicit document which board it is if people want.  It may end up
coming in useful at some point if there's some mechanical/plastics
difference which ends up being useful to handle (though that's much less
likely for dev boards like this than for finished products).  But
equally it's not essential, whatever you two decide.
Sylwester Nawrocki March 19, 2018, 10:17 a.m. UTC | #3
On 03/16/2018 08:37 AM, Krzysztof Kozlowski wrote:
>> diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.txt b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>> index f35a2694eb04..a50a0c6a354b 100644
>> --- a/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>> +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>> @@ -1,8 +1,10 @@
>> -Samsung Exynos Odroid XU3/XU4 audio complex with MAX98090 codec
>> +Hardkernel Odroid X/X2/U3/XU3/XU4 audio complex with MAX98090 codec
>>
>>  Required properties:
>>
>> - - compatible - "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
>> + - compatible - "hardkernel,odroid-u3-audio" - for Odroid U3 board,
>> +               "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2 boards,
>> +               "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
>>                 "hardkernel,odroid-xu4-audio" - for Odroid XU4 board
>
> These are the same so I think they should not get separate
> compatibles. By definition [2] the compatible expresses the
> compatibility with family of devices. In this case - these belong to
> the same family.
> 
> The same applies to patch 5/5 (implementation of this).

Given that everything except XU4 is already obsoleted, are we going to use
"hardkernel,odroid-xu3-audio" for Odroid X and Odroid U3?

We could also make it:
"hardkernel,odroid-xu3-audio", "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2
"hardkernel,odroid-xu3-audio", "hardkernel,odroid-u3-audio" - for Odroid U3

And in the driver wee would only have "hardkernel,odroid-xu3-audio", while dts
would contain detailed compatible.
Krzysztof Kozlowski March 19, 2018, 10:57 a.m. UTC | #4
On Mon, Mar 19, 2018 at 11:17 AM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 03/16/2018 08:37 AM, Krzysztof Kozlowski wrote:
>>> diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.txt b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>>> index f35a2694eb04..a50a0c6a354b 100644
>>> --- a/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>>> +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
>>> @@ -1,8 +1,10 @@
>>> -Samsung Exynos Odroid XU3/XU4 audio complex with MAX98090 codec
>>> +Hardkernel Odroid X/X2/U3/XU3/XU4 audio complex with MAX98090 codec
>>>
>>>  Required properties:
>>>
>>> - - compatible - "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
>>> + - compatible - "hardkernel,odroid-u3-audio" - for Odroid U3 board,
>>> +               "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2 boards,
>>> +               "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
>>>                 "hardkernel,odroid-xu4-audio" - for Odroid XU4 board
>>
>> These are the same so I think they should not get separate
>> compatibles. By definition [2] the compatible expresses the
>> compatibility with family of devices. In this case - these belong to
>> the same family.
>>
>> The same applies to patch 5/5 (implementation of this).
>
> Given that everything except XU4 is already obsoleted, are we going to use
> "hardkernel,odroid-xu3-audio" for Odroid X and Odroid U3?
>
> We could also make it:
> "hardkernel,odroid-xu3-audio", "hardkernel,odroid-x-audio" - for Odroid X, Odroid X2
> "hardkernel,odroid-xu3-audio", "hardkernel,odroid-u3-audio" - for Odroid U3
>
> And in the driver wee would only have "hardkernel,odroid-xu3-audio", while dts
> would contain detailed compatible.

Add only these compatibles which are different. If the binding is the
same, then there is no point of adding new compatible.

If such difference in binding appears, then it is not a problem to add
new compatible. It is however more difficult to remove or change
existing binding...

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.txt b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
index f35a2694eb04..a50a0c6a354b 100644
--- a/Documentation/devicetree/bindings/sound/samsung,odroid.txt
+++ b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
@@ -1,8 +1,10 @@ 
-Samsung Exynos Odroid XU3/XU4 audio complex with MAX98090 codec
+Hardkernel Odroid X/X2/U3/XU3/XU4 audio complex with MAX98090 codec
 
 Required properties:
 
- - compatible - "hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
+ - compatible - "hardkernel,odroid-u3-audio" - for Odroid U3 board,
+		"hardkernel,odroid-x-audio" - for Odroid X, Odroid X2 boards,
+		"hardkernel,odroid-xu3-audio" - for Odroid XU3 board,
 		"hardkernel,odroid-xu4-audio" - for Odroid XU4 board
  - model - the user-visible name of this sound complex
  - clocks - should contain entries matching clock names in the clock-names