From nobody Fri Dec 19 20:10:11 2025 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B841A5103F for ; Mon, 1 Jul 2024 07:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817360; cv=none; b=HEhOO2LzvXo8pnSGZt0bDehwMho3moP9zjeZZdlvuE7No3+GWCrgKW9PeSdHsUke5ulZj+ogN2Mzwtn/Il2ovCAvmBpAPMc0whcf6tUUZpHahKv0jNXUOVEiNAA0f+k1Uo6lGGNrHLMKBahZnO4DiPZcxX+8wfnRAavndO1MSyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817360; c=relaxed/simple; bh=HoYOZ5VZZSoT1oPQmsk8ALI7brrvFdAyk8iW+8VaR4M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UC+zoQ4HskFdsAVaVPE1P0dFQVdQ/H2oNNl4+rftUzX5VSBTKhI4cAlw0jnMtLr0eELYQrpVilVoHisLM3gRFCGR1RVSwi1gZpkBCiF6FAMFtbFuXhrYSmEpwZVwJ50fmwPsRoFL1JFkm0LZJiqq5S7PdqWrbYLjWkd7e+xZ2GM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=kvd6i+a/; arc=none smtp.client-ip=209.85.208.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kvd6i+a/" Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-57d20d89748so2835687a12.0 for ; Mon, 01 Jul 2024 00:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719817357; x=1720422157; darn=vger.kernel.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=G0uxixe8SRdEtYS3hYnA/51z5ZCVTziscEpNL0ARHP8=; b=kvd6i+a/8KSSu0NKX5Qvd7b+ppJhT5FrDmuIKUHmKBGHhieikiXrm2al7Lj4b8vDBj nohdvVhGFBVNSw2U1q1V4QR/BDqKj9ll26StvJWYV/CQQI9i3m6YXG0/Y7oyQxz2f7to DBcscjENTIycKvdzyMd9k9l660kaaF0MaeCXsg27wcUf9Jrsqz19ubGKmj+v/foojqLN lxCJ8LNsIJX0KOQQMMjmRcl50YfWQlCWaeVuwMpc5Z3xKs0v5mbyy31oi1HFhs5OKPOW W8qhZnY8wGHL4yoY9mKwq5F5fHJierlkrCYrzZFie+JS62MzwwzX1bbi40e0a3RiUVJg 4wag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719817357; x=1720422157; 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=G0uxixe8SRdEtYS3hYnA/51z5ZCVTziscEpNL0ARHP8=; b=lkSSwmXqf4Tyub96e3/FlawZc0vMSm8MG3Bzq99NhlIHkso1dyPEI/D0MjqlnUFCk3 sc5/SRIR97upqjjIJqHSlQ4+fe0sRE38evpbYRmcW2HdsUrjLVmOuTvqF4huzCQPLKQr L4bRdopmXUAiRuTo4FdyTpTHZWJWQNAcpJTg4paVa7QyT2+j1cxKFiydUHjxfxT5uAzK n8aQDjAbeOQOhO98g0EV5b08IU5E7hXohPP/rxMqBVBlf2CuvCYikEXJm1YgTXPtR2Di GCQSL1x1UrvVqldJk4ZVbK3NyX9fcnIMFBvnI0EsYqOSc8EggBCxWuWAo5zvudy+Gt/C A3Qw== X-Forwarded-Encrypted: i=1; AJvYcCUhAQOawt9PKnc/YVCUOSQSwcKPPntFmIGC8aYtrrnTGAiVpsLWmYXTODottjIOPvtEeVAttXWmYeb1bgt0NfTRWC7BV/MRPaAbQqai X-Gm-Message-State: AOJu0YwrvzkiHVT76pVl7gGMrQbIRdgUctsYClKlJS9ULspmsg32f08q iU1l3DI27DMIF2jnDXVfKdYha2X45hgGHiyLyfSjaX0Tg5Mqroz+sRNldjywewg= X-Google-Smtp-Source: AGHT+IFpmkqFIW4SYt5Bywcq02sj5OIw8F3oMcyUDj7GJ0VoQuAFnMl+7gJ97FBtnoFNiB+QfU/AHA== X-Received: by 2002:a05:6402:2547:b0:57d:f9f:133b with SMTP id 4fb4d7f45d1cf-5879f0c4da6mr3053720a12.2.1719817357206; Mon, 01 Jul 2024 00:02:37 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f036sm4034383a12.34.2024.07.01.00.02.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 00:02:36 -0700 (PDT) From: Linus Walleij Date: Mon, 01 Jul 2024 09:02:12 +0200 Subject: [PATCH 1/4] ASoC: tas5086: Convert to GPIO descriptors Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240701-asoc-tas-gpios-v1-1-d69ec5d79939@linaro.org> References: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@linaro.org> In-Reply-To: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@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 Switch the driver to use GPIO descriptors. Notice that we let the gpiolib handle line inversion for the active low reset line (nreset !reset). There are no upstream device trees using the tas5086 compatible string, if there were, we would need to ascertain that they all set the GPIO_ACTIVE_LOW flag on their GPIO lines. Signed-off-by: Linus Walleij --- sound/soc/codecs/tas5086.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c index 6d45df3b9ba4..4bc1fdd232bb 100644 --- a/sound/soc/codecs/tas5086.c +++ b/sound/soc/codecs/tas5086.c @@ -24,14 +24,13 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include #include #include #include @@ -246,7 +245,7 @@ struct tas5086_private { /* Current sample rate for de-emphasis control */ int rate; /* GPIO driving Reset pin, if any */ - int gpio_nreset; + struct gpio_desc *reset; struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)]; }; =20 @@ -462,11 +461,11 @@ static int tas5086_mute_stream(struct snd_soc_dai *da= i, int mute, int stream) =20 static void tas5086_reset(struct tas5086_private *priv) { - if (gpio_is_valid(priv->gpio_nreset)) { + if (priv->reset) { /* Reset codec - minimum assertion time is 400ns */ - gpio_direction_output(priv->gpio_nreset, 0); + gpiod_direction_output(priv->reset, 1); udelay(1); - gpio_set_value(priv->gpio_nreset, 1); + gpiod_set_value(priv->reset, 0); =20 /* Codec needs ~15ms to wake up */ msleep(15); @@ -867,9 +866,9 @@ static void tas5086_remove(struct snd_soc_component *co= mponent) { struct tas5086_private *priv =3D snd_soc_component_get_drvdata(component); =20 - if (gpio_is_valid(priv->gpio_nreset)) + if (priv->reset) /* Set codec to the reset state */ - gpio_set_value(priv->gpio_nreset, 0); + gpiod_set_value(priv->reset, 1); =20 regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies); }; @@ -914,7 +913,6 @@ static int tas5086_i2c_probe(struct i2c_client *i2c) { struct tas5086_private *priv; struct device *dev =3D &i2c->dev; - int gpio_nreset =3D -EINVAL; int i, ret; =20 priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); @@ -940,12 +938,11 @@ static int tas5086_i2c_probe(struct i2c_client *i2c) =20 i2c_set_clientdata(i2c, priv); =20 - gpio_nreset =3D of_get_named_gpio(dev->of_node, "reset-gpio", 0); - if (gpio_is_valid(gpio_nreset)) - if (devm_gpio_request(dev, gpio_nreset, "TAS5086 Reset")) - gpio_nreset =3D -EINVAL; - - priv->gpio_nreset =3D gpio_nreset; + /* Request line asserted */ + priv->reset =3D devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); + if (IS_ERR(priv->reset)) + return PTR_ERR(priv->reset); + gpiod_set_consumer_name(priv->reset, "TAS5086 Reset"); =20 ret =3D regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies); if (ret < 0) { --=20 2.45.2 From nobody Fri Dec 19 20:10:11 2025 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D1E271747 for ; Mon, 1 Jul 2024 07:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817363; cv=none; b=jjY2ZgTSCjAD4SXhDRPz42IGN/BYsjeeOW9w7UE7fffp370XH+fMTZ62vAlB3l8Bh/t/9uU8F9Nx+22YMcYOwrEgjqOIDSuGMIntXlT3dpskH36F4foVTzKb9LmlPho0XtwR/jCEXWX60+e8hc/WBPtzjdfH3Lj7iZc9cdT2x18= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817363; c=relaxed/simple; bh=UjmSitKNlQ2nMJN5qYvwS/7oolUMY8paivqWw2tn+Vk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CpZNhHlgLSAChlLyi/UNq1NVaJVXtiyslTYuSxIi98VNRxc9ecUltED13i2SddNmIR26WCBekcEnHyRMb6ufYZJ45hYG5MXriuEck10GoMlljPW3qttq2MKVeOgYbIPovwyfTj+tX+TSOHWWuCmxQkXG0gvRrJU42sW9MAakEAU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jTNFsjh3; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jTNFsjh3" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2ec1ac1aed2so30581061fa.3 for ; Mon, 01 Jul 2024 00:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719817359; x=1720422159; darn=vger.kernel.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=E3/s/Nj4HWsI125zUFb7bumgBHzMcSwoiGKdlWH04Ns=; b=jTNFsjh3/W4X0zWtoKN7pesWuwDGacIvTh/5AP7jvoKdMvWdRL79M0yQ02+u45e2nk nGScDprrkWV/BMEbTaUomHb1X5jOJeR1d2ulyyXkdbR3xU8jXTdxKg1FxPPYr86qh1oQ C0j07ZmVmd9eqxfvayRK9D/nNP3vdPpdBY2f06wYvDtbJHZfyn8JKqBow0dIICLUGwoO LIJSy4XwbPJLzCDMkyyZztozqaGXrtT1hF8AKZzDaHwporBvRZjPxi36BXuJSDsMiJZN J6mmLAf1niaWjugpkq3jsHUD172YOICZMX3e3Ajn8uTZ2tOpF6e5xqypJDSJSrXU7Ctz 6X/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719817359; x=1720422159; 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=E3/s/Nj4HWsI125zUFb7bumgBHzMcSwoiGKdlWH04Ns=; b=qUbZWvErkRvT6+uhiag98IPzpcLbjhfwmQkJGqa5xViOx/o27lPxj8JspquhIz34qq boad8izlRrHynd3BFuVtaCH2o9H20MM5fnWT2Dfgrua5EQwVViSr5Zdkv4Otk3fFSW+5 6+5NEbkKZMblsp4jcPVNzOu70p1aFdv17gjma651C8T4hSgn3Wl9NRny/8Z3BjWSUs59 f24tsG6ULwCYx0yuG+pfxounIktg5V2sepMCAC2E4ECyUwRuCmYlG63qfTvBL5Ar3Yp5 DaC4QR3yeTTK4silCyayarg3lAGIf+lRkABSlEMs9Vwo7ec3b4suNmajsC25Kv0fKbph jX0Q== X-Forwarded-Encrypted: i=1; AJvYcCURAK4F04TGkcWrD9Azq+dh0NUySut5B7VWhqMpIahd8tQCHzVOaMTjbS+T2UNIEOaRhnL9rD1It6d4+mG4hH2bjzq0bRClzJlVD+wI X-Gm-Message-State: AOJu0Yyeyk08f+D4M8dmVW8YJ65I6NBXvrdhy/tPidDRUx1/qxKVq11f EuNtf9+rq3iD0FtnjDkmw/jHuCB1irXsF1WF/EjvofL1F60OeGrR/S/ff2bEMBM= X-Google-Smtp-Source: AGHT+IHlLNCx+HzW4mye2WD6CgheWVhB4SQOz1Cwyrm10zDOUU5da2YKF7YBflsCQSH6asfQe2IxGA== X-Received: by 2002:a2e:300e:0:b0:2ee:5d45:b191 with SMTP id 38308e7fff4ca-2ee5e37de87mr31439981fa.8.1719817359222; Mon, 01 Jul 2024 00:02:39 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f036sm4034383a12.34.2024.07.01.00.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 00:02:37 -0700 (PDT) From: Linus Walleij Date: Mon, 01 Jul 2024 09:02:13 +0200 Subject: [PATCH 2/4] ASoC: tas2781-i2c: Drop weird GPIO code Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240701-asoc-tas-gpios-v1-2-d69ec5d79939@linaro.org> References: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@linaro.org> In-Reply-To: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@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 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 99ca3e401fd1..6f6e3e2f652c 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -80,11 +80,6 @@ struct tasdevice { bool is_loaderr; }; =20 -struct tasdevice_irqinfo { - int irq_gpio; - int irq; -}; - struct calidata { unsigned char *data; unsigned long total_sz; @@ -92,7 +87,6 @@ struct calidata { =20 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; @@ -113,6 +107,7 @@ struct tasdevice_priv { unsigned int chip_id; unsigned int sysclk; =20 + 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_i2= c.c index 75f7674c66ee..c5ace7216ecb 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -818,7 +818,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) } else return -ENODEV; =20 - tas_hda->priv->irq_info.irq =3D clt->irq; + tas_hda->priv->irq =3D clt->irq; ret =3D 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-c= omlib.c index 3aa81514dad7..0444cf90c511 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 @@ -406,8 +405,6 @@ EXPORT_SYMBOL_GPL(tasdevice_dsp_remove); =20 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-f= mwlib.c index 265a8ca25cbb..d6afab542da7 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 9350972dfefe..1542915b83a2 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -605,7 +604,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *t= as_priv) { struct i2c_client *client =3D (struct i2c_client *)tas_priv->client; unsigned int dev_addrs[TASDEVICE_MAX_CHANNELS]; - int rc, i, ndev =3D 0; + int i, ndev =3D 0; =20 if (tas_priv->isacpi) { ndev =3D device_property_read_u32_array(&client->dev, @@ -620,7 +619,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *t= as_priv) "ti,audio-slots", dev_addrs, ndev); } =20 - tas_priv->irq_info.irq_gpio =3D + tas_priv->irq =3D acpi_dev_gpio_irq_get(ACPI_COMPANION(&client->dev), 0); } else { struct device_node *np =3D tas_priv->dev->of_node; @@ -648,7 +647,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *t= as_priv) ndev =3D 1; dev_addrs[0] =3D client->addr; #endif - tas_priv->irq_info.irq_gpio =3D of_irq_get(np, 0); + tas_priv->irq =3D of_irq_get(np, 0); } tas_priv->ndev =3D ndev; for (i =3D 0; i < ndev; i++) @@ -661,23 +660,6 @@ static void tasdevice_parse_dt(struct tasdevice_priv *= tas_priv) __func__); =20 strcpy(tas_priv->dev_name, tasdevice_id[tas_priv->chip_id].name); - - if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) { - rc =3D 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 =3D - 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); } =20 static int tasdevice_i2c_probe(struct i2c_client *i2c) --=20 2.45.2 From nobody Fri Dec 19 20:10:11 2025 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1847139855 for ; Mon, 1 Jul 2024 07:02:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817365; cv=none; b=lHslOXXqJ0fjjX2/rctqDNvpxJKfJ18/F3lS/iqvxTU3NzvlyznsvmXY1genPyzgU/UmlwbKUZEE1eRG64drmd2CC75SmSTFZLP+YL92TsMFzz0znYtSrA5btmHvfnuh3lyALgYxkCzbmsiBSLTQ6zD9GQgMSV5hLFvbT2Q4Apk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817365; c=relaxed/simple; bh=pcOvFSy9mqnG9tdnejsIswIHJuVcxQ0Q95HAQWqfY2Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s9IywrrcAWcNyYJeFcNb3KR1Hsbe9FMobXiM3fI2Gqg0jTiGaISoLdRM0NV1QoW3V+3FfWN7XWuLK79E5h0S2/O0Q7Yq/K5/dnbCuV/zhp/IsTNxigNaNwZiqyc7S1r0uMLcqXMtRYGPHc3kACIHvqZpQ/za5ju0rJAACR8GIhI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oSA4RBaT; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oSA4RBaT" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2ebe785b234so25790971fa.1 for ; Mon, 01 Jul 2024 00:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719817361; x=1720422161; darn=vger.kernel.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=pWt7xul9gaEWvRdXPJZ452zrHt44xP6eq1TOlG30kGE=; b=oSA4RBaTJCLVkTNLkMcohSiSe9qnXixHSiIAQlAgPpi0C/yxy2sLFIvKiukccxoEy3 PFFCDnUo5MbW+mdqoPPBSUlu6+8AQFI9DhQzCZLfbGcGoUa7O2X24RBFZrzDWb18J2tV yPmYmAnjYDplRK1NEXrDAOPqBrcF8CxkvQBHXeaXFtO3pyVAZV+qHU8hybUf00UDPCjf ZqJndefvhluHRLd2FLnCrTiXFqdMi1Sn297sv7QOcYzyDWKF1OY5VPdYNunVBnpJsPv4 STg+BFnKD5VYUVd9bxj3VpSsZwjCGJ1ZSR3CSekIwJOUZIIoSlcm4GhF1UaVyliFGoJW D5Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719817361; x=1720422161; 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=pWt7xul9gaEWvRdXPJZ452zrHt44xP6eq1TOlG30kGE=; b=QpBlhx9BzpQPTyeFSkIuMNihZu0srC1Zr1OsWPuHoQPcpPhyhCmZDgRILe6ClDEQ0r 8DBOoBFfyegvHDaCmcKGPuqUrD67mo6KWEC9wTCa3I/UeUbJQTwMuYctsO0sNE9GlqkJ tCevM5rO2po2fqp0QfkVJu+nU/7rVUoR7puk3IvbOJ6TCm26xe+yxaB4ZWgRr9hKpa47 knmNjlGvTjmYJedBh9h+gUYXxEbkikMP4KcN4Po+B7pC5SqeRuVv5QBBStaBvMogZgGT fHrD3//O6bZUUs9V0WkyfH9gswbkBqWgp1ZC1C4vik1q4tH8LBiu/PiLAn1gMyc9Ys1/ GQzg== X-Forwarded-Encrypted: i=1; AJvYcCUMCHHt/JI3v7mTUr0z1Vdzb/FmsIS/6I9XdkphbNJsJS+84ELKa+qU+Jg/0Px2WwpisP/v/vZ4Cgsj/LQt8vigzbgrG64Eh11CovRo X-Gm-Message-State: AOJu0Yw51Xcc9o7+Kpo+q0KKm6uRybai1dQ4xqfLdweTQTDpsl1Whbcn zA3QmQATVs2LvLh2vzfFUtlpAgJUkxEPpmaMkKmr7hSCf0nPyylJY8qEBVjg5JE= X-Google-Smtp-Source: AGHT+IGPE6k3N5wdR11ZQ2KZFoj1Q7gGsWsY0UPRVz0U0AfRSYWIhLPL3AI9jKB/vygyWqnZmYfNvQ== X-Received: by 2002:a2e:a801:0:b0:2ee:4c2e:3d3b with SMTP id 38308e7fff4ca-2ee5e390286mr44525361fa.4.1719817361254; Mon, 01 Jul 2024 00:02:41 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f036sm4034383a12.34.2024.07.01.00.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 00:02:39 -0700 (PDT) From: Linus Walleij Date: Mon, 01 Jul 2024 09:02:14 +0200 Subject: [PATCH 3/4] ASoC: tas2781-i2c: Get the right GPIO line Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240701-asoc-tas-gpios-v1-3-d69ec5d79939@linaro.org> References: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@linaro.org> In-Reply-To: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@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 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 1542915b83a2..256f2e8f1ba9 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -654,7 +654,7 @@ static void tasdevice_parse_dt(struct tasdevice_priv *t= as_priv) tas_priv->tasdevice[i].dev_addr =3D dev_addrs[i]; =20 tas_priv->reset =3D 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__); --=20 2.45.2 From nobody Fri Dec 19 20:10:11 2025 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A17F5103F for ; Mon, 1 Jul 2024 07:02:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817366; cv=none; b=utGENfd2Ch5hIH7JrMx4jhZcPTDKP6RXeTWj4Bpb4vknOsxbtV0crq+4MnDv10gsz7MiA0EvhUiYLry9AxcE3pHg+C5MBXnnoBLWXF1LylIy2Ktc8YMv6fzJNpjlaGAZwiD5g6m1Tn8ZArvmMNVIOhqT7SXmTuO5bKB6+4b+hLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719817366; c=relaxed/simple; bh=aJ1LZosClX5NnP0cJXhnk/NVUavVqkeU0v2SDbbuCfI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ltyL0FRBrSIVCNKZL73TFhf8JGFlh+1XUu3FG9J5jBJrG+34k4cdDWQuRRCmuhotlPKXBYzgwsPoixA4SZEMbkmNoivyrbaMu217D9cXk83izZzF9d06ng2oQi7jVB4Jv9On+2NqvcWSXoVtPVvSHgB3WZdKr2+r2XESNyKmT70= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tJGwj9c/; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tJGwj9c/" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-57d10354955so3136501a12.1 for ; Mon, 01 Jul 2024 00:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719817363; x=1720422163; darn=vger.kernel.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=GMJ9ytIbd8fpZ+zpiTVxchehIRD6mB7COwsKFHn30yI=; b=tJGwj9c/tqICWraCp9z0ytaRnu5yRSRO2tZA4+tV2bv6v47mm3jY3Rr+LFy1gr7Sxq kvCgySZSfVNadga8gX8ALZLHA1A9YJ5A+YpOkRkE25vICgjVMugcsLRjEv9Y/Oa3fm08 gJkErZq+n0M1wpZOJxelR/jmabSt3ZPCVf9yrfYmMVdCmpdbF0ObayUT87M0rtVtMa2b R4lJh2/HMY4Pn4klHSCJRPgq1ReUb0dV5GLtRix04fNxutYJLPLXaMa+bv4xnbsW/ri2 tvAfl4C5gxGsDZZm2aXfHhHOlP9uW/sQiBAlybDBoT877lyszein7KsqL/58ePEqyjUk l6UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719817363; x=1720422163; 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=GMJ9ytIbd8fpZ+zpiTVxchehIRD6mB7COwsKFHn30yI=; b=bBiyaKQGXWwFfnG0ldDCReeuU7Pm370w5I328Syudg2ET4dPJiZOSU1w+CMdHVFwEp d6R8LPhLwys1FreDYeT7cHCwgXMGB7TfLbqXp2La5jOuC4BVSnMuKXFLRw+wdkHrN4k4 eUyVMq5Qttlfn8jIoxHVAFjdzauGwSOFJMuFjLOCQIEe9VTzfF121O/5VMoA2PyOgrzh Kd0Xun4PAGPUcLD1upzSFcByU2NCteu7DvABjkUE7s5LlS8BHy1oU7LlifP+7Le6QQil 0wstS8H9afVQIIteCg5th03wa7b941i4bPYiME12SbBBcXDGrbxe8wSxh2bhH0W1R0gy f48w== X-Forwarded-Encrypted: i=1; AJvYcCWkzgRiirRBih0fAMiyiq77V2wXrCY4Kax+QiRCt/JalhQEl8RbvmfHI8Xf5nMt68Q+yRow6zE+az7EJkZlxY4zyVJf9OGF2QihdVNX X-Gm-Message-State: AOJu0YwXu3pyuqHIQ4TvbALUyDOMpYrOJpziIG9sT/oUBR7G7XXIliEE tuYc4b5zJDetHvli2U5ryU7nLs7ce9Z52fy/E5GAbRBTVCfaduL7krDuWZJRYKs= X-Google-Smtp-Source: AGHT+IHR5yOOsqPZFJrRu7Wk8J8cXhauusw1meNRgDWk7XLLZNs2DncjjI+qUlPMsRkkGHRfGt2GEw== X-Received: by 2002:a05:6402:5cd:b0:57c:c10c:eee8 with SMTP id 4fb4d7f45d1cf-5879fa7f71emr2584654a12.19.1719817362830; Mon, 01 Jul 2024 00:02:42 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5861324f036sm4034383a12.34.2024.07.01.00.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jul 2024 00:02:42 -0700 (PDT) From: Linus Walleij Date: Mon, 01 Jul 2024 09:02:15 +0200 Subject: [PATCH 4/4] ASoC: tas*: Drop unused GPIO includes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240701-asoc-tas-gpios-v1-4-d69ec5d79939@linaro.org> References: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@linaro.org> In-Reply-To: <20240701-asoc-tas-gpios-v1-0-d69ec5d79939@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 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 | 2 -- sound/soc/codecs/tas2764.c | 2 -- sound/soc/codecs/tas2770.c | 2 -- sound/soc/codecs/tas2780.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index a7ed59ec49a6..684d52ec6600 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -12,8 +12,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c index 1dc719d726ab..d482cd194c08 100644 --- a/sound/soc/codecs/tas2764.c +++ b/sound/soc/codecs/tas2764.c @@ -10,12 +10,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c index 67bc1c8b0131..9f93b230652a 100644 --- a/sound/soc/codecs/tas2770.c +++ b/sound/soc/codecs/tas2770.c @@ -14,13 +14,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/sound/soc/codecs/tas2780.c b/sound/soc/codecs/tas2780.c index a18ccf5fb7ad..a1963415c931 100644 --- a/sound/soc/codecs/tas2780.c +++ b/sound/soc/codecs/tas2780.c @@ -7,11 +7,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include --=20 2.45.2