Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1272792 > unrolled thread
| Started by | Songjun Wu <songjun.wu@atmel.com> |
|---|---|
| First post | 2015-11-19 04:40 +0100 |
| Last post | 2015-11-23 04:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock Songjun Wu <songjun.wu@atmel.com> - 2015-11-19 04:40 +0100
Re: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock Mark Brown <broonie@kernel.org> - 2015-11-20 19:10 +0100
Re: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock "Wu, Songjun" <songjun.wu@atmel.com> - 2015-11-23 04:10 +0100
| From | Songjun Wu <songjun.wu@atmel.com> |
|---|---|
| Date | 2015-11-19 04:40 +0100 |
| Subject | [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock |
| Message-ID | <qwoeL-3V4-29@gated-at.bofh.it> |
Set GCK's parent clock as audio clock, make
sure the GCK's parent clock is audio clock.
Signed-off-by: Songjun Wu <songjun.wu@atmel.com>
---
sound/soc/atmel/atmel-classd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index 8276675..2f5190b 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -588,6 +588,12 @@ static int atmel_classd_probe(struct platform_device *pdev)
return ret;
}
+ ret = clk_set_parent(dd->gclk, dd->aclk);
+ if (ret) {
+ dev_err(dev, "failed to set GCK parent clock: %d\n", ret);
+ return ret;
+ }
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(dev, "no memory resource\n");
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-11-20 19:10 +0100 |
| Message-ID | <qwYid-2hb-11@gated-at.bofh.it> |
| In reply to | #1272792 |
[Multipart message — attachments visible in raw view] — view raw
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.
[toc] | [prev] | [next] | [standalone]
| From | "Wu, Songjun" <songjun.wu@atmel.com> |
|---|---|
| Date | 2015-11-23 04:10 +0100 |
| Message-ID | <qxPFT-4qx-1@gated-at.bofh.it> |
| In reply to | #1274326 |
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web