Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	SH-Linux <linux-sh@vger.kernel.org>,
	"Simon Horman [Horms]" <horms@verge.net.au>,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH] DT: mmc: sh_mmcif: fix "compatible" property text
Date: Sat, 01 Aug 2015 12:41:52 +0300	[thread overview]
Message-ID: <2743376.X2l1zDXaCd@avalon> (raw)
In-Reply-To: <CANqRtoSVU77Q7hnoMJ2_VbqprJYxbvbbe5MHBReH_dVxyvGAQQ@mail.gmail.com>

On Friday 31 July 2015 11:23:04 Magnus Damm wrote:
> On Fri, Jul 31, 2015 at 4:59 AM, Sergei Shtylyov wrote:
> > The "compatible" property text contradicts even the example given in the
> > MMCIF binding document itself; moreover, the Renesas MMCIF driver only 
> > matches  on the generic "compatible" string, and doesn't look for at SoC
> > specific strings currently at all. Thus describe "renesas,sh-mmcif"
> > string as mandatory and the others as optional.
> > 
> > Fixes: b4c27763d749 ("mmc: sh_mmcif: Document DT bindings")
> > Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> Thanks for your efforts trying to improve the DT binding documentation.
> 
> > --- renesas.orig/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
> > +++ renesas/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
> > @@ -6,11 +6,11 @@ and the properties used by the MMCIF dev
> > 
> >  Required properties:
> > -- compatible: must contain one of the following
> > +- compatible: must contain "renesas,sh-mmcif"; may also contain one of
> > 
> > +  the following:
> >         - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
> >         - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
> >         - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
> > 
> > -       - "renesas,sh-mmcif" for the generic MMCIF
> 
> As you know, each SoC contains a wide range of on-chip devices and the
> MMCIF device is just one of them. Exactly how to manage the DT
> bindings must be up to each maintainer and of course this needs to be
> aligned with the SoC maintainer and SoC vendor with policies used for
> SoC support and BSPs and whatnot. Changing policy like this for a
> single device without at least discussing this with the SoC
> maintainers does not help.
> 
> For Renesas hardware we so far use both SoC part number and optionally
> a generic binding as well. As commonly expected, the DT binding is
> supposed to describe the hardware and if hardware devices are
> compatible. Unless we use SoC part number in the compatible string
> there is a risk that the SoC integrator simply copy-and-pastes generic
> bindings "because it works" but this will result in DT binding based
> on software compatibility and not hardware compatibility. Later when
> the driver support is extended this may result in broken software due
> to incorrect compatibility information through generic bindings.
> 
> If anything is unclear please ask and feel free to discuss this DT
> topic with Simon, Laurent, Geert and/or me.

To clarify this, the current DT compatible strings policy for Renesas SoCs is 
to use a mandatory SoC-based string followed by a optional generic strings. 
Optional here refers to the fact that individual DT bindings can decide 
whether to use a generic string or not, based on hardware information. An IP 
core that has a different, incompatible implementation for each SoC it is 
present in can't make use of a generic compatible string. If a particular 
binding defines generic compatible strings those should be made mandatory by 
that binding.

In the MMCIF case, I would propose wording it as

- compatible: must contain one of the following
      - "renesas,mmcif-r8a7740" for the MMCIF found in r8a7740 SoCs
      - "renesas,mmcif-r8a7790" for the MMCIF found in r8a7790 SoCs
      - "renesas,mmcif-r8a7791" for the MMCIF found in r8a7791 SoCs
  followed by "renesas,sh-mmcif".

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-08-01  9:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201404250239.39150.sergei.shtylyov@cogentembedded.com>
2015-07-30 19:59 ` [PATCH] DT: mmc: sh_mmcif: fix "compatible" property text Sergei Shtylyov
2015-07-30 20:33   ` Sergei Shtylyov
2015-07-31  2:23   ` Magnus Damm
2015-08-01  9:41     ` Laurent Pinchart [this message]
     [not found]     ` <55BB44DC.8040706@cogentembedded.com>
2015-08-03  1:09       ` Magnus Damm
2015-07-30 21:29 ` [PATCH] DT: mmc: sh_mmcif: document R8A779[34] support Sergei Shtylyov
2015-08-11 22:37 ` [PATCH v2] DT: mmc: sh_mmcif: fix "compatible" property text Sergei Shtylyov
2015-08-12  0:56   ` Simon Horman
2015-08-12 10:41     ` Sergei Shtylyov
2015-08-12 23:58       ` Simon Horman
2015-08-11 22:57 ` [PATCH v2] DT: mmc: sh_mmcif: document R8A779[34] support Sergei Shtylyov
2015-08-12  0:59   ` Simon Horman
2015-08-12 10:38     ` Sergei Shtylyov
2015-08-12 23:59       ` Simon Horman
2015-08-13  9:27       ` Ulrich Hecht
2015-10-15 22:39 ` [PATCH v3] DT: mmc: sh_mmcif: fix "compatible" property text Sergei Shtylyov
2015-10-16  6:42   ` Geert Uytterhoeven
     [not found]   ` <2188985.g7lrY44qCa-gHKXc3Y1Z8zGSmamagVegGFoWSdPRAKMAL8bYrjMMd8@public.gmane.org>
2015-10-16 13:07     ` Ulf Hansson
2015-10-15 22:40 ` [PATCH v3] DT: mmc: sh_mmcif: document R8A779[34] support Sergei Shtylyov
2015-10-16  6:42   ` Geert Uytterhoeven
2015-10-16 13:07   ` Ulf Hansson
2015-10-20 20:19     ` Sergei Shtylyov
     [not found]       ` <5626A1CF.9050309-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2015-10-21  8:38         ` Ulf Hansson
2015-10-21 18:42           ` Sergei Shtylyov
2015-10-27 16:58       ` Geert Uytterhoeven

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=2743376.X2l1zDXaCd@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=ulf.hansson@linaro.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