From: Mark Brown <broonie@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, padma.v@samsung.com,
sbkim73@samsung.com, drake@endlessm.com
Subject: Re: [alsa-devel] [PATCH/RFC 12/14] ASoC: samsung: i2s: Add clock provider for the I2S internal clocks
Date: Fri, 12 Dec 2014 20:03:42 +0000 [thread overview]
Message-ID: <20141212200342.GV11764@sirena.org.uk> (raw)
In-Reply-To: <1418319952-10163-13-git-send-email-s.nawrocki@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]
On Thu, Dec 11, 2014 at 06:45:50PM +0100, Sylwester Nawrocki wrote:
> +Optional Properties:
>
> - samsung,idma-addr: Internal DMA register base address of the audio
> sub system(used in secondary sound source).
> - pinctrl-0: Should specify pin control groups used for this controller.
> - pinctrl-names: Should contain only one value - "default".
> +- #clock-cells: should be 1, this property must be present if the I2S device
> + is a clock provider in terms of the common clock bindings, described in
> + ../clock/clock-bindings.txt.
> +- clock-output-names: from the common clock bindings, names of the CDCLK
> + I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1",
> + "i2s_cdclk3" for the I2S0, I2S1, I2S2 devices recpectively.
> +
Why not make this mandatory going forwards? You can add a note saying
that older DTs may not have it.
> +The assignment of indices for the I2Sx clock provider is as follows:
> + 0 - the CDCLK (CODECLKO) gate clock,
> + 1 - the RCLK prescaler divider clock (corresponding to the IISPSR register),
> + 2 - the RCLKSRC mux clock (corresponding to RCLKSRC bit in register IISMOD).
Why use the indicies here, they only seem to add obscurity?
> + clk_put(rclksrc);
> + }
> + /*
Missing blank line.
> + * Register the mux and div clocks only if both source clocks
> + * are available, i.e. for the I2S0 instance and versions with
> + * QUIRK_NO_MUXPSR quirk not set.
> + */
Why not proceed even if one is missing? This repeats in words the if
statement but doesn't explain why we're doing this.
> + ret = of_clk_add_provider(dev->of_node, of_clk_src_onecell_get,
> + &i2s->clk_data);
> + if (ret < 0) {
> + dev_err(dev, "failed to add clock provider\n");
Best practice is to print the error code.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-12-12 20:03 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 17:45 [PATCH/RFC 00/14] ASoC: samsung: Add clk provider for I2S internal clocks Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 01/14] ASoC: samsung: i2s: Remove unused gpios field from struct i2s Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 02/14] ASoC: samsung: i2s: samsung_i2s_get_driver_data() cleanup Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 03/14] ASoC: samsung: i2s: Add return value checks in probe() Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 04/14] ASoC: samsung: i2s: Request memory region in driver probe() Sylwester Nawrocki
2014-12-12 18:49 ` Mark Brown
2014-12-17 15:10 ` Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 05/14] ASoC: samsung: i2s: Move clk_get() to platform " Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 06/14] ASoC: samsung: i2s: Move clk enable to the " Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 07/14] ASoC: samsung: i2s: Add get_other_dai helper function Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 08/14] ASoC: samsung: i2s: Remove an unneeded goto usage Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 09/14] ASoC: samsung: i2s: Add spinlock in place of local_irq_* calls Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 10/14] ASoC: samsung: i2s: Protect access to more registers with a spinlock Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 11/14] ASoC: samsung: odroidx2: Handle I2S CDCLK clock conditionally Sylwester Nawrocki
2014-12-12 18:53 ` Mark Brown
2014-12-17 15:18 ` Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 12/14] ASoC: samsung: i2s: Add clock provider for the I2S internal clocks Sylwester Nawrocki
2014-12-12 20:03 ` Mark Brown [this message]
2014-12-17 17:00 ` [alsa-devel] " Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 13/14] ARM: dts: Exynos4 and Odroid X2/U3 sound device nodes update Sylwester Nawrocki
2014-12-11 17:45 ` [PATCH/RFC 14/14] ARM: dts: Switch Odroid X2/U2 to simple-audio-card Sylwester Nawrocki
2014-12-16 3:16 ` [alsa-devel] [PATCH/RFC 00/14] ASoC: samsung: Add clk provider for I2S internal clocks Padma Venkat
2014-12-19 13:53 ` Sylwester Nawrocki
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=20141212200342.GV11764@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=drake@endlessm.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=padma.v@samsung.com \
--cc=s.nawrocki@samsung.com \
--cc=sbkim73@samsung.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