linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Kuninori Morimoto
	<kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Linux-SH <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Linux-I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/5] i2c: rcar: add renesas,i2c-rcar-gen1/gen2 in DT compatible
Date: Thu, 07 Aug 2014 01:10:28 +0000	[thread overview]
Message-ID: <20140807011025.GA3284@verge.net.au> (raw)
In-Reply-To: <8761i5kuel.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>

On Wed, Aug 06, 2014 at 05:36:37PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > 
> > > This patch adds DT compatible for Renesas R-Car Gen1/Gen2.
> > > Current driver has SoC level .compatible
> > > (r8a7778/r8a7779/r8a7790/r8a7791/r8a7792/r8a7793/r8a7794),
> > > but these can be match as generation level.
> > 
> > Hi Morimoto-san,
> > 
> > is this compatibility explicitly documented somewhere?
> 
> ?
> Do you mean ${LINUX}/Documentation/devicetree/bindings/xxx ?
> [1/5] patch have it, but is it not enough ?

Sorry for not being clearer.

At our face-to-face meeting in Montpellier we discussed the
idea of generation bindings. And my recollection is that Magnus
and I had strong reservations about declaring what generation compatibility
is without it being explicitly stated in hardware documentation.

From observation we can say that the i2c controllers on r8a7778 and r8a7779
appear to be compatible. But can we say that in fact they are in fact
compatible hardware. That they are different hardware instances of a common
i2c controller whose name may or may not be is known to us? If not
I do not think that using a common binding describes the hardware,
which is the intention of DT bindings.

A second problem is the using the generation as a name.  Assuming the
answer to the above question is yes can we further say with certainty
that all variants of Gen1 SoCs that currently exist or will exist in the
future are compatible?  If not then using Gen1 as the name does not seem
to accurately describe the hardware.

> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > > ---
> > >  Documentation/devicetree/bindings/i2c/i2c-rcar.txt |    4 +++-
> > >  drivers/i2c/busses/i2c-rcar.c                      |    2 ++
> > >  2 files changed, 5 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > index 16b3e07..0f9e812 100644
> > > --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
> > > @@ -3,6 +3,8 @@ I2C for R-Car platforms
> > >  Required properties:
> > >  - compatible: Must be one of
> > >  	"renesas,i2c-rcar"
> > > +	"renesas,i2c-rcar-gen1"
> > > +	"renesas,i2c-rcar-gen2"
> > >  	"renesas,i2c-r8a7778"
> > >  	"renesas,i2c-r8a7779"
> > >  	"renesas,i2c-r8a7790"
> > > @@ -24,7 +26,7 @@ Examples :
> > >  i2c0: i2c@e6508000 {
> > >  	#address-cells = <1>;
> > >  	#size-cells = <0>;
> > > -	compatible = "renesas,i2c-r8a7791";
> > > +	compatible = "renesas,i2c-r8a7791", "renesas,i2c-rcar-gen2";
> > >  	reg = <0 0xe6508000 0 0x40>;
> > >  	interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
> > >  	clocks = <&mstp9_clks R8A7791_CLK_I2C0>;
> > > diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> > > index f3c7139..6f805f8 100644
> > > --- a/drivers/i2c/busses/i2c-rcar.c
> > > +++ b/drivers/i2c/busses/i2c-rcar.c
> > > @@ -487,6 +487,8 @@ static const struct i2c_algorithm rcar_i2c_algo = {
> > >  
> > >  static const struct of_device_id rcar_i2c_dt_ids[] = {
> > >  	{ .compatible = "renesas,i2c-rcar", .data = (void *)I2C_RCAR_GEN1 },
> > > +	{ .compatible = "renesas,i2c-rcar-gen1", .data = (void *)I2C_RCAR_GEN1 },
> > > +	{ .compatible = "renesas,i2c-rcar-gen2", .data = (void *)I2C_RCAR_GEN2 },
> > >  	{ .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 },
> > >  	{ .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
> > >  	{ .compatible = "renesas,i2c-r8a7790", .data = (void *)I2C_RCAR_GEN2 },
> > > -- 
> > > 1.7.9.5
> > > 
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  parent reply	other threads:[~2014-08-07  1:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  4:39 [PATCH 0/5] i2c: rcar: add renesas,i2c-rcar-gen1/gen2 in DT compatible Kuninori Morimoto
     [not found] ` <87silaw7t2.wl%kuninori.morimoto.gx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-06  4:40   ` [PATCH 1/5] " Kuninori Morimoto
     [not found]     ` <87r40uw7rp.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-08-07  0:18       ` Simon Horman
2014-08-07  0:36         ` Kuninori Morimoto
     [not found]           ` <8761i5kuel.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2014-08-07  1:10             ` Simon Horman [this message]
     [not found]               ` <20140807011025.GA3284-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2014-08-07  2:43                 ` Kuninori Morimoto
2014-08-07  3:55                   ` Magnus Damm
     [not found]                     ` <CANqRtoSu2cZyY2YELUzPF86UAz+=TFtBYsnmotpNDEh9FEhp1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-07  5:19                       ` Kuninori Morimoto
2014-08-07  5:58                         ` Magnus Damm
2014-08-07  8:34                           ` Kuninori Morimoto
2014-09-19 17:18                             ` Wolfram Sang
2014-09-22  2:04                               ` Simon Horman
2014-08-06  4:40   ` [PATCH 2/5] ARM: shmobile: r8a7778: add generation level compatible for i2c Kuninori Morimoto
2014-08-06 19:04   ` [PATCH 0/5] i2c: rcar: add renesas,i2c-rcar-gen1/gen2 in DT compatible Wolfram Sang
2014-08-06  4:40 ` [PATCH 3/5] ARM: shmobile: r8a7779: add generation level compatible for i2c Kuninori Morimoto
2014-08-06  4:40 ` [PATCH 4/5] ARM: shmobile: r8a7790: " Kuninori Morimoto
2014-08-06  4:40 ` [PATCH 5/5] ARM: shmobile: r8a7791: " Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140807011025.GA3284@verge.net.au \
    --to=horms@verge.net.au \
    --cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).