From patchwork Wed Aug 7 15:02:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 817443 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 5BE12C3DA7F for ; Wed, 7 Aug 2024 15:10: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 CE318162C; Wed, 7 Aug 2024 17:10:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CE318162C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1723043443; bh=7UDfwJmrMLWgAadMr/nmIe/06eQrWV7hakK6EjfMO1k=; 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=MKeDJIlnVZ9vZPAtQkY926Bv8RW2g3DBHfDXNHZorx8pTRlmDn/UMJvlh2VWdIg4j +Z7MywYhVUwwd4PJkruuFtJAKyzRbuEaXF/tIXmTQB1lzmcyKVdAjsZEN4+kr1UQqe KfcqJ/6nWlgBKH4XL9wAngT8NjmPVRBTqLAJ1kwM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C606CF8057A; Wed, 7 Aug 2024 17:10: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 731EEF805B4; Wed, 7 Aug 2024 17:10:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A79AF8049C; Wed, 7 Aug 2024 17:06:32 +0200 (CEST) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 70C5EF8023A for ; Wed, 7 Aug 2024 17:02:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 70C5EF8023A 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=tfbPWp2R Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-5bb85e90ad5so1857986a12.3 for ; Wed, 07 Aug 2024 08:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723042959; x=1723647759; 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=GOZ9eu7KzFM6ThSYO7rTFdAab7Vy2Og8cSyaXW3jcO4=; b=tfbPWp2R1R3UDpPe66UMuk9Zk+n9iWyyKsg7AFi21QoULinqg4xcLPGHjnf7WW6a73 +dF0Y1ANcdPn5uDKp/QkHSPHeTt6XCRCkJ4eN3vmDjWFhdU3gSl1xUd7jKci2BNfNYVl 6usAEfb91N9VQ4EchgIQM6J8/xzPAiFZcoolDHWvCbyHVRW+pGYoYG3NaHlQbSB3zMN2 KcW5OlcVzBzARQdKT27QGAQ4s9OOvdowjECpsSrqki7G1WGx9LEowPbxNV4pz0ObDela R26fQmkRIuMODUgpTZtjvQKVqib28yviELJJPs9DRdu9F47CQApM2o6s2Sronk3LX8h5 n8NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723042959; x=1723647759; 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=GOZ9eu7KzFM6ThSYO7rTFdAab7Vy2Og8cSyaXW3jcO4=; b=raG/C6jw9TdML5FY/tAAqt70u7KrPvV/2tmNbkt7T69bgodUVVdoVVp4jOpSmKI0uu iG+Y75HSJ69/wdm3bHxT2jb6JkuT9t3KAuHCquajO+ZQNusmSleMFaQwXzfkozXDZ4Fl MRJWYfkifqJsmbTGMCG5zl+PDxntSCHvLqYkWmmkWGnuK6EAkEn0ffbej4apEiedGIlM KKYF+WlHV4Ap+YY466yg8ws28Q0wVLpscFXQD5/l8jGnGZEe15YC1dMUnzgLHIBaVscI m3SlQS/yHuD/36i+qw7E0GdmsnHUEvPgwZwgchwallzAVJtgf8GQhROc0kavicMHScIG pBwA== X-Forwarded-Encrypted: i=1; AJvYcCVosOjfq399l8acw4Y3QtWlZxzviZ5nwfyiuU0bUOkCZk0Dt0l/07R40NQVEkX40aSn4BfzYpIO9oituBe81rjgz4xAJj8Ta8hmC1Y= X-Gm-Message-State: AOJu0YycWOaJXC8m8aE+IzEqpkWLRMZieaosM12GCdtkRpsP2vUGVeU9 rupJ2XZCN0hXEeQzeNas2tbb0Dq/LWJymGB/gKqBtyU0gYNtfFydnRak94W5AXQ= X-Google-Smtp-Source: AGHT+IGzpq+YuuOIP2PFUJ3vNl0MEGcLj5O6pGV4HEUMI9rYt73RXdKBpR8FRW+FrH9d3cp16wWxwA== X-Received: by 2002:a05:6402:60f:b0:5a3:a9f8:cf20 with SMTP id 4fb4d7f45d1cf-5b7f58eb70dmr12836219a12.34.1723042958942; Wed, 07 Aug 2024 08:02:38 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bb90be3a91sm2583047a12.65.2024.08.07.08.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 08:02:38 -0700 (PDT) From: Linus Walleij Date: Wed, 07 Aug 2024 17:02:32 +0200 Subject: [PATCH v2 1/3] ASoC: tas2781-i2c: Drop weird GPIO code MIME-Version: 1.0 Message-Id: <20240807-asoc-tas-gpios-v2-1-bd0f2705d58b@linaro.org> References: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> In-Reply-To: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shenghao Ding , Kevin Lu , Baojun Xu Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Shenghao Ding <13916275206@139.com>, alsa-devel@alsa-project.org, Linus Walleij X-Mailer: b4 0.14.0 Message-ID-Hash: K3KJFZUFAWDKNL3CGGR7KNYTX4FZPC5E X-Message-ID-Hash: K3KJFZUFAWDKNL3CGGR7KNYTX4FZPC5E 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.9 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 tas2781-i2c driver gets an IRQ from either ACPI or device tree, then proceeds to check if the IRQ has a corresponding GPIO and in case it does enforce the GPIO as input and set a label on it. This is abuse of the API: - First we cannot guarantee that the numberspaces of the GPIOs and the IRQs are the same, i.e that an IRQ number corresponds to a GPIO number like that. - Second, GPIO chips and IRQ chips should be treated as orthogonal APIs, the irqchip needs to ascertain that the backing GPIO line is set to input etc just using the irqchip. - Third it is using the legacy API which should not be used in new code yet this was added just a year ago. Delete the offending code. If this creates problems the GPIO and irqchip maintainers can help to fix the issues. It *should* not create any problems, because the irq isn't used anywhere in the driver, it's just obtained and then left unused. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Linus Walleij --- include/sound/tas2781.h | 7 +------ sound/pci/hda/tas2781_hda_i2c.c | 2 +- sound/soc/codecs/tas2781-comlib.c | 3 --- sound/soc/codecs/tas2781-fmwlib.c | 1 - sound/soc/codecs/tas2781-i2c.c | 24 +++--------------------- 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h index 18161d02a96f..dbda552398b5 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -81,11 +81,6 @@ struct tasdevice { bool is_loaderr; }; -struct tasdevice_irqinfo { - int irq_gpio; - int irq; -}; - struct calidata { unsigned char *data; unsigned long total_sz; @@ -93,7 +88,6 @@ struct calidata { struct tasdevice_priv { struct tasdevice tasdevice[TASDEVICE_MAX_CHANNELS]; - struct tasdevice_irqinfo irq_info; struct tasdevice_rca rcabin; struct calidata cali_data; struct tasdevice_fw *fmw; @@ -115,6 +109,7 @@ struct tasdevice_priv { unsigned int chip_id; unsigned int sysclk; + int irq; int cur_prog; int cur_conf; int fw_state; diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 49bd7097d892..8a7fe48043d2 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -814,7 +814,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) } else return -ENODEV; - tas_hda->priv->irq_info.irq = clt->irq; + tas_hda->priv->irq = clt->irq; ret = tas2781_read_acpi(tas_hda->priv, device_name); if (ret) return dev_err_probe(tas_hda->dev, ret, diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c index 1fbf4560f5cc..28d8b4d7b985 100644 --- a/sound/soc/codecs/tas2781-comlib.c +++ b/sound/soc/codecs/tas2781-comlib.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -411,8 +410,6 @@ EXPORT_SYMBOL_GPL(tasdevice_dsp_remove); void tasdevice_remove(struct tasdevice_priv *tas_priv) { - if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) - gpio_free(tas_priv->irq_info.irq_gpio); mutex_destroy(&tas_priv->codec_lock); } EXPORT_SYMBOL_GPL(tasdevice_remove); diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c index 8f9a3ae7153e..f3a7605f0710 100644 --- a/sound/soc/codecs/tas2781-fmwlib.c +++ b/sound/soc/codecs/tas2781-fmwlib.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c index e79d613745b4..fdf0840ac6c7 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -757,7 +756,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) { struct i2c_client *client = (struct i2c_client *)tas_priv->client; unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS]; - int rc, i, ndev = 0; + int i, ndev = 0; if (tas_priv->isacpi) { ndev = device_property_read_u32_array(&client->dev, @@ -772,7 +771,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) "ti,audio-slots", dev_addrs, ndev); } - tas_priv->irq_info.irq_gpio = + tas_priv->irq = acpi_dev_gpio_irq_get(ACPI_COMPANION(&client->dev), 0); } else if (IS_ENABLED(CONFIG_OF)) { struct device_node *np = tas_priv->dev->of_node; @@ -784,7 +783,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) dev_addrs[ndev++] = addr; } - tas_priv->irq_info.irq_gpio = of_irq_get(np, 0); + tas_priv->irq = of_irq_get(np, 0); } else { ndev = 1; dev_addrs[0] = client->addr; @@ -800,23 +799,6 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) __func__); strcpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name); - - if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) { - rc = gpio_request(tas_priv->irq_info.irq_gpio, - "AUDEV-IRQ"); - if (!rc) { - gpio_direction_input( - tas_priv->irq_info.irq_gpio); - - tas_priv->irq_info.irq = - gpio_to_irq(tas_priv->irq_info.irq_gpio); - } else - dev_err(tas_priv->dev, "%s: GPIO %d request error\n", - __func__, tas_priv->irq_info.irq_gpio); - } else - dev_err(tas_priv->dev, - "Looking up irq-gpio property failed %d\n", - tas_priv->irq_info.irq_gpio); } static int tasdevice_i2c_probe(struct i2c_client *i2c) From patchwork Wed Aug 7 15:02:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 817442 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 B0AF3C52D71 for ; Wed, 7 Aug 2024 15:14:19 +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 7D07716B7; Wed, 7 Aug 2024 17:14:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7D07716B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1723043657; bh=Y7W8wbrOkuNmZ8CQ0WcwZSJsXls2By5/tn0Y2KGbT34=; 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=ctN7x5/8pIva+4bau/K05XOVKCleqML2NtgyswgQc7ivPenaaWZEllZjMwePXWaed RZ/1jwip9Fv1UILe9M2PgL85Zl6qWSTlHpnCX/4PSZxyfxZxHcdie/JB8as0mXy6eX eRUDDqAbKwYII+aKO+WovMVCyNWY3VzibLbmHTdQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB06CF805AD; Wed, 7 Aug 2024 17:13:27 +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 58EEBF805BF; Wed, 7 Aug 2024 17:13:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E58D2F80448; Wed, 7 Aug 2024 17:06:50 +0200 (CEST) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 0C9EAF80236 for ; Wed, 7 Aug 2024 17:02:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0C9EAF80236 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=c4c5lNhq Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-5a1c49632deso2279885a12.2 for ; Wed, 07 Aug 2024 08:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723042962; x=1723647762; 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=WPaeIu/7/ToaPftt+nmZwaEM7lBvNV082estk80tIAQ=; b=c4c5lNhqCjXcByG3maa1o6N1ppq+RHST1ww4/W1kxThVY1NHTDn/LEDMjvB+zHZ77q 8KCMrI2yd0tj2Jy82HMbsQcsitEYuwq4mS+yu4wwKsPEBczkJrLLnuw3G+xzKGqUqzV3 ZI8uah9T5R/wrC31LqmDKmZDXQaX01EecShYunML18y8Us1HCrJJWDw0BYjNDe2Z8xkZ EmTt+sUnESaojRmBTsAUTraosw1Trxf2ksAB1/sRRrc8yN1tQ+G/f0J2CoCAHITX9wO0 mlGM42vpGO2sUnSqgDwTKnXDQKpDlUq/fvEbWCAbmW3mbHhRZeiFffUHJk/BR4kR5+if EJYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723042962; x=1723647762; 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=WPaeIu/7/ToaPftt+nmZwaEM7lBvNV082estk80tIAQ=; b=iorKj8VVwDhGEpj/mNIFfAPyFDRP1mXm2k5tx20sJ8g8mKIVXskTZz+VJ8jh2RE4Zw Y2k3yvvcIQxM/J7/+E1m3NT01It2fz/anQep6/iNqALF/yixAe+Vl1OlPDQ19pLG181x 0k9WZf7tLvelV1eQx/svp9jIaZAwrxG20/divpdVHqFp7pl1NiSQoF4OQF91aTM/ImIW SI0Z99f+vCbVVbj71ji3bvD5cawQMGvv+8DVXD9qX5BMvchAp7PpZABtsgZui1F17zFR QbO+qRmVi/GzmLhc3rEIHrrKFu7uFEiouuvv8yQG40chTVuX2IE2x2ozmZDbuArVuPFP opwg== X-Forwarded-Encrypted: i=1; AJvYcCVxznUTU6TKLrFx1ut6lLjGahl4ALjUsiXa86baFQmsEbgcrsLh5ieezeB06jJBMauJGlO2t/ucikfgiPIi/8IkNEOhZ4sdLcpza8U= X-Gm-Message-State: AOJu0Yzwjqtkcbb+IbVj9V34yLoyREPwh+339Af62C7AvExrC4WyzApd CFzHQbU2hzqpuXckhJ2m1TCu/EtQx4sHfwa2JLT84rVt2oHKUerHq4NSletVZZEvb3uQZ+Xwd42 1 X-Google-Smtp-Source: AGHT+IEYpjjpJDMbHBEqI4Rw2M2UUag+5UjvthzgGzzeXam2hAGeCohE28/rAsaJU5XDD5v2iV+kRw== X-Received: by 2002:a05:6402:331:b0:5a2:2654:7fd1 with SMTP id 4fb4d7f45d1cf-5b7f59e04d9mr11178515a12.36.1723042961586; Wed, 07 Aug 2024 08:02:41 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bb90be3a91sm2583047a12.65.2024.08.07.08.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 08:02:39 -0700 (PDT) From: Linus Walleij Date: Wed, 07 Aug 2024 17:02:33 +0200 Subject: [PATCH v2 2/3] ASoC: tas2781-i2c: Get the right GPIO line MIME-Version: 1.0 Message-Id: <20240807-asoc-tas-gpios-v2-2-bd0f2705d58b@linaro.org> References: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> In-Reply-To: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shenghao Ding , Kevin Lu , Baojun Xu Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Shenghao Ding <13916275206@139.com>, alsa-devel@alsa-project.org, Linus Walleij X-Mailer: b4 0.14.0 Message-ID-Hash: APW5T35D2UG2Y326ZW6EXYHTYTW5TVTD X-Message-ID-Hash: APW5T35D2UG2Y326ZW6EXYHTYTW5TVTD 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.9 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 code is obtaining a GPIO reset using the reset GPIO name "reset-gpios", but the gpiolib is already adding the suffix "-gpios" to anything passed to this function and will be looking for "reset-gpios-gpios" which is most certainly not what the author desired. Fix it up. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") Signed-off-by: Linus Walleij --- sound/soc/codecs/tas2781-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c index fdf0840ac6c7..bac5ea6d99b9 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -793,7 +793,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *tas_priv) tas_priv->tasdevice[i].dev_addr = dev_addrs[i]; tas_priv->reset = devm_gpiod_get_optional(&client->dev, - "reset-gpios", GPIOD_OUT_HIGH); + "reset", GPIOD_OUT_HIGH); if (IS_ERR(tas_priv->reset)) dev_err(tas_priv->dev, "%s Can't get reset GPIO\n", __func__); From patchwork Wed Aug 7 15:02:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 818437 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 89A35C3DA7F for ; Wed, 7 Aug 2024 15:14:30 +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 D42AB1931; Wed, 7 Aug 2024 17:14:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D42AB1931 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1723043668; bh=gD60QMy/QwxxGBLOYwPLMsMir9my6tspif2L4UDaxCo=; 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=b2lN4yN1Pr1dgTpxmBDF9SsvHGfXqMs33ScTH75prI/ivQaPc/M2K59ybvqnfQ0Qz ESl+uNnBGDiGPS/boOkxbcKeCxU6beMMc/Fbtd9oDVzndDlh/TZuY5GcRDTP1qk+PQ Fff5767Cup4fixum4G5hAMo5r5M0b+CcUJthJ/ps= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0671F805F0; Wed, 7 Aug 2024 17:13:29 +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 CFD81F80607; Wed, 7 Aug 2024 17:13:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44414F8023A; Wed, 7 Aug 2024 17:06:52 +0200 (CEST) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 77A15F802DB for ; Wed, 7 Aug 2024 17:02:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 77A15F802DB 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=lhTNlaoC Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5b8c2a6135dso2781296a12.1 for ; Wed, 07 Aug 2024 08:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723042964; x=1723647764; 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=zb7lA4qnI7KpE11eMK8Td9pIdoQNK6RGZ1WWHf+hwpk=; b=lhTNlaoCfgzc+TqVIm0LoGeqrJnrIOQBwawdDR24q5eGL62nEzllP3/5D7zU/44dqS E5q5ArFE2LO3ZU+cg/HDzOP1pEWArepJZFNLzYqxBpFkLdehUiSP+u3gEhb7yarTm3dU yAiPAv8fAcgk3F+A/qqenn1rkXidQGoF7gJ5gwDWfiTTCAiIlOd4pdLnN//dUtO/fgRE My/DeyQEjqARHA8AhZPJ/UVDhp0YpKdWDBkd3sdrh6mrmX4xOcdGK5txFrkZiPiB+yqr ghj7Rf7WaJT2CiLbyQT+rxCh05gn8Al85Pe44n6ePUImHLd3jeevUbDFbYFrKTm68aeJ k+fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723042964; x=1723647764; 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=zb7lA4qnI7KpE11eMK8Td9pIdoQNK6RGZ1WWHf+hwpk=; b=DwOcspvhltWT+NVmdS1cUaZ9yNyhwO9VYDu1l54Ed5UybxQAvw4eKQyHcUoLvValQW agzCjrlOhC6SkCGJIrlZ2Jm7xyX7M3LIebbJJEShEL2mFtx5OLMvoWdmnT5zJCwTHejV BriMkOtPtwR0dR8Xf5GgWlQDP+JaXBDQzgkaaDBZ8EDSNAKn1gP3OdB8XtsgCy6Y4ZIN O2gCuDq8k9ySQQpvazVIpqk6tupj8cVJama2KgFQhjIOXWVeugYXUsq8EBlm1D/gB0vx ON0m2rJnsH3BSAT//X+X6LvaBr/yMOL6k2kIWMGOOgMfRrqwf/72Pqgjv+sf3O6FVFm1 mGHw== X-Forwarded-Encrypted: i=1; AJvYcCUwcC6lCPQkoG2fqTxZPe6JwQAofZvv8b1FC606m9k1+TIj8Soo2VLQy/WE9wS3vlEhlSCNnzDGsJrNPXSKi7ciBaZzEhhDEUQMHw0= X-Gm-Message-State: AOJu0YwCwsarxEx4FEQsaAmDZ/a6fbki8yRf2fyfKLIQz2XSEMXZyFYw lMiIzmaKWo0E7MRnzxnm09XB1P8q6vFaJXEoVvaYIVrJ8FeJwRWdNGoDxhzpqyk= X-Google-Smtp-Source: AGHT+IEBb/2tO0u0sDAp3dDW7mXSiJkZfOd7Vz4ANN2+MBZgge3MX1YpJhT2vVz4APXcj0lgtag8Kw== X-Received: by 2002:a05:6402:1a3c:b0:5a2:1f7b:dffa with SMTP id 4fb4d7f45d1cf-5b7f350462fmr13646143a12.3.1723042963968; Wed, 07 Aug 2024 08:02:43 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bb90be3a91sm2583047a12.65.2024.08.07.08.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Aug 2024 08:02:42 -0700 (PDT) From: Linus Walleij Date: Wed, 07 Aug 2024 17:02:34 +0200 Subject: [PATCH v2 3/3] ASoC: tas*: Drop unused GPIO includes MIME-Version: 1.0 Message-Id: <20240807-asoc-tas-gpios-v2-3-bd0f2705d58b@linaro.org> References: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> In-Reply-To: <20240807-asoc-tas-gpios-v2-0-bd0f2705d58b@linaro.org> To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Shenghao Ding , Kevin Lu , Baojun Xu Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Shenghao Ding <13916275206@139.com>, alsa-devel@alsa-project.org, Linus Walleij X-Mailer: b4 0.14.0 Message-ID-Hash: 6MWZXGSJUFC57NNZYSX2YF3WZR633BAC X-Message-ID-Hash: 6MWZXGSJUFC57NNZYSX2YF3WZR633BAC 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.9 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: These drivers all use and has no business including the legacy headers or . Drop the surplus includes. Signed-off-by: Linus Walleij --- sound/soc/codecs/tas2552.c | 1 - sound/soc/codecs/tas2764.c | 1 - sound/soc/codecs/tas2770.c | 1 - sound/soc/codecs/tas2780.c | 1 - 4 files changed, 4 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 9e68afc09897..684d52ec6600 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c index 5eaddf07aadc..d482cd194c08 100644 --- a/sound/soc/codecs/tas2764.c +++ b/sound/soc/codecs/tas2764.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 5601fba17c96..9f93b230652a 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2780.c b/sound/soc/codecs/tas2780.c index 6902bfef185b..a1963415c931 100644 --- a/sound/soc/codecs/tas2780.c +++ b/sound/soc/codecs/tas2780.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include