Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbbKWDCO (ORCPT ); Sun, 22 Nov 2015 22:02:14 -0500 Received: from nasmtp01.atmel.com ([192.199.1.246]:46909 "EHLO DVREDG02.corp.atmel.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752991AbbKWDCN (ORCPT ); Sun, 22 Nov 2015 22:02:13 -0500 Subject: Re: [PATCH] ASoC: Atmel: ClassD: Set GCK's parent clock To: Mark Brown References: <1447903590-3285-1-git-send-email-songjun.wu@atmel.com> <20151120180854.GD1929@sirena.org.uk> CC: , Nicolas Ferre , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , , From: "Wu, Songjun" Organization: ATMEL Message-ID: <565281A2.4050500@atmel.com> Date: Mon, 23 Nov 2015 11:01:54 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151120180854.GD1929@sirena.org.uk> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1030 Lines: 28 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/