diff mbox

[v3,2/3] usb: renesas_usbhs: add fallback compatibility strings

Message ID 1449799947-19866-3-git-send-email-horms+renesas@verge.net.au
State Not Applicable, archived
Headers show

Commit Message

Simon Horman Dec. 11, 2015, 2:12 a.m. UTC
Add fallback compatibility strings for R-Car Gen2 and Gen3.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
v3
* Moved documentation of SoC names to a separate patch
* Use correct fallback compatibility string in example

v2
* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
  a single compatibility string for all of R-Car.
---
 Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +++++++++-
 drivers/usb/renesas_usbhs/common.c                      |  9 +++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

Comments

Rob Herring (Arm) Dec. 11, 2015, 3:56 a.m. UTC | #1
On Fri, Dec 11, 2015 at 11:12:26AM +0900, Simon Horman wrote:
> Add fallback compatibility strings for R-Car Gen2 and Gen3.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Binding looks okay, but one possible typo.

Acked-by: Rob Herring <robh@kernel.org>

> --- a/drivers/usb/renesas_usbhs/common.c
> +++ b/drivers/usb/renesas_usbhs/common.c
> @@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
>  		.compatible = "renesas,usbhs-r8a7795",
>  		.data = (void *)USBHS_TYPE_RCAR_GEN2,
>  	},
> +	{
> +		.compatible = "renesas,rcar-gen2-usbhs",
> +		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> +	},
> +	{
> +		/* Gen3 is compatible with Gen2 */
> +		.compatible = "renesas,rcar-gen3-usbhs",
> +		.data = (void *)USBHS_TYPE_RCAR_GEN2,

This supposed to be GEN3?

--
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
Simon Horman Dec. 11, 2015, 4:02 a.m. UTC | #2
On Thu, Dec 10, 2015 at 09:56:24PM -0600, Rob Herring wrote:
> On Fri, Dec 11, 2015 at 11:12:26AM +0900, Simon Horman wrote:
> > Add fallback compatibility strings for R-Car Gen2 and Gen3.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> > 
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Binding looks okay, but one possible typo.
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 
> > --- a/drivers/usb/renesas_usbhs/common.c
> > +++ b/drivers/usb/renesas_usbhs/common.c
> > @@ -481,6 +481,15 @@ static const struct of_device_id usbhs_of_match[] = {
> >  		.compatible = "renesas,usbhs-r8a7795",
> >  		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> >  	},
> > +	{
> > +		.compatible = "renesas,rcar-gen2-usbhs",
> > +		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> > +	},
> > +	{
> > +		/* Gen3 is compatible with Gen2 */
> > +		.compatible = "renesas,rcar-gen3-usbhs",
> > +		.data = (void *)USBHS_TYPE_RCAR_GEN2,
> 
> This supposed to be GEN3?

Confusingly the symbol is called GEN2 as it was there for Gen 2
before Gen 3 came along and (so far) Gen 3 is compatible with Gen 2.

I'd be happy to change the name but I think that would be best
as an incremental change on top of this one.
--
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
Sergei Shtylyov Dec. 11, 2015, 12:24 p.m. UTC | #3
Hello.

On 12/11/2015 5:12 AM, Simon Horman wrote:

> Add fallback compatibility strings for R-Car Gen2 and Gen3.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
> v3
> * Moved documentation of SoC names to a separate patch
> * Use correct fallback compatibility string in example
>
> v2
> * Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
>    a single compatibility string for all of R-Car.
> ---
>   Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +++++++++-
>   drivers/usb/renesas_usbhs/common.c                      |  9 +++++++++
>   2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> index a14c0bb561d5..c55cf77006d0 100644
> --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> @@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
>
>   Required properties:
>     - compatible: Must contain one of the following:

    Really?

> +
>   	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
>   	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
>   	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
>   	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> +	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
> +	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
> +
> +	When compatible with the generic version, nodes must list the
> +	SoC-specific version corresponding to the platform first followed
> +	by the generic version.
> +

    This kinda contradicts the above claim.

[...]

MBR, Sergei

--
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
Simon Horman Dec. 15, 2015, 6:41 a.m. UTC | #4
On Fri, Dec 11, 2015 at 03:24:27PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 12/11/2015 5:12 AM, Simon Horman wrote:
> 
> >Add fallback compatibility strings for R-Car Gen2 and Gen3.
> >This is in keeping with the fallback scheme being adopted wherever
> >appropriate for drivers for Renesas SoCs.
> >
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >---
> >v3
> >* Moved documentation of SoC names to a separate patch
> >* Use correct fallback compatibility string in example
> >
> >v2
> >* Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
> >   a single compatibility string for all of R-Car.
> >---
> >  Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +++++++++-
> >  drivers/usb/renesas_usbhs/common.c                      |  9 +++++++++
> >  2 files changed, 18 insertions(+), 1 deletion(-)
> >
> >diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >index a14c0bb561d5..c55cf77006d0 100644
> >--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
> >@@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
> >
> >  Required properties:
> >    - compatible: Must contain one of the following:
> 
>    Really?

Would "...one or more of the following" help?

> >+
> >  	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
> >  	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
> >  	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
> >  	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
> >+	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
> >+	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
> >+
> >+	When compatible with the generic version, nodes must list the
> >+	SoC-specific version corresponding to the platform first followed
> >+	by the generic version.
> >+
> 
>    This kinda contradicts the above claim.
> 
> [...]
> 
> MBR, Sergei
> 
--
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
Geert Uytterhoeven Dec. 15, 2015, 11 a.m. UTC | #5
On Tue, Dec 15, 2015 at 7:41 AM, Simon Horman <horms@verge.net.au> wrote:
>> >diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>> >index a14c0bb561d5..c55cf77006d0 100644
>> >--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>> >+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>> >@@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
>> >
>> >  Required properties:
>> >    - compatible: Must contain one of the following:
>>
>>    Really?
>
> Would "...one or more of the following" help?

+1

>> >+
>> >     - "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
>> >     - "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
>> >     - "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
>> >     - "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
>> >+    - "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
>> >+    - "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
>> >+
>> >+    When compatible with the generic version, nodes must list the
>> >+    SoC-specific version corresponding to the platform first followed
>> >+    by the generic version.
>> >+
>>
>>    This kinda contradicts the above claim.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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
Sergei Shtylyov Dec. 15, 2015, 11:33 a.m. UTC | #6
Hello.

On 12/15/2015 9:41 AM, Simon Horman wrote:

>>> Add fallback compatibility strings for R-Car Gen2 and Gen3.
>>> This is in keeping with the fallback scheme being adopted wherever
>>> appropriate for drivers for Renesas SoCs.
>>>
>>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>>> ---
>>> v3
>>> * Moved documentation of SoC names to a separate patch
>>> * Use correct fallback compatibility string in example
>>>
>>> v2
>>> * Add R-Car Gen2 and Gen3 fallback compatibility strings rather than
>>>    a single compatibility string for all of R-Car.
>>> ---
>>>   Documentation/devicetree/bindings/usb/renesas_usbhs.txt | 10 +++++++++-
>>>   drivers/usb/renesas_usbhs/common.c                      |  9 +++++++++
>>>   2 files changed, 18 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>>> index a14c0bb561d5..c55cf77006d0 100644
>>> --- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>>> +++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
>>> @@ -2,10 +2,18 @@ Renesas Electronics USBHS driver
>>>
>>>   Required properties:
>>>     - compatible: Must contain one of the following:
>>
>>     Really?
>
> Would "...one or more of the following" help?

    It would, of course.

>>> +
>>>   	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
>>>   	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
>>>   	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
>>>   	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
>>> +	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
>>> +	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
>>> +
>>> +	When compatible with the generic version, nodes must list the
>>> +	SoC-specific version corresponding to the platform first followed
>>> +	by the generic version.
>>> +
>>
>>     This kinda contradicts the above claim.
>>
>> [...]

MBR, Sergei

--
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

Patch

diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index a14c0bb561d5..c55cf77006d0 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -2,10 +2,18 @@  Renesas Electronics USBHS driver
 
 Required properties:
   - compatible: Must contain one of the following:
+
 	- "renesas,usbhs-r8a7790" for r8a7790 (R-Car H2) compatible device
 	- "renesas,usbhs-r8a7791" for r8a7791 (R-Car M2-W) compatible device
 	- "renesas,usbhs-r8a7794" for r8a7794 (R-Car E2) compatible device
 	- "renesas,usbhs-r8a7795" for r8a7795 (R-Car H3) compatible device
+	- "renesas,rcar-gen2-usbhs" for R-Car Gen2 compatible device
+	- "renesas,rcar-gen3-usbhs" for R-Car Gen3 compatible device
+
+	When compatible with the generic version, nodes must list the
+	SoC-specific version corresponding to the platform first followed
+	by the generic version.
+
   - reg: Base address and length of the register for the USBHS
   - interrupts: Interrupt specifier for the USBHS
   - clocks: A list of phandle + clock specifier pairs
@@ -22,7 +30,7 @@  Optional properties:
 
 Example:
 	usbhs: usb@e6590000 {
-		compatible = "renesas,usbhs-r8a7790";
+		compatible = "renesas,usbhs-r8a7790", "renesas,rcar-gen2-usbhs";
 		reg = <0 0xe6590000 0 0x100>;
 		interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp7_clks R8A7790_CLK_HSUSB>;
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index d82fa36c3465..db9a17bd8997 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -481,6 +481,15 @@  static const struct of_device_id usbhs_of_match[] = {
 		.compatible = "renesas,usbhs-r8a7795",
 		.data = (void *)USBHS_TYPE_RCAR_GEN2,
 	},
+	{
+		.compatible = "renesas,rcar-gen2-usbhs",
+		.data = (void *)USBHS_TYPE_RCAR_GEN2,
+	},
+	{
+		/* Gen3 is compatible with Gen2 */
+		.compatible = "renesas,rcar-gen3-usbhs",
+		.data = (void *)USBHS_TYPE_RCAR_GEN2,
+	},
 	{ },
 };
 MODULE_DEVICE_TABLE(of, usbhs_of_match);