Received: by 10.192.165.148 with SMTP id m20csp2740871imm; Sun, 6 May 2018 23:42:13 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo++c2Du4O6JlyNNTn/Sod727TOYcvLhJgdUe8ztXYSPBCzn26S0Oj0/560mdJ59TXoNdot X-Received: by 2002:a17:902:a702:: with SMTP id w2-v6mr17112789plq.8.1525675332997; Sun, 06 May 2018 23:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525675332; cv=none; d=google.com; s=arc-20160816; b=jhjjE0e3/xPthM8Nc/j3LZphV/HNnqVZ5eenD5L1LGt2nu4nF885AM/E336dc0w24J xqqx6Z6pZP1gWEun3PxkVYxRZ1vljviOwMWoUBmq0el0CoIbYL72leHCfItlkvDOlvwS HMaE9r7Dr76zsLGH0w3hSfOmKY18HSNNfZOZhEe3jgA07ktoAwQTJVn9bxz1SMWREisq T/dJXsHgQez6s6G4w/xCjI5fYigCK4QCPuwVfDJC3y7DyAe60wRUfQuu7EzMdMC/L+Q1 zp3CyqoEuNpuMMvzpMagsWoRAa66LP5XPGxD3zMVZgFEo80KaC/DfQZityNaCIOdjRNq TOWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=Aiq6jlCul3zsgUohsrBU/In+jWuj6iclT+0o17g34n8=; b=gviFf3Q2g59JgAe2YaHs874bjXZm2JgRzD4y47ByTyYZABG8PD+nTEb/Md/RlgshVp sXqR81gydfivBt7rzhZst3rWnvpPAnmfjzm7mhgVRQts/wlsJaXaZHZP3+/KtL3WXTtA 6cJ/UAN/RenFZGIZaPTjvWgn7gBu7G3xPYDGiHQ6XdkyFT0+JRIi6Uc7YxUKDeol1+zL T2qeafCV6PwF52P/l288AqlEnyykHCTAc2yuTQXY80IaxHKZllZzQRXT0Ys7pQzrIP5m EdocLY25xZsYZ18ToOZlVlsDxY4AMSDzViDY4Wi1oyDanyTNH51kWYFGSlmIneVz3HvH jKcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Gpveh6eX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b123si21499393pfb.189.2018.05.06.23.41.58; Sun, 06 May 2018 23:42:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Gpveh6eX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbeEGGj7 (ORCPT + 99 others); Mon, 7 May 2018 02:39:59 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:35672 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbeEGGj5 (ORCPT ); Mon, 7 May 2018 02:39:57 -0400 Received: by mail-ua0-f196.google.com with SMTP id a2so17228628uak.2 for ; Sun, 06 May 2018 23:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Aiq6jlCul3zsgUohsrBU/In+jWuj6iclT+0o17g34n8=; b=Gpveh6eXUqlb498CuGP7uMv0bIx8VEfhH+TJ1hbTAYOQhT3u81XKY3UyelrMp78abH 2IDVqnEm5mkAB/OK+qQHw+L61XEw//AoZr8fycv2BOmm5zzuGDG2ZKIVSvpQ4J/1dHvS kfAK9N0gvj0OYYJMZqDBqRNDQGV0uPlagBebU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Aiq6jlCul3zsgUohsrBU/In+jWuj6iclT+0o17g34n8=; b=FRV4am7od88u4ilUVaxJK56dRGGkh2wUtIWZsONkXq4SyUIj9YJFfcLY7sE5D+STy6 0fLS25qVm8bEhoFKjQAxRrTGz6TRZzCg94vB2r5mGhOlssiTHBKF8xfIL427KN+cuTl0 RcE06u3hLShW9ZZTVFy8yWh3uqmVfy7m/lngJuoprdV7RwdREDGnLHO9FiYwFk2Vpvn0 XAvIEgc8TmmSTVEUU8f3UmEQKUaZazwD1Gxr87wlKZjfMq1kiwpRyIWMjRuaFh31O1WN qKYFQYSK3xENEKnZNnlJQi3htk1ijVjQr1NFhodVIW7ZjU7tljHISqHD4cY3ieiIe1iN RKbQ== X-Gm-Message-State: ALQs6tA+N95pftUMPF2aJjH7VOpRkcKsRKCiWiDu71FSuReMpOQZ1IJD cJL+LQJRKRdFXjj127HqbV+rlbVR6twtF5qVcNUXlw== X-Received: by 10.159.51.108 with SMTP id a44mr31829380uac.38.1525675195884; Sun, 06 May 2018 23:39:55 -0700 (PDT) MIME-Version: 1.0 References: <1525334313-28661-1-git-send-email-akshu.agrawal@amd.com> <2E89032DDAA8B9408CB92943514A0337014C1EA102@SW-EX-MBX01.diasemi.com> In-Reply-To: From: Daniel Kurtz Date: Mon, 07 May 2018 06:39:44 +0000 Message-ID: Subject: Re: [PATCH v3] ASoC: da7219: read fmw property to get mclk for non-dts systems To: Akshu Agrawal Cc: Adam.Thomson.Opensource@diasemi.com, Alexander.Deucher@amd.com, Support.Opensource@diasemi.com, perex@perex.cz, tiwai@suse.com, Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 6, 2018 at 10:50 PM Agrawal, Akshu wrote: > On 5/4/2018 2:45 PM, Adam Thomson wrote: > > On 03 May 2018 08:59, Akshu Agrawal wrote: > > > >> Non-dts based systems can use ACPI DSDT to pass on the mclk > >> to da7219. > >> This enables da7219 mclk to be linked to system clock. > >> Enable/Disable of the mclk is already handled in the codec so > >> platform drivers don't have to explicitly do handling of mclk. > >> > >> Signed-off-by: Akshu Agrawal > >> --- > >> v2: Fixed kbuild error > >> v3: Add corresponding clk_put for clk_get > >> include/sound/da7219.h | 2 ++ > >> sound/soc/codecs/da7219.c | 10 +++++++++- > >> 2 files changed, 11 insertions(+), 1 deletion(-) > >> > >> diff --git a/include/sound/da7219.h b/include/sound/da7219.h > >> index 1bfcb16..df7ddf4 100644 > >> --- a/include/sound/da7219.h > >> +++ b/include/sound/da7219.h > >> @@ -38,6 +38,8 @@ struct da7219_pdata { > >> > >> const char *dai_clks_name; > >> > >> + const char *mclk_name; > >> + > >> /* Mic */ > >> enum da7219_micbias_voltage micbias_lvl; > >> enum da7219_mic_amp_in_sel mic_amp_in_sel; > >> diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c > >> index 980a6a8..ecd46fc 100644 > >> --- a/sound/soc/codecs/da7219.c > >> +++ b/sound/soc/codecs/da7219.c > >> @@ -1624,6 +1624,8 @@ static struct da7219_pdata *da7219_fw_to_pdata(struct > >> snd_soc_component *compone > >> dev_warn(dev, "Using default clk name: %s\n", > >> pdata->dai_clks_name); > >> > >> + device_property_read_string(dev, "dlg,mclk-name", &pdata->mclk_name); > >> + > > > > Personally am still not keen on this. To me the use of a device_property_* > > function suggests the same property resides in both DT and ACPI, but here we're > > only using this for the ACPI case. DT has no want or need for this. I still feel > > we should look at something more generic in the clock framework, although I do > > agree with Mark that this should be properly specced. > > > I am not an expert in field of ACPI, IMO forming a Spec and changing > ACPI to have DT like clock framework is good to have but a bigger change > which should be taken up later. > The current code of handling of mclk in the driver is usable only by DT. > The device_property (though ACPI specific) makes this code, a common > code for DT and ACPI based devices. > https://www.kernel.org/doc/Documentation/acpi/DSD-properties-rules.txt > "....Still, for the sake of code re-use, it may make sense to provide as > much of the configuration data as possible in the form of device > properties and complement that with an ACPI-specific mechanism suitable > for the use case at hand......" This sounds like a pretty reasonable justification for addressing the issue using DSD to me. For what its worth, you can add: Reviewed-by: Daniel Kurtz > Thanks, > Akshu