All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Songjun Wu <songjun.wu@atmel.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock
Date: Fri, 20 Nov 2015 18:08:54 +0000	[thread overview]
Message-ID: <20151120180854.GD1929@sirena.org.uk> (raw)
In-Reply-To: <1447903590-3285-1-git-send-email-songjun.wu@atmel.com>


[-- Attachment #1.1: Type: text/plain, Size: 526 bytes --]

On Thu, Nov 19, 2015 at 11:26:30AM +0800, Songjun Wu wrote:
> Set GCK's parent clock as audio clock, make
> sure the GCK's parent clock is audio clock.

> +	ret = clk_set_parent(dd->gclk, dd->aclk);
> +	if (ret) {
> +		dev_err(dev, "failed to set GCK parent clock: %d\n", ret);
> +		return ret;
> +	}

Why are we doing this in the driver?  This should be done by whatever
creates the clock tree, not by the driver that uses the clocks - that
way if some future SoC has a different clock tree the driver will
continue to work.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock
Date: Fri, 20 Nov 2015 18:08:54 +0000	[thread overview]
Message-ID: <20151120180854.GD1929@sirena.org.uk> (raw)
In-Reply-To: <1447903590-3285-1-git-send-email-songjun.wu@atmel.com>

On Thu, Nov 19, 2015 at 11:26:30AM +0800, Songjun Wu wrote:
> Set GCK's parent clock as audio clock, make
> sure the GCK's parent clock is audio clock.

> +	ret = clk_set_parent(dd->gclk, dd->aclk);
> +	if (ret) {
> +		dev_err(dev, "failed to set GCK parent clock: %d\n", ret);
> +		return ret;
> +	}

Why are we doing this in the driver?  This should be done by whatever
creates the clock tree, not by the driver that uses the clocks - that
way if some future SoC has a different clock tree the driver will
continue to work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151120/e13829e1/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Songjun Wu <songjun.wu@atmel.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock
Date: Fri, 20 Nov 2015 18:08:54 +0000	[thread overview]
Message-ID: <20151120180854.GD1929@sirena.org.uk> (raw)
In-Reply-To: <1447903590-3285-1-git-send-email-songjun.wu@atmel.com>

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

On Thu, Nov 19, 2015 at 11:26:30AM +0800, Songjun Wu wrote:
> Set GCK's parent clock as audio clock, make
> sure the GCK's parent clock is audio clock.

> +	ret = clk_set_parent(dd->gclk, dd->aclk);
> +	if (ret) {
> +		dev_err(dev, "failed to set GCK parent clock: %d\n", ret);
> +		return ret;
> +	}

Why are we doing this in the driver?  This should be done by whatever
creates the clock tree, not by the driver that uses the clocks - that
way if some future SoC has a different clock tree the driver will
continue to work.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-11-20 18:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19  3:26 [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock Songjun Wu
2015-11-19  3:26 ` Songjun Wu
2015-11-19  3:26 ` Songjun Wu
2015-11-20 18:08 ` Mark Brown [this message]
2015-11-20 18:08   ` Mark Brown
2015-11-20 18:08   ` Mark Brown
2015-11-23  3:01   ` Wu, Songjun
2015-11-23  3:01     ` Wu, Songjun
2015-11-23  3:01     ` Wu, Songjun

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=20151120180854.GD1929@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=songjun.wu@atmel.com \
    --cc=tiwai@suse.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.