From patchwork Fri Aug 25 08:12:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C8AAC3DA66 for ; Fri, 25 Aug 2023 08:13:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4B45D851; Fri, 25 Aug 2023 10:13:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B45D851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951234; bh=vFZEnrTAOAQen32IAhYU+bdqfyBr2cM5J/GXiySPy/U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dQe7jpOhKYnq5XmaNNl0sGZQwBz6AngbWV7yZSezQkyPjtxBHWCpoVcbEKOLQevtl i9hx9OcQkBvSgpDXuGvmuAUODYJAb3Ts7+h8n4Ljsj0dFEoadWHzyyvyZpUjMvtc4h BL6pJuaUjVqzELhismAVGaCNjILNaYMSug8Enz3E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5A1DEF80074; Fri, 25 Aug 2023 10:12:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id CE891F80558; Fri, 25 Aug 2023 10:12:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30AB0F800D1; Fri, 25 Aug 2023 10:12:26 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F0E7DF800D1 for ; Fri, 25 Aug 2023 10:12:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F0E7DF800D1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=GS9ZcTGr Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-500a398cda5so974271e87.0 for ; Fri, 25 Aug 2023 01:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951134; x=1693555934; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=b+8MTCJJPEn/JGBNuu906jziHv3DlZsxUiatrimUoug=; b=GS9ZcTGr6eW5+Zq7vkkbvhEcpibZWQ4bE8pmXv4GoGIVZVtumdBnWg3aaSsIlpd8eZ OA8Dg6oHck9ZZK5gmQMipqBzNJtD7P6+127+CsUg0/KukeUbnDju+XvY9VTPWNiHfiHr 3Awf4WQHKw1q7nl4tEfdW2APtKyhMOFJOT3NRGM9FZvZp7pM4oYqPnR5halDlgk0CGy8 hHuZclux4yLY9+xGCR1fxz3SfSWT1/rTB3uNfjAaXaDX7QRQFPbF4b4va3xpM2k6qB+u baIyIWcC9n7gAjFCUrFzW6kHaXOn3lx+bs4EYVZyvU2CU4SRf0esWU+o8/S8qclzL3ID Nd2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951134; x=1693555934; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b+8MTCJJPEn/JGBNuu906jziHv3DlZsxUiatrimUoug=; b=Vk2fR95FOeu89vw9tIfPZuaC/TA/oCzikBsZIhmw6nWJLNZR96o24D7vxxvSOK43iY z+fnOS8yHILiDEFHpJg67Jnqr8xsZWrxuJFI+6pPQKBpCcXQwMbB3a7IUhYTZaeMhdQn 2pNqW9GsLRyCYhZl5dwDlsLQnS7FlR4bHW+AceqPrNWdFHXkvHfMisYSEeP7hUdQ3ALG Hk8UsI/jihOIqlkcnUgVV7WoAZ6CxscPRfoG8JCu/Q68S5nEwfYRgK0oAZQHbA8vPBcj tVjgEndxWhJ/EpwEbn+2xas4bnIvv2VEVnpoPJ5MvJ7ZhiQjYY3LLsoJIoo7JxesXXF/ SsPw== X-Gm-Message-State: AOJu0YwgRuuz8l6mxGOG8uxNWvGPQKuDd0BMnrq8MnlocSYglwzAYKZY Ihx/17RMTS5KNlbYds0DzMMjnw== X-Google-Smtp-Source: AGHT+IFmnMm6qB463AlxIIOwocgb6x+Snv48XGIBxuceoO10VWRQRMRDhQd7hZBHJLCafnv2DouLkA== X-Received: by 2002:a05:6512:33c6:b0:4f8:631b:bf77 with SMTP id d6-20020a05651233c600b004f8631bbf77mr14929337lfg.22.1692951134067; Fri, 25 Aug 2023 01:12:14 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:13 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:11 +0200 Subject: [PATCH 1/7] ASoC: max9768: Convert to use GPIO descriptors MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-1-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: Z3FTYSVCY3GCZ7DSAMEPRSLCVWCFANVZ X-Message-ID-Hash: Z3FTYSVCY3GCZ7DSAMEPRSLCVWCFANVZ X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The MAX9768 is pretty straight forward to convert to GPIO descriptors. To name the GPIO properties, I looke at the bindings in maxim,max9759.yaml which names these GPIO "mute" and "shutdown" respectively. No board files using platform data exist in the kernel, new users can use GPIO descriptor tables if desired. Signed-off-by: Linus Walleij --- include/sound/max9768.h | 4 ---- sound/soc/codecs/max9768.c | 45 +++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/include/sound/max9768.h b/include/sound/max9768.h index 0f78b41d030e..8509ba0079b0 100644 --- a/include/sound/max9768.h +++ b/include/sound/max9768.h @@ -9,14 +9,10 @@ /** * struct max9768_pdata - optional platform specific MAX9768 configuration - * @shdn_gpio: GPIO to SHDN pin. If not valid, pin must be hardwired HIGH - * @mute_gpio: GPIO to MUTE pin. If not valid, control for mute won't be added * @flags: configuration flags, e.g. set classic PWM mode (check datasheet * regarding "filterless modulation" which is default). */ struct max9768_pdata { - int shdn_gpio; - int mute_gpio; unsigned flags; #define MAX9768_FLAG_CLASSIC_PWM (1 << 0) }; diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c index d22b4ba51ed8..8d0ca1be99c0 100644 --- a/sound/soc/codecs/max9768.c +++ b/sound/soc/codecs/max9768.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -27,8 +27,8 @@ struct max9768 { struct regmap *regmap; - int mute_gpio; - int shdn_gpio; + struct gpio_desc *mute; + struct gpio_desc *shdn; u32 flags; }; @@ -42,7 +42,7 @@ static int max9768_get_gpio(struct snd_kcontrol *kcontrol, { struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); struct max9768 *max9768 = snd_soc_component_get_drvdata(c); - int val = gpio_get_value_cansleep(max9768->mute_gpio); + int val = gpiod_get_value_cansleep(max9768->mute); ucontrol->value.integer.value[0] = !val; @@ -55,7 +55,7 @@ static int max9768_set_gpio(struct snd_kcontrol *kcontrol, struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); struct max9768 *max9768 = snd_soc_component_get_drvdata(c); - gpio_set_value_cansleep(max9768->mute_gpio, !ucontrol->value.integer.value[0]); + gpiod_set_value_cansleep(max9768->mute, !ucontrol->value.integer.value[0]); return 0; } @@ -138,7 +138,7 @@ static int max9768_probe(struct snd_soc_component *component) return ret; } - if (gpio_is_valid(max9768->mute_gpio)) { + if (max9768->mute) { ret = snd_soc_add_component_controls(component, max9768_mute, ARRAY_SIZE(max9768_mute)); if (ret) @@ -171,28 +171,29 @@ static int max9768_i2c_probe(struct i2c_client *client) { struct max9768 *max9768; struct max9768_pdata *pdata = client->dev.platform_data; - int err; max9768 = devm_kzalloc(&client->dev, sizeof(*max9768), GFP_KERNEL); if (!max9768) return -ENOMEM; - if (pdata) { - /* Mute on powerup to avoid clicks */ - err = devm_gpio_request_one(&client->dev, pdata->mute_gpio, - GPIOF_INIT_HIGH, "MAX9768 Mute"); - max9768->mute_gpio = err ?: pdata->mute_gpio; - - /* Activate chip by releasing shutdown, enables I2C */ - err = devm_gpio_request_one(&client->dev, pdata->shdn_gpio, - GPIOF_INIT_HIGH, "MAX9768 Shutdown"); - max9768->shdn_gpio = err ?: pdata->shdn_gpio; - + /* Mute on powerup to avoid clicks */ + max9768->mute = devm_gpiod_get_optional(&client->dev, + "mute", + GPIOD_OUT_HIGH); + if (IS_ERR(max9768->mute)) + return PTR_ERR(max9768->mute); + gpiod_set_consumer_name(max9768->mute, "MAX9768 Mute"); + + /* Activate chip by releasing shutdown, enables I2C */ + max9768->shdn = devm_gpiod_get_optional(&client->dev, + "shutdown", + GPIOD_OUT_HIGH); + if (IS_ERR(max9768->shdn)) + return PTR_ERR(max9768->shdn); + gpiod_set_consumer_name(max9768->shdn, "MAX9768 Shutdown"); + + if (pdata) max9768->flags = pdata->flags; - } else { - max9768->shdn_gpio = -EINVAL; - max9768->mute_gpio = -EINVAL; - } i2c_set_clientdata(client, max9768); From patchwork Fri Aug 25 08:12:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 88868C3DA66 for ; Fri, 25 Aug 2023 08:14:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 504F9868; Fri, 25 Aug 2023 10:13:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 504F9868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951248; bh=DaVdZlNoV3LCB5Kisv0pjeG9l55LN3YUTaDA9GCuIHc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=o+SYWtFsIfSlRw8L+RSFAhENa95Wn59hzZvj3l0ZARJ/LNEAWczbT1xChzfpdkKcC tnOesZa6Hxs2dMUvHN1/bQxSs11M40+11QywlS0hjdrBKIfR1wJpxkrEtSlkoMrTem AWalsFANbFjXeBLCNQzWUw0OgBvy1cxAkWLYkgxQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3AEB5F80568; Fri, 25 Aug 2023 10:12:35 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6D843F800AE; Fri, 25 Aug 2023 10:12:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5629BF80558; Fri, 25 Aug 2023 10:12:29 +0200 (CEST) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A13D1F80074 for ; Fri, 25 Aug 2023 10:12:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A13D1F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UE6boKGP Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe1b00fce2so940476e87.3 for ; Fri, 25 Aug 2023 01:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951135; x=1693555935; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=dl5LD8wtUJwzoyPBhKwaRw4zVOgRkHeCisg4Hejkfc8=; b=UE6boKGPVqfXjOj6kezrHZuNuqoenlcbBk1UNq75Dzm0g2Pi9P0X9/2H+ehfTwgThp VeDtlpy3T7kyjtfxQ49VGYrCVg1ZGDaZYxuP7AY8TpexJxy7Bux81QenPI11jgpmOQQB JVxSqxJJEjUe8HksIlDdkS5iLxHuE6B7tLGJJomdLR82bq0GVOGDYZHgkUOArZcfkJqQ 1Wuo8wyJvkN/8Wj4DI+iLmCefZmkJSf2KrxDV3tY21KQxQkKDsCm3+SDcZv4Ax2HN2rW LwST9/gqyG3fK33e++9Rc6bfQWz+d4ZzvsxL3QMoUnToF6BIENTY6o0X1JPUvmD4y5sO UR8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951135; x=1693555935; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dl5LD8wtUJwzoyPBhKwaRw4zVOgRkHeCisg4Hejkfc8=; b=RYL3O03dfA4Mqt0gdLjbUC1D8qBdNqq7LMkOGZFxNxDsVJ6DL1i601tVYPXma1Rn7G mumCHqIemL7KBd+KiCPN44LCmmJESEydAQf0ayvatY7kGQxgct1bZcMlPTH9riQBQZuj T8ClQIAVIz949qau63pWI4JBEixUP+Yl6HtQhkJz66leOIuimUTfQ3/2c51yuO2dwfYr OLRSghvQtNYLMCLiY21E0Vs/acNe6nXGKj26Id4FWxKUOjvVsKavs3AhIRSdXm1xPT4X YspMhBp7aN6XTfX35lxHzpeidGl2W7DgQHQ50Vf6ES/FsE+5au6rOkXVbKh1730IK2k2 Qsww== X-Gm-Message-State: AOJu0YyhSus4n4EItGePJYJc6s8fdZDLDXSWFbdonaYefzRFByyLJ6e2 Cnk0YM3mOc9+aByK/vUSD1sk6g== X-Google-Smtp-Source: AGHT+IGxHJkRNODVm8P/TbKsQyAV+vSBwvi23v8AHQLwDxjxd7+pzwYP7Kx6g7WRigVcKLEdglU1zg== X-Received: by 2002:a19:6451:0:b0:4fb:893e:8ffc with SMTP id b17-20020a196451000000b004fb893e8ffcmr11486265lfj.17.1692951134839; Fri, 25 Aug 2023 01:12:14 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:14 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:12 +0200 Subject: [PATCH 2/7] ASoC: max98357a: Drop pointless include MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-2-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: 2F3WKWHSXGTSNBNXNBXK7XJUSFSF2TF2 X-Message-ID-Hash: 2F3WKWHSXGTSNBNXNBXK7XJUSFSF2TF2 X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This driver is already using solely GPIO descriptors and do not need to include the legacy header . Drop it. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98357a.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c index 2a2b286f1747..cc811f58c9d2 100644 --- a/sound/soc/codecs/max98357a.c +++ b/sound/soc/codecs/max98357a.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include From patchwork Fri Aug 25 08:12:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 447AFC3DA66 for ; Fri, 25 Aug 2023 08:14:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5960D1E3; Fri, 25 Aug 2023 10:13:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5960D1E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951274; bh=ZPOVoWflkn5ze/RL1vfcrWv4KndgatLnq+lpS515m1M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=onY12nRVoHiLCFWEr1boywbHJKI3XPq2Ti3h1TcP2Y+uG4Z2tvslpLxrTKjhqW8xD BWeQdotgFfFW83iyq8g3jq4wpQGZzM9fPwdX6242zjGyo5KV2IOdvzH0C22xqimCCI N7ahEO1EmKzU/JeB64N5siOzcEoRzX7GPNPUwHCw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0E855F8056F; Fri, 25 Aug 2023 10:12:36 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 17EF3F80579; Fri, 25 Aug 2023 10:12:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2A61DF8055C; Fri, 25 Aug 2023 10:12:30 +0200 (CEST) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AC363F800F5 for ; Fri, 25 Aug 2023 10:12:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AC363F800F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZXicqbRu Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-5007abb15e9so963760e87.0 for ; Fri, 25 Aug 2023 01:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951135; x=1693555935; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NBbRRSYAQA5xmq25ubQ8kHHlKCIWtZeRLr/sb85xuNU=; b=ZXicqbRubMjwCeZSDp32zGvSe2Cg8/FKjVonc3OsBRO2krXO9cvadTN+LEo+huL3zn OIhuzcmuZ3+DNGfyUWUCnuHFZT6ri6Nm07495TVslpIaSQ+NwKVr6zekLYT0PZSblQrs wagBfLfbz5NQpkh7nX06Io3lM54ZJt2f6MhCztCKdKx86JpxnpZlXLGy1+BQ1Im+EdaN AGZG/AsNNs0dYj56gsC/jkl6aRqlgLHWJ1hpp1h+Mfw6U8oU3wtq7mCeGrhqhOULtwHX 1BxTwnLpJ71GxdGgkFs12MOHXaxOu6FTOzDbnJZI20sPRMcQu5+jN9t8fL8hzsj5adyJ pXTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951135; x=1693555935; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NBbRRSYAQA5xmq25ubQ8kHHlKCIWtZeRLr/sb85xuNU=; b=T47fWjilBVdH/VNdKUI9O85Q923sdN1q9e4mUXNoIBFx5usx3PqCB2kL7S1z/keWgd rOLhw6DdI/DjqNGTwDRCJ//6X12oKFcxedM22lGxFVMkJZ/0QuGSfz0cfq0/72Ljl1TZ IxScAwzjCp+JZyeW3XadpKeDX/we0luCKVCASZxk9+bfOFFMAh3Qlz8CHyqJ7jmcIReL iAbGJ111H+gLeIwerGt7y4oIsNgJslLR5WoFrHwuRWE1gZIv91fYeFNMz4+pps0nl3r3 og7yxqxfYu4+Wh24zta+MoHmLZ6EZMtbY/n7+captunA4rz66X3LQTBwQfAiWqKyJC4r Gccg== X-Gm-Message-State: AOJu0YwBiYLT+4YYcenGsnFQcYPB+psNvKc/CVc/9x/+JbekfG80XkPu 4+EZ0IEtq8+eNAlMDbcAr/oGNA== X-Google-Smtp-Source: AGHT+IEPLIDpD1w1RF98YcjynCIXKHZQox8F22rws/cF0RMIh/cKJbjBBRiwjVgcU5sTSiS7K0f0rA== X-Received: by 2002:a05:6512:615:b0:4fd:c923:db59 with SMTP id b21-20020a056512061500b004fdc923db59mr11392637lfe.15.1692951135669; Fri, 25 Aug 2023 01:12:15 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:15 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:13 +0200 Subject: [PATCH 3/7] ASoC: max98373: Convert to use GPIO descriptors MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-3-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: RTWVNJ5GMUDYOJPMKVV3NEPTTKJTKNY4 X-Message-ID-Hash: RTWVNJ5GMUDYOJPMKVV3NEPTTKJTKNY4 X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Instead of relying on legacy interfaces, convert the driver to use GPIO descriptors. This is a straight-forward conversion, we support also sdw devices providing GPIO descriptor tables if they so desire. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98373-i2c.c | 17 ----------------- sound/soc/codecs/max98373.c | 35 +++++++++++++++++++---------------- sound/soc/codecs/max98373.h | 2 +- 3 files changed, 20 insertions(+), 34 deletions(-) diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c index 0fa5ceca62a2..e7ec7875c4a9 100644 --- a/sound/soc/codecs/max98373-i2c.c +++ b/sound/soc/codecs/max98373-i2c.c @@ -3,12 +3,10 @@ #include #include -#include #include #include #include #include -#include #include #include #include @@ -560,21 +558,6 @@ static int max98373_i2c_probe(struct i2c_client *i2c) /* voltage/current slot & gpio configuration */ max98373_slot_config(&i2c->dev, max98373); - /* Power on device */ - if (gpio_is_valid(max98373->reset_gpio)) { - ret = devm_gpio_request(&i2c->dev, max98373->reset_gpio, - "MAX98373_RESET"); - if (ret) { - dev_err(&i2c->dev, "%s: Failed to request gpio %d\n", - __func__, max98373->reset_gpio); - return -EINVAL; - } - gpio_direction_output(max98373->reset_gpio, 0); - msleep(50); - gpio_direction_output(max98373->reset_gpio, 1); - msleep(20); - } - /* Check Revision ID */ ret = regmap_read(max98373->regmap, MAX98373_R21FF_REV_ID, ®); diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index fde055c6c894..33eb4576da23 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -12,9 +12,8 @@ #include #include #include -#include +#include #include -#include #include #include "max98373.h" @@ -478,20 +477,24 @@ void max98373_slot_config(struct device *dev, max98373->i_slot = value & 0xF; else max98373->i_slot = 1; - if (dev->of_node) { - max98373->reset_gpio = of_get_named_gpio(dev->of_node, - "maxim,reset-gpio", 0); - if (!gpio_is_valid(max98373->reset_gpio)) { - dev_err(dev, "Looking up %s property in node %s failed %d\n", - "maxim,reset-gpio", dev->of_node->full_name, - max98373->reset_gpio); - } else { - dev_dbg(dev, "maxim,reset-gpio=%d", - max98373->reset_gpio); - } - } else { - /* this makes reset_gpio as invalid */ - max98373->reset_gpio = -1; + + /* This will assert RESET */ + max98373->reset = devm_gpiod_get_optional(dev, + "maxim,reset", + GPIOD_OUT_HIGH); + if (IS_ERR(max98373->reset)) { + dev_err(dev, "error %ld looking up RESET GPIO line\n", + PTR_ERR(max98373->reset)); + return; + } + + /* Cycle reset */ + if (max98373->reset) { + gpiod_set_consumer_name(max98373->reset ,"MAX98373_RESET"); + gpiod_direction_output(max98373->reset, 1); + msleep(50); + gpiod_direction_output(max98373->reset, 0); + msleep(20); } if (!device_property_read_u32(dev, "maxim,spkfb-slot-no", &value)) diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h index e1810b3b1620..af3b62217497 100644 --- a/sound/soc/codecs/max98373.h +++ b/sound/soc/codecs/max98373.h @@ -213,7 +213,7 @@ struct max98373_cache { struct max98373_priv { struct regmap *regmap; - int reset_gpio; + struct gpio_desc *reset; unsigned int v_slot; unsigned int i_slot; unsigned int spkfb_slot; From patchwork Fri Aug 25 08:12:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365134 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 080AEC3DA66 for ; Fri, 25 Aug 2023 08:15:05 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 104C0DF6; Fri, 25 Aug 2023 10:14:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 104C0DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951303; bh=ajLjAoKS5LYhzLyFaGqTcrQB5QlpO9TiPVOmXYFaxHc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=OnizLNWSK9mOcDtS8vxRK2FKAs+OtK/QfaBnlI9C8Zn2szdcpPPLmJZz7J4vXVzUZ UxEzBFCBeA3Uq9jA/lxlQOlxNy8/XbZmv2/+WIFfwvPw6ueZuepP2h4JuoFjR0R/oB ucV04vbrcHYzomZjbg1JgSCNfNhI0f0xtLiFDmts= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52448F805AF; Fri, 25 Aug 2023 10:12:41 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9C837F805B2; Fri, 25 Aug 2023 10:12:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9B74DF80567; Fri, 25 Aug 2023 10:12:31 +0200 (CEST) Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D850AF8022B for ; Fri, 25 Aug 2023 10:12:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D850AF8022B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=YYmfBumd Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe27849e6aso927773e87.1 for ; Fri, 25 Aug 2023 01:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951136; x=1693555936; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nZvQIqiJILx7Vu44bdAP6xXOlwSKHGpCyi7z1wxsqaw=; b=YYmfBumd1OqmN1kcJfKuQGJb+t6phEs/bHy0wzfEWEPqcBhHzQFEh7HWO5r7zI3KzK rlE/o9gkuU4tb4GOeW4HKbUsN4tkJmcv9YMo41BmkTy+9R1GtaXSAsW3wVlwpfWsEaQj 8pklm/io7r+91riwH1xb5DOgZnUTBIZ0vR8JR1x2dqCZS97VqmBV8Ur1otWfoIshvjrz LkVGMccfYQkq52qo+UQfxt4+1PtThFLeIEJhJmU3qzaD2IjQ7a7EB360vPqny0hrF3W0 /mVzGnGBe1gq8JM9tvtCVn/0J5kT2aFW1S95QT0J17Uq8WsOaG7xNMP2r1qD5UbtS/5r Sk7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951136; x=1693555936; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nZvQIqiJILx7Vu44bdAP6xXOlwSKHGpCyi7z1wxsqaw=; b=NVBOFJGUcV1wgybNHmJzO2mfrywTFGyYGy1uKaJOvtBKayZV+aCWpaZdqqkEN6RXj5 QKSZr7dVY76X61o0a5+qFEAosrmcIemiFMMJKpTOrUr3i24qelI15Kkae5FG59TnjAJU tlde51wukwJC9WbDVZGKpWX2piBnEdDZ3YAHUPUyITckZPk3xkjsmD32iIzw3NGMvy+I 4fUQ3yFO1pXtBwgdUKb4OKjJhyDDUSG1J80qihQ2UxPhD+lGWwk7vM77xHuJ2rbHPOQH /4ljwpjHrFORngZxsPxOcxzCkelEs1gAW5GJ8aZQJ3zybDAkW6zPNMrOVqUhKGWKfbfG DiDw== X-Gm-Message-State: AOJu0YxA568r88s3ffgkQpc12HDZy7ZN5Fn3mPh46CVAOXxNS58UGJ3i hwMSlRHi9c6zaJdraPF5WiUpjg== X-Google-Smtp-Source: AGHT+IG2PpNK4ugGGs+dTr6KbXE8uHau4dcclyQjik08hXAm1AW/KDfAXQLnuJhnsM+8CSpY83s9Ig== X-Received: by 2002:a05:6512:32a9:b0:500:a6c1:36f7 with SMTP id q9-20020a05651232a900b00500a6c136f7mr1030311lfe.3.1692951136501; Fri, 25 Aug 2023 01:12:16 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:16 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:14 +0200 Subject: [PATCH 4/7] ASoC: max98388: Correct the includes MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-4-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: M6BL52M4TPIXKHWVAFQYYJZRFBM2BAZK X-Message-ID-Hash: M6BL52M4TPIXKHWVAFQYYJZRFBM2BAZK X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The MAX98388 driver is using the modern GPIO descriptor API but uses legacy includes. Include the proper header instead. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98388.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/max98388.c b/sound/soc/codecs/max98388.c index cde5e85946cb..078adec29312 100644 --- a/sound/soc/codecs/max98388.c +++ b/sound/soc/codecs/max98388.c @@ -3,12 +3,11 @@ #include #include -#include +#include #include #include #include #include -#include #include #include #include From patchwork Fri Aug 25 08:12:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50EA4C3DA66 for ; Fri, 25 Aug 2023 08:14:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0C8E4DEB; Fri, 25 Aug 2023 10:13:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0C8E4DEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951285; bh=Uz6E8HLxWI35ovCMD+J5so9kCTh/4AIEHtwt/doxIgs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BZVRvbnSHl5mRJwqkAdqnmuA9MgdrrZwvMX71M65rbKnPTl0vW8SRZo6fOQTHNlTE PMsD1hduRFe7EXK8tO6AOm8A/4c8vVvqHZJPm+Q8obpZ0ET9Bhx5ohyH6+GQKOmf5U t5ppw6rS+vbvWdB/cZtr3ijZ7/Xlc5BpAnxP0T8k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 31837F805A9; Fri, 25 Aug 2023 10:12:38 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A7064F80589; Fri, 25 Aug 2023 10:12:37 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14D37F80568; Fri, 25 Aug 2023 10:12:31 +0200 (CEST) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8E341F8023B for ; Fri, 25 Aug 2023 10:12:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8E341F8023B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=bPi55yZm Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4fe8c16c1b4so916199e87.2 for ; Fri, 25 Aug 2023 01:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951137; x=1693555937; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=d/HhJkYfqyaXs9yIGYFPPzlpsmAC+qKTgrrYF36b8es=; b=bPi55yZm+3mup9ggSLUCjMWmRb49okeCF+W/OznEmbeZRtK02YnHTszrQ5+Yy1lVJE FtbEsbpuiImJA7hZOJNZCCRgfo0YFxdKzRiKy5UEzNhL+4M53w7sMmYRHZOG7ewHXJF1 BGPt8tIiHS34hZgZkYVGV0pg3iYwr9/LpwQwMeStJUz3XwO4kMfB6XH/0W6V2Bmphf5o O3mmgi3GY25eEL+fFun4wUcaJCesVXoeNpS/trH8TQeIMS38WSV4b0MMNYAWKb0boreu 7cW/63vZlUtX245mPHNpyw782/X9SAa/rAKyRgmXzZkGLLnXiCqFdpQDiQmQsAIYCPVD +hDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951137; x=1693555937; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d/HhJkYfqyaXs9yIGYFPPzlpsmAC+qKTgrrYF36b8es=; b=isO4taExrQfJfEiudChzTlg9BpApn6QvjbHuF6icFAcz0tV1O0O6qUx/kJWCPnZna1 n3evsIUEIh02QcCgZ634aI94cQUQi1dWL8ZPFGKLuWkzosOTK2JdM7DeqWA8MfWyRVrK cF+EzThHfG0oqimGPB81+PSbOK5oTUuoqBc94LCmo/hig7eRDHDQlR0BwI4pC7oRkutP b8hCw6qS+ypO9g2dtkfGoNH77KDkXKRzd4WdDFEJcZItXVqB0s9AuIrZ391Syv0VbkP7 2UYz9QXIQpVZkeGYv8FP05zwnVJ0YcSqIAEJXH9Eh3M6opiWHT5p6Q8FSMSYu5+MeozD O85w== X-Gm-Message-State: AOJu0YyMzU1qDjELqrcwOdLjrdEhm9SNC85IieL7bKfl7UktBqKV75uC b+lXqNU+uBQrUNOKKE2qjdocSg== X-Google-Smtp-Source: AGHT+IEyHJmheRscOX7UBeg6Z7DcJVfwt0W14guOb3+tSfGq9EVhRyrhY8ha1hu6hxSTW7rsulAyig== X-Received: by 2002:a05:6512:32cc:b0:4fd:fabf:b6ee with SMTP id f12-20020a05651232cc00b004fdfabfb6eemr14730764lfg.9.1692951137399; Fri, 25 Aug 2023 01:12:17 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:16 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:15 +0200 Subject: [PATCH 5/7] ASoC: max98396: Drop pointless include MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-5-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: AMYJZNLUPDTYHBAY4XM72GKR6S7Z7ODI X-Message-ID-Hash: AMYJZNLUPDTYHBAY4XM72GKR6S7Z7ODI X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This driver is already using solely GPIO descriptors and do not need to include the legacy header . Drop it. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98396.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c index 3a1d8c211f3c..e52bb2266fa1 100644 --- a/sound/soc/codecs/max98396.c +++ b/sound/soc/codecs/max98396.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include "max98396.h" From patchwork Fri Aug 25 08:12:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40CA4C3DA66 for ; Fri, 25 Aug 2023 08:15:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3B4839F6; Fri, 25 Aug 2023 10:14:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B4839F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951319; bh=hqqvnfLqs7/1M4mT2xT+hGNk+Y0q7axiK7nmjfTmXZg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QV7QwHVuhxkkvHggGDplfALLn1S30KgRJHkOQvvfg0gLJu2FnzWYC7Df+bjkcu0uL oV5DJPRtNalkKAvHEjGZftRVpfVZ0zPXl5pM+3MjDy8HAEdZP13hDsmkWentKNDu03 96+xQuvWhBG0Vb6yRR+tyjfm9q475mDR0bBo0m/A= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CD744F805B4; Fri, 25 Aug 2023 10:12:43 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2253BF805BF; Fri, 25 Aug 2023 10:12:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0A504F80563; Fri, 25 Aug 2023 10:12:32 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6E86F800AE for ; Fri, 25 Aug 2023 10:12:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6E86F800AE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=eFQD4cq8 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-500a8b2b73eso467659e87.0 for ; Fri, 25 Aug 2023 01:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951138; x=1693555938; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=44JIVg8xfT/EISToMUTEvN6PJWh2bmWBrdxrTpht5uo=; b=eFQD4cq8n2Fct8am3VeuEldkXRZ1tKBntwqnqD83Ex1Nr4ejqLxsjn7wE4+qyoKqKQ sVq0njntmTxoUdnoBWXC/4s+dCmMoE1cBOKu3QouzqfEJhaXa8ZCcBjYXWYI395Oor7R +hfvzByRJWEJGlkHOCaPtGggPLdnU2tvqLZS6fkeuOV4Kvc8Co+GB1fqqfydPWBYsfNC FEZZvAkN4PHfmxWWRgWzbEo0pHyn1XHZDXeTUSyHlUNBAn88ysXgTs32FDJEqsGRJAO7 kUMjWAkuXkUXM9Xcaz31hMYrJD/BMgNLztCapcSVPnuWja8QEQ8oDy1UzjIJmF+lu3xV kZDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951138; x=1693555938; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=44JIVg8xfT/EISToMUTEvN6PJWh2bmWBrdxrTpht5uo=; b=hQLLYsxSKetgBn8o8CArPmg3LFSllUfcWpAW40QZwwAR3KH8C11Jj+y0Rb7r59Orlc G8LJx2ZgrnWTfIKW3VgoJozBp4xwXPGUSa9MGaI/5mAPYnkq1tsZnKpP2nSexwlsb78/ cmwdL6OBjP7dpKbNFn/AoXexKaB3urtPlpPjsgHPM2ALQ0FtqvZm8CozfB+QKKDdtnur tpCsEbD2C+oFI60etgDmOk0zOvsG8m6aNGZUbtAlmmPSP59bn+B6iwKJb1NYTUtuFuAm CPX9hhe7ZvTYWb7u1a28kceAo8KHzpbsigUwaCJVHjHjZiQYZxOgJXAPhQ5TmYpCTZQl s25Q== X-Gm-Message-State: AOJu0YxBsScPUT1avTnZIpq8BEMkIGAZt3zAOAKwhNWp0j/4yjv5dluS tuUm0uOWhoQhMe3/r+D4TdkpKg== X-Google-Smtp-Source: AGHT+IEodFZz3bqeeFdOiK7hMl+uUlbSgt9vuSKj8ccHrNjvWe6heS8Ntxi3tANPFEcCQKm5bqj6mw== X-Received: by 2002:a05:6512:e99:b0:500:7de4:300e with SMTP id bi25-20020a0565120e9900b005007de4300emr13571895lfb.58.1692951138141; Fri, 25 Aug 2023 01:12:18 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:17 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:16 +0200 Subject: [PATCH 6/7] ASoC: max98520: Drop pointless includes MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-6-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: Q7V5YEVT2XDQGBULZKRQBULUFYUNTJMW X-Message-ID-Hash: Q7V5YEVT2XDQGBULZKRQBULUFYUNTJMW X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This driver is already using solely GPIO descriptors and do not need to include the legacy headers or . Drop them. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98520.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/max98520.c b/sound/soc/codecs/max98520.c index 8637fff307ad..edd05253d37c 100644 --- a/sound/soc/codecs/max98520.c +++ b/sound/soc/codecs/max98520.c @@ -11,10 +11,8 @@ #include #include #include -#include #include #include -#include #include #include "max98520.h" From patchwork Fri Aug 25 08:12:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13365136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 899A5C3DA6F for ; Fri, 25 Aug 2023 08:15:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BE11CDF4; Fri, 25 Aug 2023 10:14:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BE11CDF4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692951337; bh=FSlYlj1KG0nji8kkC1b1nGClknPc1v0yc/Fc3a1Sl20=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=L7Kw6wOyJd6FzKBv0c0fR8S6pMNaqS5/vTTxL2GLU2P19DaXcaDuoa4T6pqr1YY9z 8VjjMmAC6rHr71EElBg3dxKlApiSuiyVqd1mgf+kVfJUOob7TNh4//gHPCnUe8qpAl NkcfR1CtR6zcuL1W4APd3GUDOgZKD2n0/vdAClH0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A1AB5F805D4; Fri, 25 Aug 2023 10:12:45 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E6370F805C7; Fri, 25 Aug 2023 10:12:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EFDE2F8023B; Fri, 25 Aug 2023 10:12:33 +0200 (CEST) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 72B32F80158 for ; Fri, 25 Aug 2023 10:12:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 72B32F80158 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=N8tOQE1+ Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-5009d4a4897so959043e87.0 for ; Fri, 25 Aug 2023 01:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692951139; x=1693555939; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RoFqFLIfT/Pj/zYgo2TV8TIm3I2iaBuNZRSIlIfashI=; b=N8tOQE1+ggrtynhDr3biXEZNw1zz5cY70hzKKCVyFf+IMR1yXAXthVrO/VesE5LNY6 ZFTe+aebePO3TMPyUdOZVEzyfSEQc3DteeWzMyV2gwsGhB8kOMWjjZYb6Wf5JEfx1+lz 8TsDpUMI2g2nGjoUR29rC0agQh6w0db6a1QcHGvJg887QaBWx2t8czqalAywY0CXoOwg 40YCYGtu37bDDcAr4YtLIVR4Jy5MjaA0st0MTxF+h46IeoWNobjmX37+IvsTNDHZ9mjk M9aHhdvbtyHYBSZ+6mVz7bXGNAl4LlIbJ/3sigo6Emyc+iCyMEDtEpqqG2rHBisr8V3F 5fFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692951139; x=1693555939; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RoFqFLIfT/Pj/zYgo2TV8TIm3I2iaBuNZRSIlIfashI=; b=Z/ItYUnlPwczz2dFk4+3RCEXIb8zVhZzxex1XDT826W8UJ87DO2pzIvSbX7QfO+UBc enGm60MBnN3hRZU5Vpw955OSLLfuuMI1AkIU/l/49Co1YvIHVaNB0cwbo0e2w0xx4+ck suSgHn+iaRDy46fMwNyvH4cmk/a946Brlm5NJ6FjKqPNV3J093S6BrV5J+8xUUwnNLr2 bH6S4VRLjudwUFMvVK/K7UtIC1tklk3ygc3Y/d70UOHdntwhJWbbFWc7tcOYG8XHcuXs zqwTv3OB3gf7Tr2llbmakm9i5VN5+Btq654fKQF3fcQL16s1FjjyjD671dTksb3FRQuQ KabQ== X-Gm-Message-State: AOJu0YyKk1C7uPJJmNpyYuEBzCHiXTZhydhV2lRdh1VpWyskmqpcGQ8q iqIpWsOiW8WC6swgHfW1vGCnQg== X-Google-Smtp-Source: AGHT+IEjrTALuwMVuRJO/f49NCeBOByJE1JiQEqP9VZfv9t+k1WQ0Gs+avCqvnzSr9p3zL8bSAc/pA== X-Received: by 2002:a05:6512:3450:b0:4fb:99d9:6ba2 with SMTP id j16-20020a056512345000b004fb99d96ba2mr10022257lfr.24.1692951139010; Fri, 25 Aug 2023 01:12:19 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q28-20020ac2511c000000b004fe1a35fd15sm195559lfb.140.2023.08.25.01.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Aug 2023 01:12:18 -0700 (PDT) From: Linus Walleij Date: Fri, 25 Aug 2023 10:12:17 +0200 Subject: [PATCH 7/7] ASoC: max98927: Drop pointless includes MIME-Version: 1.0 Message-Id: <20230825-descriptors-asoc-max-v1-7-b212292b2f08@linaro.org> References: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> In-Reply-To: <20230825-descriptors-asoc-max-v1-0-b212292b2f08@linaro.org> To: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 Message-ID-Hash: K6NI3PNSBJCIRUH7J5YK7CTRA2PEBPXI X-Message-ID-Hash: K6NI3PNSBJCIRUH7J5YK7CTRA2PEBPXI X-MailFrom: linus.walleij@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This driver is already using solely GPIO descriptors and do not need to include the legacy headers or . Drop them. Signed-off-by: Linus Walleij --- sound/soc/codecs/max98927.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index 776f23d38ac5..70db9d3ff5a5 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -15,9 +15,7 @@ #include #include #include -#include #include -#include #include #include "max98927.h"