From patchwork Mon Sep 11 08:23:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379015 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 D3DC6EE801F for ; Mon, 11 Sep 2023 08:25:44 +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 BEE8BA4C; Mon, 11 Sep 2023 10:24:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BEE8BA4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420741; 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=sPTIDqUaxzJns8xOlILjPFwlvBb98lPQaIvQ2GYp2AnaS6sheU5c0rTiS4MzDNoU8 rjSMY64WMYZ4Mhckz+rwyKRFBKYKDMA5M6No7NLsBHrdjE7swqMU0G8jOyv0EO12Za ISwMt+0yhQt64nMkB5fuiTKNPhWGW1Rh7OdFdevw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 36497F80431; Mon, 11 Sep 2023 10:24:04 +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 C383AF80568; Mon, 11 Sep 2023 10:24:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AB804F80552; Mon, 11 Sep 2023 10:24:00 +0200 (CEST) Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) (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 8B7B5F801F5 for ; Mon, 11 Sep 2023 10:23:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B7B5F801F5 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=quNLntoZ Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-502a7e1bdc7so3024856e87.0 for ; Mon, 11 Sep 2023 01:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420630; x=1695025430; darn=alsa-project.org; 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=quNLntoZk6qr/F7ZGiS/iko/wD56SLQnv0WRdVoAopUjT8dbIhyCFOHf1sbCeScQhR 6507VcfXwxBrx4UuqqrvmFiVSd5zpZIuOwxK6HW+NIwjLRW3OCZ6XCQFdl2+YGX2TV2v gWKjv+v4LcnIZuZyBdIqx/6D1Yl8N4+Ff68Nf/JIhrz6tH1FmldDfWDqkMrlmNFCek4w Uh0hZHra4TcKS7vVbppRH00UX0ltPLkWTCOe62iEMqMNVf6NMJg5QzY0OJcADpVOoGXe EPFA4zzxHCK+HSar6IXbTMMhYt90zfayzuVLE5VQ/Z6sSmokVCaLLg7GEi/ztu/NNO/S jO8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420630; x=1695025430; 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=fjZUOEJHhNpdNtw6aZTwpIOfj1FRgWzkmZbPymWgBBft2cWRiTpC7s2CzgMyJkgSuP Y5W2Y8e3zRAw/J6cOydATPYZW0P7tFRoG9x7j5J4a2rwlKxQpREu1TqvoSu/DbH5KR4R 0Tjb6ZpK1WNcOZWMhog8Bmbwt4Nu8uHFx1CZJRFx3iNDIr+YbyXw6mj3p+G2ahiqgdHh N3zZr6nIcWIrl4VkOwEScOp2hMt0r0Mo9qeGzT5vqNcOuZsm5O3hNxaxfg1R0DI2T+9T bOFif5yXLfu4wMLROCl/T4yczRnQRLylbFQmy3hmnfHY2wHlj7EbA4w22ZryQ46Ni3LZ Z6JA== X-Gm-Message-State: AOJu0YweyxUZbtHsCCn5J0/OPyOGdXK98s8oaUDXKzv59MA5hQZULnho tSIO64VK65X5wulx3eSLYJQ0rA== X-Google-Smtp-Source: AGHT+IH2r7bEFi9jxVEwNGLaxc6z7Q9adp/d/GtZ3BsKXID0oUG7bLJPmPTXt/XXRsoZ48ICBEYqow== X-Received: by 2002:a05:6512:1185:b0:4f8:5cde:a44f with SMTP id g5-20020a056512118500b004f85cdea44fmr5691530lfr.10.1694420630585; Mon, 11 Sep 2023 01:23:50 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:50 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:48 +0200 Subject: [PATCH v2 1/7] ASoC: max9768: Convert to use GPIO descriptors MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-1-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: IUIRDZW2AKAUOUMBWXYFO5PBVBPQNWHH X-Message-ID-Hash: IUIRDZW2AKAUOUMBWXYFO5PBVBPQNWHH 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 Mon Sep 11 08:23:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379018 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 D0309EE57DF for ; Mon, 11 Sep 2023 08:26:32 +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 B5AE3DF6; Mon, 11 Sep 2023 10:25:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5AE3DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420790; 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=ZZlUwJUEgWklH+RftIdicLK4yopmQPmlvPlBchuXNEGt5fD8n/UB31UvM7DPR2Zfv MtdNLF+p30EkOU95de5koJqMzy+TIa9Awm7YHVzraQdxQXyxOHo9CG2Zsy2vH/Xj30 APYgSYcOUscTmQIpPO9YumfAy5fwmZALmrdO0bAM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA6C9F8059F; Mon, 11 Sep 2023 10:24:14 +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 21C7DF805AB; Mon, 11 Sep 2023 10:24:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D7123F8057B; Mon, 11 Sep 2023 10:24:04 +0200 (CEST) Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (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 2B438F80246 for ; Mon, 11 Sep 2023 10:23:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B438F80246 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=eGbum3XY Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2bcc14ea414so67292621fa.0 for ; Mon, 11 Sep 2023 01:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420631; x=1695025431; darn=alsa-project.org; 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=eGbum3XYxGhQsGwGtGn2rZ8wyybL8wJ8zcxRr7Pz/DVL2+B6LznVNKByelwBmiAAPf 6jOZ1DGVp4BKClpzPB1CZySpIwccpeq+TxL0j6vaxEIF3/McBr1PXq+9AxND60iqXoQ3 4PVAfPwEs44U1z+Zs3rpTaLaYa+UpETeWNCHG3B1a5tj/Oa+cuxMc2cWWcJsHkZ0rYS2 ZqW4Fkf44HLK/QPS7/xNFLvK3gQ/L3BPelH10BGCXRzi89dMB5sJiGj1a9nQ27vpyBnz o8yWwU7N7HHtcs4Zdpe+Ty9GqHDe9n3GSrQAlgpuPM3A71lyQs/knGzdfFoUU9wtvigY obIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420631; x=1695025431; 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=tTSFHqAlctPP4Smh/4o7EuawwttaDpIPRING20IAsYh8IyG9f8xT1WIm8oLrTP8UlV M3uhK+r4Q8C+iAM3CEICsQepAfS6hsGmkH5jY9QASAvbeicwYJ0RO5pN0jtSFh0cd+7n 9s4fe7bmorSvzwHRrX7UA5ne7Md/g4IhrnhFSuhAAbigvMEIRi56R0im031zC1C8wcAN 8Aq0Vj3A033+l8H7yy+Z4/tnF1dRHQrD0O3tR2L4rGmNqBBVPg0yy8C8oPdU8d1MCC8Q 3CLjrLqVnfKAEl9I0Yf6LmG47YqprsKQN71xVqkismwgTUMVB/g4Nl18CLZ9A4HvSnGp NOeg== X-Gm-Message-State: AOJu0YwFW85Jh9UePofi6c/z3ttahzdqX4sMUwSuwF+il67rd1dXrkrk +WOTOocNop9PpPS29cWZjXSTJQ== X-Google-Smtp-Source: AGHT+IFktZEGzVQ79iSZyPcJk9XOSRsrzr5WoeyEli+ACNX43xpOf0axceLlu9TSC+4tN8O7hIKwQw== X-Received: by 2002:a05:6512:6ca:b0:4f6:3677:54e with SMTP id u10-20020a05651206ca00b004f63677054emr8794627lff.36.1694420631650; Mon, 11 Sep 2023 01:23:51 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:51 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:49 +0200 Subject: [PATCH v2 2/7] ASoC: max98357a: Drop pointless include MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-2-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: DLSQ4ACBIZOF3BLIOW6YCISOZ3NGFYFQ X-Message-ID-Hash: DLSQ4ACBIZOF3BLIOW6YCISOZ3NGFYFQ 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 Mon Sep 11 08:23:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379016 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 02140EE57DF for ; Mon, 11 Sep 2023 08:25:52 +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 3B8A0846; Mon, 11 Sep 2023 10:25:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3B8A0846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420751; 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=i90Cv8sezKZPIbAxRetPHXLyFIHdSKvWGNuEh1p8JGFI62ghbB+oGwRGvulWe//eh FeL6Oc5+4Zs3D9WIscZdP/0PkVPj6BfQkWSAAG5vUDc0r36JD/L+tWCTGf5cCs4JTz DlVycrKMGkUF0ygvmzAp9cyPnQlxHWscvwmAryoc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7953EF8057B; Mon, 11 Sep 2023 10:24:09 +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 AF646F8057B; Mon, 11 Sep 2023 10:24:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A6E7CF80570; Mon, 11 Sep 2023 10:24:03 +0200 (CEST) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (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 9B18CF80431 for ; Mon, 11 Sep 2023 10:23:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9B18CF80431 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=kTse9t7i Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2bce552508fso67712021fa.1 for ; Mon, 11 Sep 2023 01:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420632; x=1695025432; darn=alsa-project.org; 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=kTse9t7iVJc5iq9wptlDVeVt/VUB7GMqnkRked5SlNfMx1+a89C+0qUrHkQOrtEOZf MItPfJFNvPDEFeitFiKVHFYJNdjXi0W8a+cMHvhtJ2xv69XQvYakaNnfbM2Wwfg7f7cY tWoU0I8AcpNTmyZwngPzg4qWUGB8Fh2dJy88AlXNNbO1X2WCEmpucU2Oj7hhIzjYYgGV nbyaKVW0w6Ahb7EFI9LCkkrUAdujKVtqEExbN8IVIlI7x3Jv0t9tEXxhJMGVjcbTR2hR 2ANltc9C3DiZSlSs/VK59s7NY441kIwJQPpAVHBVc94rb2dWrWjp935idssz7O4MmK1L tpTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420632; x=1695025432; 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=RRWQ6wkS7+vo+DaJTTR3n5CZ9+V6JbeXT3bloc0YstY7bUG0m4Sg/KUnb2jd3xF75h dhoXE3iCzUfixcPg+a64kvOfsW4vD1gAWN6HwCfcGF2KZ+CRNDZgeDrou4Qk/Ej1JHOK Iu7AnFJgDrObWxEVhzsolno41064jOrMpG86jHKA+hskcgKRFEWs706Qv6MMJxAY7P2c On6Wy8EL94i+/3Y5vjObwVr9rz4s8c+q1DZz8zb3uoM8VV0sj/Kctg7FwLi0cwSKWvaB qHb/Hfyqzp6vz7BWd1xf3gjihlX5+m6yB8GsYYIlCIJliDPkLYSsc0aKa8fanCta0mDm aWzA== X-Gm-Message-State: AOJu0Yxb4eTVsVQrOqk7FZQQ24E9LkfTsf6eS7J6oTTkF4l3NB8SSiBY npux9jA6BN+yo+ONZyUy5x8zdg== X-Google-Smtp-Source: AGHT+IE795z4MeyvcfiIIYPz/bYjnDK/11+Ubx+DKYPxh6E6lvf7/Sxx7I8bOqlaNVa5jarhNcJo9w== X-Received: by 2002:a05:6512:398a:b0:4fd:d213:dfd4 with SMTP id j10-20020a056512398a00b004fdd213dfd4mr8795699lfu.20.1694420632485; Mon, 11 Sep 2023 01:23:52 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:52 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:50 +0200 Subject: [PATCH v2 3/7] ASoC: max98373: Convert to use GPIO descriptors MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-3-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: XNGZT6GCMVAIXZB657E2IR4E2DZ75RZN X-Message-ID-Hash: XNGZT6GCMVAIXZB657E2IR4E2DZ75RZN 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 Mon Sep 11 08:23:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379017 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 95EC9EE57DF for ; Mon, 11 Sep 2023 08:26:11 +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 9FF46DEB; Mon, 11 Sep 2023 10:25:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9FF46DEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420769; 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=FMI3bXLyDKYIR1AaGNNIyxphY85P8tac2Vcm3FFIlxxzKwg1wzM3HUQOGGVOvGU4r LsDAtPeOFatocJlEpxjaHvgL4qwHPKOq7e7kBBugSuSuDymAVExcmQY5Rs0GLdpkqz IBMXLARWifJBOKHh4pcSbDSyhDpswYTw1P5LhLHg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AFC4AF805A9; Mon, 11 Sep 2023 10:24:11 +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 1FFCCF8059F; Mon, 11 Sep 2023 10:24:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 91442F8047D; Mon, 11 Sep 2023 10:24:04 +0200 (CEST) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 47DAEF8047D for ; Mon, 11 Sep 2023 10:23:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 47DAEF8047D 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=iconYEok Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-501bef6e0d3so6836928e87.1 for ; Mon, 11 Sep 2023 01:23:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420633; x=1695025433; darn=alsa-project.org; 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=iconYEokDaHrwToh3SfEOtxLgSf2JHKfPRzXH/wU8D+GpUbNkSmEIxhNzT4y+RQS1N YFaJBmFYvqQPbioHFF+EbcjwsV89J5zDETxiqp42aOZ+9Us8ZVgH/cC8vS9t+4YdC4Na isgARE0JprDA+9cpaaXzRACr5R++pHLIo7xjCVhaUWK0zr5cyQQhKzOwxG3Miamt7vwu Fo3PPdiirI48DSvkfhoMKZyP1uij4AyeDL9xpYTEPpQqvWelqYPZoV9Y1WI2+dzdVpZF Rb4+FInBDHpgFe2TObgJgbr21s0+yuz/aEIPcMvnNbQe+AAIut4JWGhQUisDLYYbyBSt LWqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420633; x=1695025433; 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=KKeQ88xk3AKi58Aef4JfJ6KXGlCIp1Heemu96cj4dGDzKQ7o5y1r+jvxib3entc5gQ fEgxppfcCXeQ9wyUJfsY9YNMgxcAGQhEazj7QPteOfb5JWms0CNhyR7YWPsrvAgdMr53 kpcTydKkitB0dvmRXQ2f3R9jdWZWNzkAAwbsGp8noxxcwnub9U+uJ9d52XLm+iQiLz8S GSYAOFos44uhj90J7afUrv0NJeCHSKhTx6h14eLMJmYI+5lffheVGYQek+/nFk2Vw+Ll erQ2iFrhwEX0AnMDkr6RfDgOy5A0xyYDstMoUN3lXqcBDMogZyOaz74zsDknad63BgK+ sGTg== X-Gm-Message-State: AOJu0YzllSTM5+qAv4tjSqan9howOFbu8ID2Rfc0MjSLWAwK/EEOwPNP r6wYB2Cvv3VGUlrxUkypw2QWsw== X-Google-Smtp-Source: AGHT+IHLa00uwx18Fzy5EPh4buiYBYfThSk+G9oIq720hxnYrYyiXAOCwPIUdXV/kNi+50d/4ljcyw== X-Received: by 2002:a19:c505:0:b0:500:b302:3281 with SMTP id w5-20020a19c505000000b00500b3023281mr6564384lfe.27.1694420633260; Mon, 11 Sep 2023 01:23:53 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:52 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:51 +0200 Subject: [PATCH v2 4/7] ASoC: max98388: Correct the includes MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-4-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: 4PZYIOJWK5NMTLZECEKESD656AJSZB4U X-Message-ID-Hash: 4PZYIOJWK5NMTLZECEKESD656AJSZB4U 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 Mon Sep 11 08:23:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379020 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 54EBBEE57DF for ; Mon, 11 Sep 2023 08:27:02 +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 57052E73; Mon, 11 Sep 2023 10:26:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 57052E73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420820; 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=IcMs8sWUz8bnsJ9aD4vRMjpUrr5T9mbShoCCqiMm5OsAx2z6pOsojseiU5tUPDuB+ 3/+L/ip1Xk10BG93jD6+eUDo5WZOe1EA3P0gipu9CwsRkbL7BsRi8hQnovu3Qd1AFs JALsJsPn20lao1Zt0JENa9kWg6jQfxalXr+Yafoc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EFEEFF805CB; Mon, 11 Sep 2023 10:24:18 +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 60D08F805BF; Mon, 11 Sep 2023 10:24:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9FFF3F8047D; Mon, 11 Sep 2023 10:24:06 +0200 (CEST) Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) (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 5BDADF80425 for ; Mon, 11 Sep 2023 10:23:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BDADF80425 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=OHKKqAGe Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5029ace4a28so3604690e87.1 for ; Mon, 11 Sep 2023 01:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420634; x=1695025434; darn=alsa-project.org; 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=OHKKqAGeqPhss5IfEpDGVr7WWjbmCKvsiTQ9XxiKyJvJKKRCkjmJHw3OL2aV8n8C8p N75Z+kQCiduc1eQX9GM5fCw8bSphkry5maVbLFbm20P74+FXPaSHdASk41zVYQ+l2bYy 4daHhjgRXhyCa8J0u/Z7KxAx+iTEOFEqCc9NXTy8M63FCQU0NQDYpItjZ3uhke4xyNi/ EUdYjLydc2sjRz8mu+xN5SNd/DVs4l4ZR2jt7HGFxjnkdiaKX6FU+SEZbmty1D8IozKb EX1H7/7evATt79snmn5mYow+lwXpUl+aVwDsiTD9KiPZub1xeBGeC6bqWztaIfnSQ0pq QDsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420634; x=1695025434; 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=LFT0S6PS4Vm5+rsuWYTpid/WBWHuIhXunxbF5tVKd5ikl9JODzwkz9WIfEpQnsvOhD 4s+YV4ptDWYKMqdF2xRByB/xuzT9J51111Uu0udVtiW2b+QDCgu7r9jPA/aaTwu2DD2O BkQCqvf+pFuKsfqBFsR8DmBniccjWblFl7O4JMTLEXISZnvVxRAvVprY4wVIwv06/dnh O9wptP13uu0KH/m1JfbRmR4kwIxPXYybJAcu4ShGOiV7DgxcYGSCG6y/KV2fKNabyUMK Lkan+xBPUbql7EJz8pRfDzFOaDhkgnwYLWBR4dLX3Jdky/CoZC+gOpW/ajT9l0EbdkBI H+1w== X-Gm-Message-State: AOJu0Yxy6UoO1PbACVkiF97aV9z/jXAjeArx99rHYev3rXrGkXmobNRk mHl3G/WYXk0S8IqKQod9IvJqmw== X-Google-Smtp-Source: AGHT+IE6WCFsa0bFZLixppvL9WUrXFO38to59wdYHxNCXTqD4Xc/xeONINSL8v0RojtmsjmZbNdCFA== X-Received: by 2002:a05:6512:3f14:b0:500:d96e:f6eb with SMTP id y20-20020a0565123f1400b00500d96ef6ebmr3927961lfa.19.1694420634181; Mon, 11 Sep 2023 01:23:54 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:53 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:52 +0200 Subject: [PATCH v2 5/7] ASoC: max98396: Drop pointless include MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-5-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: 6UXVML3ZB4B3JGRK33IU5JZIFYOX5ICT X-Message-ID-Hash: 6UXVML3ZB4B3JGRK33IU5JZIFYOX5ICT 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 Mon Sep 11 08:23:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379021 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 76CB3EE7FF4 for ; Mon, 11 Sep 2023 08:27:28 +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 79F93E79; Mon, 11 Sep 2023 10:26:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 79F93E79 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420846; 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=iwN9FRKd3B57Q/cF8mcrW6xb20ACC8+P++/pU0YxQW1W+PDbzv9PRs5zy9Rngmiay Z+QVqUhmMebJ0HKR/igTpYwNFKzvVIoiPCXKnvWR3L7NOGd9LNmjVAe4dBiIEd4LCH 7yolpNh0BqYBhivPr76kXAdPiWQyYnwrCUpREiWw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57501F805C9; Mon, 11 Sep 2023 10:24:20 +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 01FBEF805D5; Mon, 11 Sep 2023 10:24:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 588F5F80425; Mon, 11 Sep 2023 10:24:07 +0200 (CEST) Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (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 EF28DF80537 for ; Mon, 11 Sep 2023 10:23:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EF28DF80537 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=NiofoqTa Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50078eba7afso7160145e87.0 for ; Mon, 11 Sep 2023 01:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420635; x=1695025435; darn=alsa-project.org; 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=NiofoqTan7C7uNUK8Weqamug19/qrZ4a1z2Cx3sezFbMBKpXyKTFjV7j1ZSs0DgJ9M cOvgtXkkISJX4U/pm1z7pEOY0/TNc0EFm/IdDDwrFF4v43pAQ3UOfupzhh7BpJUTJ/OL N9ljduIxZimhaIYaSFd1bZ9gR2PqbmO/HBaGTS5kUvBW63FycpP3Uf2d/+71U44GxpRu t3uFw5ekE5rkCFyl6968rDpYCsCpZi/JpijUR7zTbMus41ZkT8wz48nyHz/wNehOPup3 9XtVsv7boUQHKBv5+cDfYYkBgzMsuOfQYwocC1X5+vmmdXvT3oP1X801ZT69azrLu8VS iKMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420635; x=1695025435; 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=ug0OT/dG5nkc5n/hYFkUgO5xxCpDSflOo/FwGXh9hR0DN/+s8YAnhiTzplHiEtuuM0 7k3GUEByImqvavUD1XYvm7oao+4QWs9cm7G66GcaV7keff0lJaSD7mdcpgaGeKaqnH7q CtQ/GeuygnAMtO4QF34rjjqe/FATv+Ay60VmzwXSu5jcaSGY2Dd7uwToXzt8O+Sl5u7l RDoW7VAJh23PJTcQ8HLpJ79q9B/jEaly//0vJIy43JyyB6gaNgRJxQwtLXyG/OuBDIwk S2aN7JnuqAJPWkggTy1T2dTBIkLgqgOfOjUFgG+RsnZFoyCQJ90G3LCaXtTJPoPYHh9O Fy9g== X-Gm-Message-State: AOJu0YycV4iCqCx4+hyrNtMoBcucUO8D5Lm6gljf8F50nf86bhv6U0qj nx8KggDURLcG6IdeB1BdXDYEDw== X-Google-Smtp-Source: AGHT+IEQ4w417/0zEAT3z1jUW5wv9C0zAydtmQXHmAkRjf5g/xJFpgA6Pz1UnIvmT0XiSUbE22ZM/Q== X-Received: by 2002:a05:6512:2211:b0:4fb:8939:d95c with SMTP id h17-20020a056512221100b004fb8939d95cmr9556754lfu.30.1694420635138; Mon, 11 Sep 2023 01:23:55 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:54 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:53 +0200 Subject: [PATCH v2 6/7] ASoC: max98520: Drop pointless includes MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-6-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: T5GRAKABPN4HVBBZ5RM5WGV3GV7VIGUK X-Message-ID-Hash: T5GRAKABPN4HVBBZ5RM5WGV3GV7VIGUK 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 Mon Sep 11 08:23:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13379019 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 9A632EE7FF4 for ; Mon, 11 Sep 2023 08:26:45 +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 7187D950; Mon, 11 Sep 2023 10:25:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7187D950 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694420803; 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=V+gJuxuPMg0Zxfg+T0F/cZevuhUBMyQgO3jSP8iHYqQyHnsY74Y7IbzF4SkM1brTP 75SkAmlg5Y0xNdY11Ic/2u+XmVKOSZGxKcS4i86GBc+sAwwafyrAr3Nx0eTTNzwlVh sxf/HhvUf/IvhxVJNP9vcDcZIjgvbPsydwlsnyiY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44517F805C1; Mon, 11 Sep 2023 10:24:17 +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 980F5F805BF; Mon, 11 Sep 2023 10:24:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5622F80568; Mon, 11 Sep 2023 10:24:05 +0200 (CEST) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 0A591F800AA for ; Mon, 11 Sep 2023 10:23:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0A591F800AA 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=wKWunjpr Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-501bd164fbfso6672979e87.0 for ; Mon, 11 Sep 2023 01:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694420636; x=1695025436; darn=alsa-project.org; 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=wKWunjprOpORdBoSk42WXGqEg88XN194T1jeNKDgAJz4h66Dex4vGk+aeXXTsBEEm1 hRoRjecxHpM4xhU2219KOE4qpU9TFpL7iY15DAwlsPxuGKGwYXXa52qsD3pmRXrtEmDg sBTbrn3elJ+aE61I/GOkrbBjqOupQFmaufQin2ywYTlDNofc+FqShVtIrBO2aID0gD9B iGNwCQY653InUWAOfPMtSevSAfiMGp9ry1KYts0x8Ep+48lFjnkrgWFncEOhoPhZ1vfT NSjGWkimfKq+dfJevFvn3J841Kw4oS0OwPu5Jut2HOlEpUK+THFfO4Yu5nCQB8ly4ELY BSyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694420636; x=1695025436; 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=mzQHXYvzfWqHzjSSRfBYqkkolaSe+W909aLtJRg4D3WgtztQOJ2ruu9pqRmi0DbTkJ zGWoZgiVFNH8HH9KHolJUaLn283xn0i5t+lIvv2MdtTpDET0t4Ds3Fs8YrOOpn8ei1Za AA0KS0q6bqXLyOOL9cbrSUCs7ndKrbdDKsmhKF9hEzDMuTijiR1aVtWSiJCVNIdY9s1d CXEmRfAjSn0j7kJxZxrqIkL4RywFnSQzcO0XbwwlxhPpCUvp8JxFGbzMOApNQnAFHctf Wx0zX5Zdi7pupECxKjb6UTWt8Em7bl54sB3X7P1zoai03uCp7hP5TpsoC1dJ+P9tl4/F Xvug== X-Gm-Message-State: AOJu0YxU5sm21zSJzLmH3l0wIZZgDdNXgAYffguGfDUAbBk7S7v/sYhn JrsX9Bt3kUXi913Jiavg7F933g== X-Google-Smtp-Source: AGHT+IH/CI+1Aa8xWX3l3qD+VArAvLQxWZ8YfL/GW2vDk7MBZhMam+A68zhQz0zu3t/vzQtZwPJeiA== X-Received: by 2002:ac2:4c48:0:b0:500:c765:bbe with SMTP id o8-20020ac24c48000000b00500c7650bbemr8797463lfk.0.1694420635941; Mon, 11 Sep 2023 01:23:55 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a8-20020a19f808000000b00500968ddca9sm1247712lff.136.2023.09.11.01.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 01:23:55 -0700 (PDT) From: Linus Walleij Date: Mon, 11 Sep 2023 10:23:54 +0200 Subject: [PATCH v2 7/7] ASoC: max98927: Drop pointless includes MIME-Version: 1.0 Message-Id: <20230911-descriptors-asoc-max-v2-7-b9d793fb768e@linaro.org> References: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@linaro.org> In-Reply-To: <20230911-descriptors-asoc-max-v2-0-b9d793fb768e@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: KE2M4OPT5JNPAL3C425A6E4ILRNL73VH X-Message-ID-Hash: KE2M4OPT5JNPAL3C425A6E4ILRNL73VH 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"