]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: ak4458: remove "reset-gpios" property handler
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 3 Jul 2024 12:26:15 +0000 (20:26 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 4 Jul 2024 11:42:23 +0000 (12:42 +0100)
commit c721f189e89c0 ("reset: Instantiate reset GPIO controller for
shared reset-gpios") check if there is no "resets" property
will fallback to "reset-gpios".

So don't need to handle "reset-gpios" separately in the driver,
the "reset-gpios" handler is duplicated with "resets" control handler,
remove it.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1720009575-11677-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ak4458.c

index 32cb802ad6357762d6f0798ad16fa0294b5bfe38..d472d9952628795531ea59984893fb457a0bd9a1 100644 (file)
@@ -45,7 +45,6 @@ struct ak4458_priv {
        const struct ak4458_drvdata *drvdata;
        struct device *dev;
        struct regmap *regmap;
-       struct gpio_desc *reset_gpiod;
        struct reset_control *reset;
        struct gpio_desc *mute_gpiod;
        int digfil;     /* SSLOW, SD, SLOW bits */
@@ -631,10 +630,7 @@ static struct snd_soc_dai_driver ak4497_dai = {
 
 static void ak4458_reset(struct ak4458_priv *ak4458, bool active)
 {
-       if (ak4458->reset_gpiod) {
-               gpiod_set_value_cansleep(ak4458->reset_gpiod, active);
-               usleep_range(1000, 2000);
-       } else if (!IS_ERR_OR_NULL(ak4458->reset)) {
+       if (!IS_ERR_OR_NULL(ak4458->reset)) {
                if (active)
                        reset_control_assert(ak4458->reset);
                else
@@ -758,11 +754,6 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
        if (IS_ERR(ak4458->reset))
                return PTR_ERR(ak4458->reset);
 
-       ak4458->reset_gpiod = devm_gpiod_get_optional(ak4458->dev, "reset",
-                                                     GPIOD_OUT_LOW);
-       if (IS_ERR(ak4458->reset_gpiod))
-               return PTR_ERR(ak4458->reset_gpiod);
-
        ak4458->mute_gpiod = devm_gpiod_get_optional(ak4458->dev, "mute",
                                                     GPIOD_OUT_LOW);
        if (IS_ERR(ak4458->mute_gpiod))