devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Valentine <valentine.barshak@cogentembedded.com>
Cc: "linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Simon Horman <horms@verge.net.au>,
	Magnus Damm <magnus.damm@gmail.com>,
	Vladimir Barinov <vladimir.barinov@cogentembedded.com>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 1/2] sata_rcar: Adjust and document device tree bindings
Date: Tue, 15 Oct 2013 09:15:32 +0100	[thread overview]
Message-ID: <20131015081532.GC19196@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <525C27A9.5010402@cogentembedded.com>

On Mon, Oct 14, 2013 at 06:19:37PM +0100, Valentine wrote:
> Hi Mark,
> thanks for looking at this.
> 
> On 10/14/2013 08:13 PM, Mark Rutland wrote:
> > On Mon, Oct 14, 2013 at 04:42:33PM +0100, Valentine Barshak wrote:
> >> This converts the R-Car SATA DT compatibility string to
> >> the <unit>-<soc> format which is the preferred one for
> >> all SH-Mobile devices. The DT bindings are documented.
> >>
> >> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> >> ---
> >>   Documentation/devicetree/bindings/ata/sata_rcar.txt | 16 ++++++++++++++++
> >>   arch/arm/boot/dts/r8a7779.dtsi                      |  2 +-
> >>   drivers/ata/sata_rcar.c                             |  2 +-
> >>   3 files changed, 18 insertions(+), 2 deletions(-)
> >>   create mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> >> new file mode 100644
> >> index 0000000..2465183
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> >> @@ -0,0 +1,16 @@
> >> +* Renesas R-Car SATA
> >> +
> >> +Required properties:
> >> +- compatible		: must be "renesas,sata-r8a7779"
> >
> > s/must be/should include/
> >
> 
> OK, thanks.

Cheers.

> 
> >> +- reg			: address range of the SATA registers.
> >
> > Also their size...
> 
> Do you want me to rephrase it to "base address and size of the SATA 
> registers"?
> 
> Looks like a lot of other bindings examples available in 
> Documentation/devicetree/bindings describe regs property
> as the "address range" which implies the address and size
> of the registers.

This is unfortunately one area where there isn't any general consensus
on the terminology. I think "base address and size ..." is sufficient --
it maps well to the set of address-cells and size-cells. For reg values
describing MMIO register blocks, ePAPR says "the offsets and lengths of
the memory-mapped IO register blocks", and there's similar wording in
other bindings.

> 
> >
> >> +- interrupt-parent	: interrupt parent controller phandle
> >
> > This isn't required as such, as the interrupt-controller can be
> > inherited from the parent. As it's a standard auxiliary property I don't
> > think it needs to be documented here.
> 
> OK, will drop it, thanks.

Ok.

> 
> >
> >> +- interrupts		: must consist of one interrupt specifier.
> >
> > Is there only one interrupt generated by the device?
> 
> Yes, there's just one IRQ.

Ok.

> 
> >
> >> +
> >> +Example:
> >> +
> >> +sata: sata@fc600000 {
> >> +	compatible = "renesas,sata-r8a7779";
> >> +	reg = <0xfc600000 0x2000>;
> >> +	interrupt-parent = <&gic>;
> >> +	interrupts = <0 100 0x4>;
> >> +};
> >> diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
> >> index da61d27..b1747f5 100644
> >> --- a/arch/arm/boot/dts/r8a7779.dtsi
> >> +++ b/arch/arm/boot/dts/r8a7779.dtsi
> >> @@ -201,7 +201,7 @@
> >>   	};
> >>
> >>   	sata: sata@fc600000 {
> >> -		compatible = "renesas,rcar-sata";
> >> +		compatible = "renesas,sata-r8a7779";
> >>   		reg = <0xfc600000 0x2000>;
> >>   		interrupt-parent = <&gic>;
> >>   		interrupts = <0 100 0x4>;
> >> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> >> index c2d95e9..c4cd738 100644
> >> --- a/drivers/ata/sata_rcar.c
> >> +++ b/drivers/ata/sata_rcar.c
> >> @@ -893,7 +893,7 @@ static const struct dev_pm_ops sata_rcar_pm_ops = {
> >>   #endif
> >>
> >>   static struct of_device_id sata_rcar_match[] = {
> >> -	{ .compatible = "renesas,rcar-sata", },
> >> +	{ .compatible = "renesas,sata-r8a7779", },
> >>   	{},
> >>   };
> >
> > Why is an existing compatible string being removed?
> >
> > Please do not change existing strings, it will break any dts files that
> > are already in use.
> 
> It won't break the dts files, since I'm changing the only dtsi file that 
> uses the SATA node as well. It will only break binary compatibility with 
> the older dtb files.

Why should an existing dtb suddenly stop working?

What if someone has an out-of-tree dts?

> 
> >
> > While the new compatible string may be preferred, the old string should
> > be kept for compatibility.
> 
> OK, I can keep the old string if it's needed.

Please do.

Thanks,
Mark.

  parent reply	other threads:[~2013-10-15  8:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 15:42 [PATCH 0/2] sata_rcar: Adjust DT bindings and add R-Car Gen2 PHY support Valentine Barshak
2013-10-14 15:42 ` [PATCH 1/2] sata_rcar: Adjust and document device tree bindings Valentine Barshak
2013-10-14 16:13   ` Mark Rutland
2013-10-14 17:19     ` Valentine
2013-10-15  0:25       ` Simon Horman
2013-10-15  8:15       ` Mark Rutland [this message]
2013-10-14 15:42 ` [PATCH 2/2] sata_rcar: Add R-Car Gen2 SATA support Valentine Barshak
2013-10-14 16:26   ` Mark Rutland
2013-10-14 17:58     ` Valentine
2013-10-14 18:15       ` Laurent Pinchart
2013-10-14 21:22         ` Valentine
2013-10-15  0:23           ` Simon Horman
2013-10-15  0:32             ` Laurent Pinchart
2013-10-16  6:10               ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2013-10-15 10:20 [PATCH 0/2] sata_rcar: Adjust DT bindings and add R-Car Gen2 PHY support (take 2) Valentine Barshak
2013-10-15 10:20 ` [PATCH 1/2] sata_rcar: Adjust and document device tree bindings Valentine Barshak
2013-10-16  0:42   ` Simon Horman
2013-10-16 12:05 [PATCH 0/2] sata_rcar: Adjust DT bindings and add R-Car Gen2 PHY support (take 3) Valentine Barshak
2013-10-16 12:06 ` [PATCH 1/2] sata_rcar: Adjust and document device tree bindings Valentine Barshak

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=20131015081532.GC19196@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=tj@kernel.org \
    --cc=valentine.barshak@cogentembedded.com \
    --cc=vladimir.barinov@cogentembedded.com \
    /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).