From patchwork Thu Mar 1 18:07:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 130365 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp3113400edc; Thu, 1 Mar 2018 10:08:11 -0800 (PST) X-Google-Smtp-Source: AG47ELs2Ks2gGH7/329ePOXTduJNucxfqIvxsZMT0hY7z4oGlyZaGEBXJZxUgj8m1cBWfxPocYMQ X-Received: by 10.223.139.217 with SMTP id w25mr2777758wra.258.1519927691832; Thu, 01 Mar 2018 10:08:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519927691; cv=none; d=google.com; s=arc-20160816; b=zmAP0WzQ4uHPD4pfZ6Zmj0XqHfV28dFXrXGRssw5KSk5yj2W6DmP+oAbHMgQaJcZUQ ngjg1yGqgb5Kyg9ICfmxQE+HnYpzbHJ/KARvu/XA2szkO9KrePcwXZUPeFN9OwcjuldF IDObt0IWRThSJlv1gCQ9S0n4Zx6EF+AWpFLvSt8Fu9c6PIecNBSwGoC62HeoAqeRp2Fv hL2SrjflCuO6WhgmbJubPpAkztjVfZ0LHWoQ+/HvchJfWgCjn4ynOziNxNocY1cPWmwX oiX5NtDSq7rJ3REbpf+Jrw3p46CWZgYpUZTcTXbgYckGEvH5lQtImC2rkUTX4eRSuko8 7JMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=E156llPAKXjPOAE/DAkNimHJDCPr62tmz8HrDTXdL3Y=; b=kzL6sviV+TyizxOzl7jAvCloMUV3d3CiEE9QdQdQz0Dn2emtYDDCgqy4XbH4wMWafJ UelIKuV1HuKE2kVy0wgJQ9u1ptiOPldtOxR5muPPW+NGmHYfn4vEdULgcOwrDbzxPsQP rEUOa2LyF53WlxBn1SQ/YWsY7eaacr4nPdGny/vlxWRgbOWHlgpIIfNDy/HoINKAE0hp hkp6roU58QwYKIKiVys4oRoXYrk/uoku6JjbpQ2ZVajH+XPZ4P4eyikpdCiDy+bvLrbv cIObvxIRe4Nl889lEzdkA2sTVeEw4A3sWb/K+GbkgCSFGqGPrtoiEZBH/NufORmWAVok JIfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=t8D2yzLV; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id y143si2982447wme.128.2018.03.01.10.08.11; Thu, 01 Mar 2018 10:08:11 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=t8D2yzLV; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0A1C1267B5B; Thu, 1 Mar 2018 19:07:19 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5EACF267B57; Thu, 1 Mar 2018 19:07:13 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 0A027267B33 for ; Thu, 1 Mar 2018 19:07:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=ehfxZrAOoQys1fFJoVjRQypw5jCBewthYC9hR1SgRQo=; b=t8D2yzLVqFc6 n9OYul9qpqvldBIBKj6Pjrb1AAFwcw8jhw3LFvKbCpUtwD3THs8wsRYwJ5vqBbRaj7HMY/WnYX8X5 3XTpuatC10HQetmdlpmh8ZE3eWfBJ6r4I5kdgNPDBEdZBC6PmpRDqUkiDD7B0rlttxc09zkzm4M/z f8Lr8=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1erSbe-0005Wu-5g; Thu, 01 Mar 2018 18:07:02 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1erSbd-0005tL-M8; Thu, 01 Mar 2018 18:07:01 +0000 From: Mark Brown To: Hans de Goede In-Reply-To: <20180222170738.8508-2-hdegoede@redhat.com> Message-Id: Date: Thu, 01 Mar 2018 18:07:01 +0000 Cc: Oder Chiou , alsa-devel@alsa-project.org, Takashi Iwai , Mark Brown , Carlo Caione , Bard Liao Subject: [alsa-devel] Applied "ASoC: rt5651: Remove unused rt5651_platform_data" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: rt5651: Remove unused rt5651_platform_data has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 54e3a3a152a6f466f3a94b28be10f08b86905bc0 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 25 Feb 2018 11:46:42 +0100 Subject: [PATCH] ASoC: rt5651: Remove unused rt5651_platform_data There are no in tree users of platform-data for the rt5651 codec driver, so lets remove support for it. Signed-off-by: Hans de Goede Signed-off-by: Mark Brown --- include/sound/rt5651.h | 8 -------- sound/soc/codecs/rt5651.c | 47 +++++++++-------------------------------------- sound/soc/codecs/rt5651.h | 2 +- 3 files changed, 10 insertions(+), 47 deletions(-) -- 2.16.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/include/sound/rt5651.h b/include/sound/rt5651.h index 18b79a761f10..1612462bf5ad 100644 --- a/include/sound/rt5651.h +++ b/include/sound/rt5651.h @@ -18,12 +18,4 @@ enum rt5651_jd_src { RT5651_JD2, }; -struct rt5651_platform_data { - /* IN2 can optionally be differential */ - bool in2_diff; - - bool dmic_en; - enum rt5651_jd_src jd_src; -}; - #endif diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c index 3a844725684b..eecd6e662210 100644 --- a/sound/soc/codecs/rt5651.c +++ b/sound/soc/codecs/rt5651.c @@ -33,8 +33,6 @@ #include "rt5651.h" #define RT5651_JD_MAP(quirk) ((quirk) & GENMASK(7, 0)) -#define RT5651_IN2_DIFF BIT(16) -#define RT5651_DMIC_EN BIT(17) #define RT5651_DEVICE_ID_VALUE 0x6281 @@ -1569,7 +1567,7 @@ static int rt5651_set_bias_level(struct snd_soc_component *component, snd_soc_component_write(component, RT5651_PWR_DIG2, 0x0000); snd_soc_component_write(component, RT5651_PWR_VOL, 0x0000); snd_soc_component_write(component, RT5651_PWR_MIXER, 0x0000); - if (rt5651->pdata.jd_src) { + if (rt5651->jd_src) { snd_soc_component_write(component, RT5651_PWR_ANLG2, 0x0204); snd_soc_component_write(component, RT5651_PWR_ANLG1, 0x0002); } else { @@ -1604,7 +1602,7 @@ static int rt5651_probe(struct snd_soc_component *component) snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); - if (rt5651->pdata.jd_src) { + if (rt5651->jd_src) { snd_soc_dapm_force_enable_pin(dapm, "JD Power"); snd_soc_dapm_force_enable_pin(dapm, "LDO"); snd_soc_dapm_sync(dapm); @@ -1764,26 +1762,6 @@ static const struct dmi_system_id rt5651_quirk_table[] = { {} }; -static int rt5651_parse_dt(struct rt5651_priv *rt5651, struct device_node *np) -{ - if (of_property_read_bool(np, "realtek,in2-differential")) - rt5651_quirk |= RT5651_IN2_DIFF; - if (of_property_read_bool(np, "realtek,dmic-en")) - rt5651_quirk |= RT5651_DMIC_EN; - - return 0; -} - -static void rt5651_set_pdata(struct rt5651_priv *rt5651) -{ - if (rt5651_quirk & RT5651_IN2_DIFF) - rt5651->pdata.in2_diff = true; - if (rt5651_quirk & RT5651_DMIC_EN) - rt5651->pdata.dmic_en = true; - if (RT5651_JD_MAP(rt5651_quirk)) - rt5651->pdata.jd_src = RT5651_JD_MAP(rt5651_quirk); -} - static irqreturn_t rt5651_irq(int irq, void *data) { struct rt5651_priv *rt5651 = data; @@ -1840,7 +1818,7 @@ static void rt5651_jack_detect_work(struct work_struct *work) if (!rt5651->component) return; - switch (rt5651->pdata.jd_src) { + switch (rt5651->jd_src) { case RT5651_JD1_1: val = snd_soc_component_read32(rt5651->component, RT5651_INT_IRQ_ST) & 0x1000; break; @@ -1874,7 +1852,6 @@ EXPORT_SYMBOL_GPL(rt5651_set_jack_detect); static int rt5651_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { - struct rt5651_platform_data *pdata = dev_get_platdata(&i2c->dev); struct rt5651_priv *rt5651; int ret; @@ -1885,14 +1862,8 @@ static int rt5651_i2c_probe(struct i2c_client *i2c, i2c_set_clientdata(i2c, rt5651); - if (pdata) - rt5651->pdata = *pdata; - else if (i2c->dev.of_node) - rt5651_parse_dt(rt5651, i2c->dev.of_node); - else - dmi_check_system(rt5651_quirk_table); - - rt5651_set_pdata(rt5651); + dmi_check_system(rt5651_quirk_table); + rt5651->jd_src = RT5651_JD_MAP(rt5651_quirk); rt5651->regmap = devm_regmap_init_i2c(i2c, &rt5651_regmap); if (IS_ERR(rt5651->regmap)) { @@ -1916,23 +1887,23 @@ static int rt5651_i2c_probe(struct i2c_client *i2c, if (ret != 0) dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); - if (rt5651->pdata.in2_diff) + if (device_property_read_bool(&i2c->dev, "realtek,in2-differential")) regmap_update_bits(rt5651->regmap, RT5651_IN1_IN2, RT5651_IN_DF2, RT5651_IN_DF2); - if (rt5651->pdata.dmic_en) + if (device_property_read_bool(&i2c->dev, "realtek,dmic-en")) regmap_update_bits(rt5651->regmap, RT5651_GPIO_CTRL1, RT5651_GP2_PIN_MASK, RT5651_GP2_PIN_DMIC1_SCL); rt5651->hp_mute = 1; - if (rt5651->pdata.jd_src) { + if (rt5651->jd_src) { /* IRQ output on GPIO1 */ regmap_update_bits(rt5651->regmap, RT5651_GPIO_CTRL1, RT5651_GP1_PIN_MASK, RT5651_GP1_PIN_IRQ); - switch (rt5651->pdata.jd_src) { + switch (rt5651->jd_src) { case RT5651_JD1_1: regmap_update_bits(rt5651->regmap, RT5651_JD_CTRL2, RT5651_JD_TRG_SEL_MASK, diff --git a/sound/soc/codecs/rt5651.h b/sound/soc/codecs/rt5651.h index 1ef38429e6a0..148e139e6a26 100644 --- a/sound/soc/codecs/rt5651.h +++ b/sound/soc/codecs/rt5651.h @@ -2060,10 +2060,10 @@ struct rt5651_pll_code { struct rt5651_priv { struct snd_soc_component *component; - struct rt5651_platform_data pdata; struct regmap *regmap; struct snd_soc_jack *hp_jack; struct delayed_work jack_detect_work; + enum rt5651_jd_src jd_src; int sysclk; int sysclk_src;