All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu, Songjun" <songjun.wu@atmel.com>
To: Mark Brown <broonie@kernel.org>
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: Mon, 23 Nov 2015 11:01:54 +0800	[thread overview]
Message-ID: <565281A2.4050500@atmel.com> (raw)
In-Reply-To: <20151120180854.GD1929@sirena.org.uk>



On 11/21/2015 02:08, Mark Brown wrote:
> 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.
>

You are right. The GCK's parent clock should be assigned in device tree, 
not in the driver. The DT binding for classD should be modified to set 
the GCK's parent clock as audio clock.
Thank you.

WARNING: multiple messages have this Message-ID (diff)
From: songjun.wu@atmel.com (Wu, Songjun)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock
Date: Mon, 23 Nov 2015 11:01:54 +0800	[thread overview]
Message-ID: <565281A2.4050500@atmel.com> (raw)
In-Reply-To: <20151120180854.GD1929@sirena.org.uk>



On 11/21/2015 02:08, Mark Brown wrote:
> 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.
>

You are right. The GCK's parent clock should be assigned in device tree, 
not in the driver. The DT binding for classD should be modified to set 
the GCK's parent clock as audio clock.
Thank you.

WARNING: multiple messages have this Message-ID (diff)
From: "Wu, Songjun" <songjun.wu@atmel.com>
To: Mark Brown <broonie@kernel.org>
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: Mon, 23 Nov 2015 11:01:54 +0800	[thread overview]
Message-ID: <565281A2.4050500@atmel.com> (raw)
In-Reply-To: <20151120180854.GD1929@sirena.org.uk>



On 11/21/2015 02:08, Mark Brown wrote:
> 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.
>

You are right. The GCK's parent clock should be assigned in device tree, 
not in the driver. The DT binding for classD should be modified to set 
the GCK's parent clock as audio clock.
Thank you.

  reply	other threads:[~2015-11-23  3:02 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
2015-11-20 18:08   ` Mark Brown
2015-11-20 18:08   ` Mark Brown
2015-11-23  3:01   ` Wu, Songjun [this message]
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=565281A2.4050500@atmel.com \
    --to=songjun.wu@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@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.