Received: by 10.223.185.116 with SMTP id b49csp7452564wrg; Thu, 1 Mar 2018 05:54:22 -0800 (PST) X-Google-Smtp-Source: AG47ELs6fVnyet5DH11KhHHy7Fj9rV0V++sNLlRwoR4aUV4AldbeBNy2RaBT5NmVlE1IQvdp9B4+ X-Received: by 10.99.111.196 with SMTP id k187mr1592578pgc.360.1519912462593; Thu, 01 Mar 2018 05:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519912462; cv=none; d=google.com; s=arc-20160816; b=UHUgEcc/cI/QzkelzpKnNHeINMrArvW/dbdtwsXPo1alnvRfyh8IoiLlYHXAbbm9MW 3fNEIbVq3dyvHgq1tLmNSPm2rctlSwbfA4wMB9Pe5XO7Vk57E94IH24zvm8PnuDewE+R 45LBmai30tV1km3RZv5CvjoMCi4BqOV8RcFbuPcYfS9dlgX+SPIZOdOGKniB1v/9Hs25 pqRo0E7KgB7J6JWJRjBZfujg+RXwQ2y9HlJV4cMPtriwe+5GlWrHUyqdF/qV5/4JYaPv 7X+l07q94wqh15ZBfpLftUi3KwMV3AMBYk49XOOh6KgHTRH00dyadgv8/CuDq5ThngzW 1yKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=mDZP90j9uL6dNjmK7TnA0MbJZGoo+As9b8Lgb2iv4Do=; b=bUp6B3EGvm2Zd7SuyJQp6ilhWTQLHtpHk6/+9PnLJjQn7SLyqgpAGsnucHdZMpJeQN 9LW3H/6J4WB8nvmAarI8ujgUjHx1ETpwAQ+QfBOt+oHGTYaxkMGz16WuYF2X3jbqYi1Q 7mfvgUhd4PIaVeimC34Ll2Z2JZqQ70mEeb7qqXMipaQJ12Ia6qBvrJ4HRUzNnrUm7c6P 6YKPdb9tjhw4pYLUYE7HtDsW6CJ9rVqvyXjz7onZkDhLf9eUz3ynahAjVR/n51VnMk46 alIJaLgpMCSnfly+y58+N7katzt8sJLDm+WloJjsctVmhGqzqz0QB32nW8C8AtscqNgt PB6g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c65si3022066pfa.93.2018.03.01.05.54.08; Thu, 01 Mar 2018 05:54:22 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030972AbeCANxV convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Mar 2018 08:53:21 -0500 Received: from mail.bootlin.com ([62.4.15.54]:46029 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030462AbeCANxT (ORCPT ); Thu, 1 Mar 2018 08:53:19 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 7592B206A6; Thu, 1 Mar 2018 14:53:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id D6A33203A0; Thu, 1 Mar 2018 14:53:15 +0100 (CET) Date: Thu, 1 Mar 2018 14:53:16 +0100 From: =?UTF-8?B?TXlsw6huZQ==?= Josserand To: Michael Nazzareno Trimarchi Cc: Thomas Petazzoni , Mark Rutland , devicetree@vger.kernel.org, Linux-ALSA , alexandre.belloni@bootlin.com, LKML , Takashi Iwai , Rob Herring , Liam Girdwood , Mark Brown Subject: Re: [alsa-devel] [PATCH v1 1/4] ASoC: codecs: pcm179x: Add PCM1789 id Message-ID: <20180301145316.4c5355b4@dell-desktop.home> In-Reply-To: References: <20180227212433.2189-1-mylene.josserand@bootlin.com> <20180227212433.2189-2-mylene.josserand@bootlin.com> <20180227225140.6f9902b8@windsurf.lan> <20180301084315.0811f712@dell-desktop.home> Organization: Bootlin X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, 1 Mar 2018 10:04:11 +0100 Michael Nazzareno Trimarchi wrote: > Hi > > On Thu, Mar 1, 2018 at 8:43 AM, Mylène Josserand > wrote: > > Hello, > > > > Thank you for the review. > > > > On Tue, 27 Feb 2018 22:51:40 +0100 > > Thomas Petazzoni wrote: > > > >> Hello, > >> > >> On Tue, 27 Feb 2018 22:24:30 +0100, Mylène Josserand wrote: > >> > To prepare the support for the PCM1789, add a new compatible > >> > and use the i2c_id to handle, later, the differences between > >> > these two DACs even if they are pretty similar. > >> > > >> > Signed-off-by: Mylène Josserand > >> > --- > >> > Documentation/devicetree/bindings/sound/pcm179x.txt | 2 +- > >> > >> The DT binding change should be in a separate patch. > >> > >> > sound/soc/codecs/pcm179x-i2c.c | 6 ++++-- > >> > sound/soc/codecs/pcm179x.c | 3 ++- > >> > sound/soc/codecs/pcm179x.h | 8 +++++++- > >> > >> And this should be together with the PCM1789 support patch. Otherwise > >> your series is not bisectable: if we apply only PATCH 1/4, the driver > >> supports the new compatible string, but it doesn't have the actual code > >> to handle PCM1789. Am I missing something here ? > > > > No, you are right, I will merge it with patch 02. > > > > Can you please include me in next series? Sure, I will do it. > > I have several hardware running on pcm179x family Currently, some colleagues recommend me to create a new file for this driver instead of adding it in PCM179x driver. I think that I will not touch pcm179x driver anymore in my next series. Best regards, Mylène > > Michael > > >> > >> > - return pcm179x_common_init(&client->dev, regmap); > >> > + return pcm179x_common_init(&client->dev, regmap, id->driver_data); > >> > >> This can be done in a preparation patch. > >> > >> > } > >> > > >> > static const struct of_device_id pcm179x_of_match[] = { > >> > { .compatible = "ti,pcm1792a", }, > >> > + { .compatible = "ti,pcm1789", }, > >> > { } > >> > }; > >> > MODULE_DEVICE_TABLE(of, pcm179x_of_match); > >> > > >> > static const struct i2c_device_id pcm179x_i2c_ids[] = { > >> > - { "pcm179x", 0 }, > >> > + { "pcm179x", PCM179X }, > >> > >> And also this addition. > >> > >> > + { "pcm1789", PCM1789 }, > >> > { } > >> > }; > >> > MODULE_DEVICE_TABLE(i2c, pcm179x_i2c_ids); > >> > diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c > >> > index 4b311c06f97d..81cbf09319f6 100644 > >> > --- a/sound/soc/codecs/pcm179x.c > >> > +++ b/sound/soc/codecs/pcm179x.c > >> > @@ -218,7 +218,8 @@ static const struct snd_soc_component_driver soc_component_dev_pcm179x = { > >> > .non_legacy_dai_naming = 1, > >> > }; > >> > > >> > -int pcm179x_common_init(struct device *dev, struct regmap *regmap) > >> > +int pcm179x_common_init(struct device *dev, struct regmap *regmap, > >> > + enum pcm17xx_type type) > >> > >> And this done. > >> > >> > { > >> > struct pcm179x_private *pcm179x; > >> > > >> > diff --git a/sound/soc/codecs/pcm179x.h b/sound/soc/codecs/pcm179x.h > >> > index cf8681c9a373..8c08689e3b8b 100644 > >> > --- a/sound/soc/codecs/pcm179x.h > >> > +++ b/sound/soc/codecs/pcm179x.h > >> > @@ -17,11 +17,17 @@ > >> > #ifndef __PCM179X_H__ > >> > #define __PCM179X_H__ > >> > > >> > +enum pcm17xx_type { > >> > + PCM179X, > >> > >> And this one. > >> > >> > + PCM1789, > >> > +}; > >> > + > >> > #define PCM1792A_FORMATS (SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_S24_LE | \ > >> > SNDRV_PCM_FMTBIT_S16_LE) > >> > > >> > extern const struct regmap_config pcm179x_regmap_config; > >> > > >> > -int pcm179x_common_init(struct device *dev, struct regmap *regmap); > >> > +int pcm179x_common_init(struct device *dev, struct regmap *regmap, > >> > + enum pcm17xx_type type); > >> > >> And this one. Just as a "preparation patch" to support multiple codecs > >> in the existing pcm179x.c driver. > >> > >> Thanks! > >> > >> Thomas > > > > Thanks, > > > > Mylène > > > > -- > > Mylène Josserand, Bootlin (formerly Free Electrons) > > Embedded Linux and Kernel engineering > > http://bootlin.com > > _______________________________________________ > > Alsa-devel mailing list > > Alsa-devel@alsa-project.org > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > > -- Mylène Josserand, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com