All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Paul Handrigan <Paul.Handrigan@cirrus.com>,
	 James Schulman <james.schulman@cirrus.com>,
	 David Rhodes <david.rhodes@cirrus.com>,
	 Richard Fitzgerald <rf@opensource.cirrus.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 Hartley Sweeten <hsweeten@visionengravers.com>,
	 Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	 Nikita Shubin <nikita.shubin@maquefel.me>
Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	 linux-sound@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 Linus Walleij <linus.walleij@linaro.org>,
	 Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: [PATCH v2 03/10] ASoC: cs35l34: Fix GPIO name and drop legacy include
Date: Fri, 01 Dec 2023 14:20:32 +0100	[thread overview]
Message-ID: <20231201-descriptors-sound-cirrus-v2-3-ee9f9d4655eb@linaro.org> (raw)
In-Reply-To: <20231201-descriptors-sound-cirrus-v2-0-ee9f9d4655eb@linaro.org>

This driver includes the legacy GPIO APIs <linux/gpio.h> and
<linux/of_gpio.h> but does not use any symbols from any of
them.

Drop the includes.

Further the driver is requesting "reset-gpios" rather than
just "reset" from the GPIO framework. This is wrong because
the gpiolib core will add "-gpios" before processing the
request from e.g. device tree. Drop the suffix.

The last problem means that the optional RESET GPIO has
never been properly retrieved and used even if it existed,
but nobody noticed.

Fixes: c1124c09e103 ("ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.")
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 sound/soc/codecs/cs35l34.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index e5871736fa29..cca59de66b73 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -20,14 +20,12 @@
 #include <linux/regulator/machine.h>
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <sound/initval.h>
 #include <sound/tlv.h>
@@ -1061,7 +1059,7 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client)
 		dev_err(&i2c_client->dev, "Failed to request IRQ: %d\n", ret);
 
 	cs35l34->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev,
-				"reset-gpios", GPIOD_OUT_LOW);
+				"reset", GPIOD_OUT_LOW);
 	if (IS_ERR(cs35l34->reset_gpio)) {
 		ret = PTR_ERR(cs35l34->reset_gpio);
 		goto err_regulator;

-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org>
To: Paul Handrigan <Paul.Handrigan@cirrus.com>,
	 James Schulman <james.schulman@cirrus.com>,
	 David Rhodes <david.rhodes@cirrus.com>,
	 Richard Fitzgerald <rf@opensource.cirrus.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 Hartley Sweeten <hsweeten@visionengravers.com>,
	 Alexander Sverdlin <alexander.sverdlin@gmail.com>,
	 Nikita Shubin <nikita.shubin@maquefel.me>
Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com,
	 linux-sound@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 Linus Walleij <linus.walleij@linaro.org>,
	 Charles Keepax <ckeepax@opensource.cirrus.com>
Subject: [PATCH v2 03/10] ASoC: cs35l34: Fix GPIO name and drop legacy include
Date: Fri, 01 Dec 2023 14:20:32 +0100	[thread overview]
Message-ID: <20231201-descriptors-sound-cirrus-v2-3-ee9f9d4655eb@linaro.org> (raw)
In-Reply-To: <20231201-descriptors-sound-cirrus-v2-0-ee9f9d4655eb@linaro.org>

This driver includes the legacy GPIO APIs <linux/gpio.h> and
<linux/of_gpio.h> but does not use any symbols from any of
them.

Drop the includes.

Further the driver is requesting "reset-gpios" rather than
just "reset" from the GPIO framework. This is wrong because
the gpiolib core will add "-gpios" before processing the
request from e.g. device tree. Drop the suffix.

The last problem means that the optional RESET GPIO has
never been properly retrieved and used even if it existed,
but nobody noticed.

Fixes: c1124c09e103 ("ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.")
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 sound/soc/codecs/cs35l34.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index e5871736fa29..cca59de66b73 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -20,14 +20,12 @@
 #include <linux/regulator/machine.h>
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_irq.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <sound/initval.h>
 #include <sound/tlv.h>
@@ -1061,7 +1059,7 @@ static int cs35l34_i2c_probe(struct i2c_client *i2c_client)
 		dev_err(&i2c_client->dev, "Failed to request IRQ: %d\n", ret);
 
 	cs35l34->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev,
-				"reset-gpios", GPIOD_OUT_LOW);
+				"reset", GPIOD_OUT_LOW);
 	if (IS_ERR(cs35l34->reset_gpio)) {
 		ret = PTR_ERR(cs35l34->reset_gpio);
 		goto err_regulator;

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-12-01 13:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 13:20 [PATCH v2 00/10] ASoC: Convert Cirrus codecs to GPIO descriptors Linus Walleij
2023-12-01 13:20 ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 01/10] ASoC: cs35l32: Drop legacy include Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 02/10] ASoC: cs35l33: Fix GPIO name and drop " Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` Linus Walleij [this message]
2023-12-01 13:20   ` [PATCH v2 03/10] ASoC: cs35l34: " Linus Walleij
2023-12-01 13:20 ` [PATCH v2 04/10] ASoC: cs35l35: Drop legacy includes Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 05/10] ASoC: cs35l36: " Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 06/10] ASoC: cs4271: Convert to GPIO descriptors Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 07/10] ASoC: cirrus: edb93xx: Drop legacy include Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 08/10] ASoC: cs42l42: " Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 09/10] ASoC: cs43130: Drop legacy includes Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-01 13:20 ` [PATCH v2 10/10] ASoC: cs4349: Drop legacy include Linus Walleij
2023-12-01 13:20   ` Linus Walleij
2023-12-04 12:33 ` [PATCH v2 00/10] ASoC: Convert Cirrus codecs to GPIO descriptors Mark Brown
2023-12-04 12:33   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231201-descriptors-sound-cirrus-v2-3-ee9f9d4655eb@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=alexander.sverdlin@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=david.rhodes@cirrus.com \
    --cc=hsweeten@visionengravers.com \
    --cc=james.schulman@cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=nikita.shubin@maquefel.me \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.