]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ASoC: ak5558: correct reset polarity
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 14 Apr 2021 06:33:43 +0000 (14:33 +0800)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:39 +0000 (17:46 -0600)
BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit 0b93bbc977af55fd10687f2c96c807cba95cb927 ]

Reset (aka power off) happens when the reset gpio is made active.
The reset gpio is GPIO_ACTIVE_LOW

Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1618382024-31725-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
sound/soc/codecs/ak5558.c

index 85bdd0534180353565efb96070134d99da9664dd..80b3b162ca5ba0ae536df404d4bc7a05640e3c8f 100644 (file)
@@ -272,7 +272,7 @@ static void ak5558_power_off(struct ak5558_priv *ak5558)
        if (!ak5558->reset_gpiod)
                return;
 
-       gpiod_set_value_cansleep(ak5558->reset_gpiod, 0);
+       gpiod_set_value_cansleep(ak5558->reset_gpiod, 1);
        usleep_range(1000, 2000);
 }
 
@@ -281,7 +281,7 @@ static void ak5558_power_on(struct ak5558_priv *ak5558)
        if (!ak5558->reset_gpiod)
                return;
 
-       gpiod_set_value_cansleep(ak5558->reset_gpiod, 1);
+       gpiod_set_value_cansleep(ak5558->reset_gpiod, 0);
        usleep_range(1000, 2000);
 }