Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755816AbdLVCY1 (ORCPT ); Thu, 21 Dec 2017 21:24:27 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:63362 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752385AbdLVCYW (ORCPT ); Thu, 21 Dec 2017 21:24:22 -0500 X-IronPort-AV: E=Sophos;i="5.45,438,1508770800"; d="scan'208";a="265915681" Message-ID: <87a7ybo6em.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Ryan Lee Cc: , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH] ASoC: max98373: Added Amplifier Driver In-Reply-To: <1513907030-18441-1-git-send-email-ryans.lee@maximintegrated.com> References: <1513907030-18441-1-git-send-email-ryans.lee@maximintegrated.com> User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Date: Fri, 22 Dec 2017 02:24:12 +0000 X-Originating-IP: [211.11.155.138] X-ClientProxiedBy: TY1PR01CA0081.jpnprd01.prod.outlook.com (2603:1096:401:c::41) To KL1PR0601MB1880.apcprd06.prod.outlook.com (2603:1096:802:8::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e0cbae93-6eda-41e1-98c5-08d548e317ff X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060);SRVR:KL1PR0601MB1880; X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1880;3:E5bZSHku+XMkLBCSVJyLzTwjV7s78hq3WAciBRuS9lWOgNPwP845kGPxAgVGgESi84cHGO+75JGawF4sW4qqmglmn5Qb+SoOEo3Yi93Jo/GCqulP7Bs6Mhwm8Z+e+zESIosLvV3kWSr+tqy8ZJX2TNUWk/WNkdLgCq6Tkqj4gWcUDO0i0NEw6oiy654Y+8fL5seabsyWh7+DCEcUay92iLMkguwX+sLvxscFXXnFwby/mcz2rsALmo1yLObqoHHu;25:dAa98aM4i/ulsABfZ3OTGu/r59UkfoMga3QLVw3TRiKuNulg1b/yoRN1mLsbyYLML45+8jrDFVhy6IF+ZBfn/vJgAG2vvzU/dMQ5EHxn7koxn/NTglRnYyr3TH6LDlwAqdNDZkV/mnqmOlSwC+yu46IoYLJPilzCFfH8MqInvCjvqSxwSKNS6aYOJu7+RjrD7F6QYGQVeN0Xdojz+IwtyQNsatg4UNinGCv1AcI28pydYGQdBDhYHepjsMSvl7fQ2XYNgFttdXwOrJdaQcoTxkAGV7WisKYeHX2eeNeFIoNbddSJAn5odly2iF32UcnRG9+834ehegyQVkhAgfWcfw==;31:Pai729b4XttMzaaKisU+VdpxQUtqM9Xb4JwBLHJn5ljfdwP1/psvNak2FCs+tWL1CzQD40hS38yKOpTIruyrEMstbLKu1gbpIggKAr/pfkTKVWCdwuP7J2SUKfJfnI1yOVZjiPMfO1Hhm5/dC7c2KeupG4KxINKuOs+d1eWFWfrr46S9+MBfARtMi8Nwqk3ZRGt9KGgmFBe6Kr3UoxPLSbXfWW8BWZwTzj/S6R+WSjI= X-MS-TrafficTypeDiagnostic: KL1PR0601MB1880: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1880;20:etby2LbWau3V80/wlS8aiS0kN7Tb/Kiy3gwRSZ1d0fDK1Q39l0G45Tt6ngwj/SDaYgvuiFo7PLEWw16CBhXO7fiCTG8CpmIZq8VHBkxcfb4gCqA2gYwEH5vcnQTpQnZYxG7ySzuKI/WL7EJBXg96+iVhJSMML0sQX3Kn1NqmmcEAQaAugU0qPihlIpUXi3whrCX38kA722tE8P4f4sIJ5qLFQ/QV7Yl9vfu0K8iDsOW2H+wXv/GMbnt7Fz+oFu700GHXy9pt/UiwX0VS9POr+nUdQ7C9qnPEFON3EYfhe4OzwFLluDasKsUBGOO0g+OD4X36xCBcG/ru4Ikt6HPnnREDJTszUK5aqjFER7Ba0zRoikxkJn+g1jX7js8zsJp0i9/N287tuBt3XShjlAx0q0JXmrQ5fyIWJDA6UFYxkGb2woJQbSV2iCmztz0Ug6XSIY0RyUaJ3NkJ2fVfsCr31HCuloHp8A9yky/S9joc1b2q0sx/KVlEjRKvbjMByK1v;4:c7/yrox9/V3C1g0diGJYGDilzYfk9TXyhitlhlQVhmJqSPEiVk0H0CVtECNoTvjclEfTq2t/oewfB7xyg4nLcQbx+OF4vfiV/7BYTO8bvVRe7DgduLQVzPCX99PxRWMxiQauwFCgI0c5glgAOguQu5+VADHPWaFN1MKgMpOw/2/BOKJTQsbfXC6fgMEa/IQIMvpxawS1AsI1Ehp+0aYuI+X+7hd6niJcd+OJ7g+Ak4Di34sZZYmiwjiNXxjTOqboV45XIMTWWWktioOcqvSshGUpwrNwV5Mrc4ENLOaUoXsA1MUKTx7JDTTwDwxwAywc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(108721460000369); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231023)(944501035)(6055026)(6041268)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:KL1PR0601MB1880;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:KL1PR0601MB1880; X-Forefront-PRVS: 05299D545B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(396003)(366004)(376002)(39860400002)(346002)(39380400002)(189003)(199004)(229853002)(86362001)(6246003)(16526018)(69596002)(2950100002)(386003)(316002)(36756003)(25786009)(8936002)(6916009)(83506002)(478600001)(6486002)(39060400002)(97736004)(58126008)(53936002)(16586007)(54906003)(6116002)(5660300001)(76176011)(305945005)(7736002)(23726003)(4326008)(7696005)(52116002)(47776003)(66066001)(105586002)(2906002)(106356001)(8676002)(50466002)(81156014)(68736007)(81166006)(53416004)(7416002)(3846002)(16060500001);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1PR0601MB1880;H:morimoto-PC.renesas.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;KL1PR0601MB1880;23:o2yaXNikAiW1cXvUYPpkpyfoKwgWo70BS0EpPMl?= =?us-ascii?Q?G1k04b1F/ducgkY4m9vMoAPLmnBLB711F5ESN7PVqkPNZbxKmNF9gR+CoA0N?= =?us-ascii?Q?q9CJtSKJPVSRmAtPbLBPObCUUR7nqDyDDj0M3EZVkI2JAwWRZzLpKv8V6MEo?= =?us-ascii?Q?Fqty7jUkz/86YjmVcwSeZixqcy+m1VTxkO0qWoYjVlCasnEVFc5kz5g4tjIl?= =?us-ascii?Q?lR23J7YolgYYXwuWIbDEX7bdWIy0V2DUiN8hUOXe/M8iMFnVV+F8IXmnfzh4?= =?us-ascii?Q?798zplTIgS0GSvZ/Slbf4TmBz/M7cDgj717i1xeL2B0x4eKb+j6mJLK62bgT?= =?us-ascii?Q?T1gsizhafFqqx4WGu1ArOd+n5mqBCde7weovzBJ9/Zgye/vSOKfrJhZx6zXo?= =?us-ascii?Q?DwAOpUw/0z0Rq9Z5GQz3ZtQNBlshFBFNuvWUllt+nrViSAWzqwLedd8SkfPX?= =?us-ascii?Q?ub6hjSwRkHDwRvY/2dc4LcQOCna3q/iEFQlGXS9ZvwsZK2bFPERlc9ILp20d?= =?us-ascii?Q?AdsNSq3rpfqftGCC3fsNYPXiWsyxaicrWPh90ZIqtG7QywRnOaykLJ/2PqiN?= =?us-ascii?Q?ekWIVQN7c5HF4vtMQL3O1sJ7/T9pgeZKVuxJmoFB/jjqLN2ZnPLbu2WPNAAk?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GwGOozjFfzGxzA8uIKq68bUOEaQrgri31oFrqynPy+oVSxx0qQ=;5:+DL05hKfVq8+OeFoFJ/Oz9sXLotHBxds+WdqeW9462m3kmXQOVWMiFja98XSytUNzVwNV/0I2pa01nPX61cvTvqvIxyCoWYkFgIlkhEOkWg32F6WLy/lFpdwNGwbUlhTlIEO7PhvgZWcvCj94rTEMZ8DieRCNL+51+or6d288D4=;24:+p7DPNHqmE9YufWfdVwt9rA8diA22weoPd93C6LX9oAXbxipKDv0GZRSjL4FOIfeA0eOwg1WSp/Ep5X3Dld92MkxeqkBmKHnxsyesEV/mhI=;7:SxL44cGQwQxqx0zEeoMtFsLRwoUzPgExB/+KF4QLNvIY1M0EFhxjk3WAdjIkMq4xB3ZWWx2E/li8a27e85EuansqaExNmAVowJR8zBXKeMGHolCbLjN8W0tD3iIwhc4Up4fOn6/XzgqoGqo3P9S75Spq4oFw2IYDs09vSRiV+uHTLwifyS9q4kUB0k54wK2mQpCyeRV33jLCTi8/34sL8TrDe1vLjuSgZIGAo3rQ6DeyWYOCyXeYAshG9ajW9s8y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;KL1PR0601MB1880;20:R20k6HdijoX7LjmjHjFwhM2+TVGJn73NscYkn9ifn7rTY+Apl8geYcwAhQM8NoV2oqKoN1zbjR4OM5DhbwS6jGMwxDPvOwgjbfEiwzogzZ969s4LgdKpYc2JIYjUaLeLiT5xaWqefiA50f3+D3YkviCuzT+GgzFsHwU6icuTQk4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2017 02:24:12.1602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0cbae93-6eda-41e1-98c5-08d548e317ff X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1880 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1701 Lines: 51 Hi Ryan > Signed-off-by: Ryan Lee > --- > > Created max98373 amplifier driver. > > .../devicetree/bindings/sound/max98373.txt | 43 + > sound/soc/codecs/Kconfig | 5 + > sound/soc/codecs/Makefile | 2 + > sound/soc/codecs/max98373.c | 996 +++++++++++++++++++++ > sound/soc/codecs/max98373.h | 225 +++++ > 5 files changed, 1271 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/max98373.txt > create mode 100644 sound/soc/codecs/max98373.c > create mode 100644 sound/soc/codecs/max98373.h (snip) > +struct max98373_priv { > + struct regmap *regmap; > + struct snd_soc_codec *codec; > + unsigned int sysclk; > + unsigned int v_slot; > + unsigned int i_slot; > + unsigned int spkfb_slot; > + bool interleave_mode; > + unsigned int ch_size; > + unsigned int iface; > + bool tdm_mode; > +}; About this max98373->codec. This user is only max98373_set_clock(), and it is called from max98373_dai_hw_params(). You are getting *codec from dai->codec in this function, and max98373 is came from it. This means, we can remove max98373->codec ? About max98373->regmap. You are using devm_regmap_init_i2c(), and keeping it on max98373. Can you check snd_soc_component_add() which is called from snd_soc_add_component(). It will set component->regmap if you called devm_regmap_init_i2c(). I think you can use snd_soc_component_read/write instead of regmap_read/write. Then, we can remove max98373->regmap too ? Ahh, you want to check Revision ID. then, snd_soc_component_init_regmap() can help you ? Best regards --- Kuninori Morimoto