All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	Nicolin Chen <b42378@freescale.com>,
	"timur@tabi.org" <timur@tabi.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"tomasz.figa@gmail.com" <tomasz.figa@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"R65777@freescale.com" <R65777@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v7 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
Date: Tue, 20 Aug 2013 10:28:34 -0600	[thread overview]
Message-ID: <52139932.2050402@wwwdotorg.org> (raw)
In-Reply-To: <20130820051947.GB29114@S2101-09.ap.freescale.net>

On 08/19/2013 11:19 PM, Shawn Guo wrote:
> On Mon, Aug 19, 2013 at 10:54:33AM +0100, Mark Rutland wrote:
>>> I guess it's better to drop the 'imx6q-spdif' here?
>>
>> That depends:
>>
>> * If the two IP blocks are identical, only the "imx35-spdif" name is
>>   necessary, and we can forget about "fsl,imx6q-spdif".
>>
>> * If "fsl,imx6q-spdif" is a strict superset of "fsl,imx35-spdif", having
>>   both names documented and in a compatible list for a "fsl,imx6q-spdif"
>>   device makes sense.
> 
> Practically, I found it's very useful to have "fsl,<soc>-<ip>" in the
> device compatible property in <soc>.dtsi, even when device driver does
> not match it right now.  For this example, I still prefer to have the
> following line for spdif device in imx6q.dtsi.
> 
> 	compatible = "fsl,imx6q-spdif", "fsl,imx35-spdif";
> 
> The reason for that is we usually do not see all the differences of an
> IP block from one SoC to another when we firstly define the bindings
> for the device by looking at hardware reference manual.  Some
> programming model differences are only identified when we're actually
> programming.  That said, if some day we find there is difference between
> imx6q-spdif and imx35-spdif to be handled when we add something new to
> the driver, we only need to add "fsl,imx6q-spdif" as a new compatible
> into device driver and bindings document.  The existing device tree
> would need no update to work with the new kernel driver.

Yes, we should definitely include the specific SoC model in the
compatible property even in the case where we've done exhaustive
research and validated that the two IP blocks are indeed 100% identical.

This enables us to retro-actively enable and bug workarounds or quirks
which are required for one SoC but not the other. If the compatible
value is already there in DT, we just need a code-change. If the
compatible value isn't already there in DT, we need to change the DT as
well, which means only new DTs will work correctly with new kernels.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Nicolin Chen <b42378@freescale.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"timur@tabi.org" <timur@tabi.org>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"tomasz.figa@gmail.com" <tomasz.figa@gmail.com>,
	"R65777@freescale.com" <R65777@freescale.com>
Subject: Re: [PATCH v7 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
Date: Tue, 20 Aug 2013 10:28:34 -0600	[thread overview]
Message-ID: <52139932.2050402@wwwdotorg.org> (raw)
In-Reply-To: <20130820051947.GB29114@S2101-09.ap.freescale.net>

On 08/19/2013 11:19 PM, Shawn Guo wrote:
> On Mon, Aug 19, 2013 at 10:54:33AM +0100, Mark Rutland wrote:
>>> I guess it's better to drop the 'imx6q-spdif' here?
>>
>> That depends:
>>
>> * If the two IP blocks are identical, only the "imx35-spdif" name is
>>   necessary, and we can forget about "fsl,imx6q-spdif".
>>
>> * If "fsl,imx6q-spdif" is a strict superset of "fsl,imx35-spdif", having
>>   both names documented and in a compatible list for a "fsl,imx6q-spdif"
>>   device makes sense.
> 
> Practically, I found it's very useful to have "fsl,<soc>-<ip>" in the
> device compatible property in <soc>.dtsi, even when device driver does
> not match it right now.  For this example, I still prefer to have the
> following line for spdif device in imx6q.dtsi.
> 
> 	compatible = "fsl,imx6q-spdif", "fsl,imx35-spdif";
> 
> The reason for that is we usually do not see all the differences of an
> IP block from one SoC to another when we firstly define the bindings
> for the device by looking at hardware reference manual.  Some
> programming model differences are only identified when we're actually
> programming.  That said, if some day we find there is difference between
> imx6q-spdif and imx35-spdif to be handled when we add something new to
> the driver, we only need to add "fsl,imx6q-spdif" as a new compatible
> into device driver and bindings document.  The existing device tree
> would need no update to work with the new kernel driver.

Yes, we should definitely include the specific SoC model in the
compatible property even in the case where we've done exhaustive
research and validated that the two IP blocks are indeed 100% identical.

This enables us to retro-actively enable and bug workarounds or quirks
which are required for one SoC but not the other. If the compatible
value is already there in DT, we just need a code-change. If the
compatible value isn't already there in DT, we need to change the DT as
well, which means only new DTs will work correctly with new kernels.

  parent reply	other threads:[~2013-08-20 16:28 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19  8:35 [PATCH v7 0/2] Add freescale S/PDIF CPU DAI and machine drivers Nicolin Chen
2013-08-19  8:35 ` Nicolin Chen
2013-08-19  8:35 ` Nicolin Chen
2013-08-19  8:35 ` [PATCH v7 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver Nicolin Chen
2013-08-19  8:35   ` Nicolin Chen
2013-08-19  8:35   ` Nicolin Chen
2013-08-19  9:18   ` Mark Rutland
2013-08-19  9:18     ` Mark Rutland
2013-08-19  9:34     ` Nicolin Chen
2013-08-19  9:34       ` Nicolin Chen
2013-08-19  9:54       ` Mark Rutland
2013-08-19  9:54         ` Mark Rutland
2013-08-19 10:13         ` Nicolin Chen
2013-08-19 10:13           ` Nicolin Chen
2013-08-19 11:13           ` Mark Rutland
2013-08-19 11:13             ` Mark Rutland
2013-08-19 11:34             ` Nicolin Chen
2013-08-19 11:34               ` Nicolin Chen
2013-08-20  8:47               ` Mark Rutland
2013-08-20  8:47                 ` Mark Rutland
2013-08-20  5:19         ` Shawn Guo
2013-08-20  5:19           ` Shawn Guo
2013-08-20  8:54           ` Mark Rutland
2013-08-20  8:54             ` Mark Rutland
2013-08-20 16:28           ` Stephen Warren [this message]
2013-08-20 16:28             ` Stephen Warren
2013-08-19  8:35 ` [PATCH v7 2/2] ASoC: fsl: Add S/PDIF machine driver Nicolin Chen
2013-08-19  8:35   ` Nicolin Chen
2013-08-19  8:35   ` Nicolin Chen
2013-08-19  9:24   ` Mark Rutland
2013-08-19  9:24     ` Mark Rutland
2013-08-19  9:50     ` Nicolin Chen
2013-08-19  9:50       ` Nicolin Chen
2013-08-19 10:01       ` Mark Rutland
2013-08-19 10:01         ` Mark Rutland
2013-08-19 10:21         ` Nicolin Chen
2013-08-19 10:21           ` Nicolin Chen
2013-08-19 11:15           ` Mark Rutland
2013-08-19 11:15             ` Mark Rutland
2013-08-19 10:27         ` Philipp Zabel
2013-08-19 10:27           ` Philipp Zabel
2013-08-19 10:52         ` Mark Brown
2013-08-19 10:52           ` Mark Brown
2013-08-19 10:52           ` Mark Brown
2013-08-19 11:31           ` Mark Rutland
2013-08-19 11:31             ` Mark Rutland
2013-08-19 11:45             ` Mark Brown
2013-08-19 11:45               ` Mark Brown
2013-08-19 11:45               ` Mark Brown

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=52139932.2050402@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=R65777@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b42378@freescale.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.rutland@arm.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rob.herring@calxeda.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=timur@tabi.org \
    --cc=tomasz.figa@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.