All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Nicolin Chen <b42378@freescale.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	lars@metafoo.de, timur@tabi.org, rob.herring@calxeda.com,
	broonie@kernel.org, p.zabel@pengutronix.de,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 resent 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
Date: Wed, 14 Aug 2013 09:50:17 +0200	[thread overview]
Message-ID: <20130814075017.GE2324@pengutronix.de> (raw)
In-Reply-To: <51808310dd97d2a35a28766ed7309f269521cafd.1376309076.git.b42378@freescale.com>

On Mon, Aug 12, 2013 at 08:05:27PM +0800, Nicolin Chen wrote:
> This patch add S/PDIF controller driver for Freescale SoC.
> 
> Signed-off-by: Nicolin Chen <b42378@freescale.com>
> +
> +Required properties:
> +
> +  - compatible : Compatible list, contains "fsl,<chip>-spdif". Using general
> +  "fsl,fsl-spdif" will get the default SoC type -- imx6q-spdif.
> +
> +  - reg : Offset and length of the register set for the device.
> +
> +  - interrupts : Contains spdif interrupt.
> +
> +  - dmas : Generic dma devicetree binding as described in
> +  Documentation/devicetree/bindings/dma/dma.txt.
> +
> +  - dma-names : Two dmas have to be defined, "tx" and "rx".
> +
> +  - clocks : Contains an entry for each entry in clock-names.
> +
> +  - clock-names : Includes the following entries:
> +	name		type		comments
> +	"core"		Required	The core clock of spdif controller
> +	"rx"		Optional	Rx clock source for spdif record.
> +					If absent, will use core clock.
> +	"tx"		Optional	Tx clock source for spdif playback.
> +					If absent, will use core clock.
> +	"tx-32000"	Optional	Tx clock source for 32000Hz sample rate
> +					playback. If absent, will use tx clock.
> +	"tx-44100"	Optional	Tx clock source for 44100Hz sample rate
> +					playback. If absent, will use tx clock.
> +	"tx-48000"	Optional	Tx clock source for 48000Hz sample rate
> +					playback. If absent, will use tx clock.
> +
> +  - tx-clksrc-names : The names for all available clock sources for tx, which
> +  is also being listed in SoC reference manual, ClkSrc_Sel bit of SPDIF_SRPC.
> +  And the name list would be different between different SoC. Use 'null' for
> +  those unlisted names, and the max number of tx-clksrc-names should be 8.
> +
> +  - rx-clksrc-names : The names for all available clock sources for rx, which
> +  is also being listed in SoC reference manual, TxClk_Source bit of SPDIF_STC.
> +  And the name list would be different between different SoC. Use 'null' for
> +  those unlisted names, and the max number of rx-clksrc-names should be 16.
> +
> +Optional properties:
> +
> +  - rx-clksrc-lock: This is a boolean property. If present, ClkSrc_Sel bit
> +  of SPDIF_SRPC would be set a clock source that cares DPLL locked condition.
> +
> +Example1:
> +
> +spdif: spdif@02004000 {
> +	compatible = "fsl,imx6q-spdif";
> +	reg = <0x02004000 0x4000>;
> +	interrupts = <0 52 0x04>;
> +	dmas = <&sdma 14 18 0>,
> +	       <&sdma 15 18 0>;
> +	dma-names = "rx", "tx";
> +
> +	clocks = <&clks 197>;
> +	clock-names = "core";
> +	rx-clksrc-lock;
> +	rx-clksrc-names =
> +		"lock.ext", "lock.spdif", "lock.asrc",
> +		"lock.spdif_ext", "lock.esai", "ext",
> +		"spdif", "asrc", "spdif_ext", "esai",
> +		"lock.mlb", "lock.mlb_phy", "mlb",
> +		"mlb_phy";
> +	tx-clksrc-names =
> +		"xtal", "spdif", "asrc", "spdif_ext",
> +		"esai", "ipg", "mlb", "mlb_phy";

I had a hard time understanding what you are doing here.

With this the clk names in arch/arm/mach-imx/clk-imx6q.c become an API
between the Kernel and the devicetree. Don't do that.

There is a standardized devicetree binding for clocks. Use it.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Nicolin Chen <b42378@freescale.com>
Cc: broonie@kernel.org, lars@metafoo.de, p.zabel@pengutronix.de,
	linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org,
	devicetree@vger.kernel.org, timur@tabi.org,
	rob.herring@calxeda.com
Subject: Re: [PATCH v4 resent 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver
Date: Wed, 14 Aug 2013 09:50:17 +0200	[thread overview]
Message-ID: <20130814075017.GE2324@pengutronix.de> (raw)
In-Reply-To: <51808310dd97d2a35a28766ed7309f269521cafd.1376309076.git.b42378@freescale.com>

On Mon, Aug 12, 2013 at 08:05:27PM +0800, Nicolin Chen wrote:
> This patch add S/PDIF controller driver for Freescale SoC.
> 
> Signed-off-by: Nicolin Chen <b42378@freescale.com>
> +
> +Required properties:
> +
> +  - compatible : Compatible list, contains "fsl,<chip>-spdif". Using general
> +  "fsl,fsl-spdif" will get the default SoC type -- imx6q-spdif.
> +
> +  - reg : Offset and length of the register set for the device.
> +
> +  - interrupts : Contains spdif interrupt.
> +
> +  - dmas : Generic dma devicetree binding as described in
> +  Documentation/devicetree/bindings/dma/dma.txt.
> +
> +  - dma-names : Two dmas have to be defined, "tx" and "rx".
> +
> +  - clocks : Contains an entry for each entry in clock-names.
> +
> +  - clock-names : Includes the following entries:
> +	name		type		comments
> +	"core"		Required	The core clock of spdif controller
> +	"rx"		Optional	Rx clock source for spdif record.
> +					If absent, will use core clock.
> +	"tx"		Optional	Tx clock source for spdif playback.
> +					If absent, will use core clock.
> +	"tx-32000"	Optional	Tx clock source for 32000Hz sample rate
> +					playback. If absent, will use tx clock.
> +	"tx-44100"	Optional	Tx clock source for 44100Hz sample rate
> +					playback. If absent, will use tx clock.
> +	"tx-48000"	Optional	Tx clock source for 48000Hz sample rate
> +					playback. If absent, will use tx clock.
> +
> +  - tx-clksrc-names : The names for all available clock sources for tx, which
> +  is also being listed in SoC reference manual, ClkSrc_Sel bit of SPDIF_SRPC.
> +  And the name list would be different between different SoC. Use 'null' for
> +  those unlisted names, and the max number of tx-clksrc-names should be 8.
> +
> +  - rx-clksrc-names : The names for all available clock sources for rx, which
> +  is also being listed in SoC reference manual, TxClk_Source bit of SPDIF_STC.
> +  And the name list would be different between different SoC. Use 'null' for
> +  those unlisted names, and the max number of rx-clksrc-names should be 16.
> +
> +Optional properties:
> +
> +  - rx-clksrc-lock: This is a boolean property. If present, ClkSrc_Sel bit
> +  of SPDIF_SRPC would be set a clock source that cares DPLL locked condition.
> +
> +Example1:
> +
> +spdif: spdif@02004000 {
> +	compatible = "fsl,imx6q-spdif";
> +	reg = <0x02004000 0x4000>;
> +	interrupts = <0 52 0x04>;
> +	dmas = <&sdma 14 18 0>,
> +	       <&sdma 15 18 0>;
> +	dma-names = "rx", "tx";
> +
> +	clocks = <&clks 197>;
> +	clock-names = "core";
> +	rx-clksrc-lock;
> +	rx-clksrc-names =
> +		"lock.ext", "lock.spdif", "lock.asrc",
> +		"lock.spdif_ext", "lock.esai", "ext",
> +		"spdif", "asrc", "spdif_ext", "esai",
> +		"lock.mlb", "lock.mlb_phy", "mlb",
> +		"mlb_phy";
> +	tx-clksrc-names =
> +		"xtal", "spdif", "asrc", "spdif_ext",
> +		"esai", "ipg", "mlb", "mlb_phy";

I had a hard time understanding what you are doing here.

With this the clk names in arch/arm/mach-imx/clk-imx6q.c become an API
between the Kernel and the devicetree. Don't do that.

There is a standardized devicetree binding for clocks. Use it.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2013-08-14  7:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 12:05 [PATCH v4 resent 0/2] Add freescale S/PDIF CPU DAI and machine drivers Nicolin Chen
2013-08-12 12:05 ` Nicolin Chen
2013-08-12 12:05 ` Nicolin Chen
2013-08-12 12:05 ` [PATCH v4 resent 1/2] ASoC: fsl: Add S/PDIF CPU DAI driver Nicolin Chen
2013-08-12 12:05   ` Nicolin Chen
2013-08-12 12:05   ` Nicolin Chen
2013-08-14  7:50   ` Sascha Hauer [this message]
2013-08-14  7:50     ` Sascha Hauer
2013-08-14  8:48     ` Nicolin Chen
2013-08-14  8:48       ` Nicolin Chen
2013-08-14  9:56       ` Sascha Hauer
2013-08-14  9:56         ` [alsa-devel] " Sascha Hauer
2013-08-14 10:23         ` Nicolin Chen
2013-08-14 10:23           ` [alsa-devel] " Nicolin Chen
2013-08-14 10:23           ` Nicolin Chen
2013-08-14 12:19           ` Sascha Hauer
2013-08-14 12:19             ` [alsa-devel] " Sascha Hauer
2013-08-15  2:33             ` Nicolin Chen
2013-08-15  2:33               ` [alsa-devel] " Nicolin Chen
2013-08-14 12:06       ` Philipp Zabel
2013-08-14 12:06         ` Philipp Zabel
2013-08-15  2:28         ` Nicolin Chen
2013-08-15  2:28           ` Nicolin Chen
2013-08-12 12:05 ` [PATCH v4 resent 2/2] ASoC: fsl: Add S/PDIF machine driver Nicolin Chen
2013-08-12 12:05   ` Nicolin Chen
2013-08-12 12:05   ` Nicolin Chen

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=20130814075017.GE2324@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=b42378@freescale.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lars@metafoo.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rob.herring@calxeda.com \
    --cc=timur@tabi.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 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.