summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2024-10-14 11:52:02 +0200
committerLee Jones <lee@kernel.org>2024-10-31 17:17:09 +0100
commit2bb0106db90f86c3c513c26bb42ef0798ae8164d (patch)
tree40ac489a9e58d306532b37f3a97c48dfc477320d /sound/soc
parentregulator: axp20x: add support for the AXP323 (diff)
downloadlinux-2bb0106db90f86c3c513c26bb42ef0798ae8164d.tar.xz
linux-2bb0106db90f86c3c513c26bb42ef0798ae8164d.zip
mfd: cs42l43: Disable IRQs during suspend
The ASoC CODEC driver masks the IRQs whilst entering and exiting system suspend to avoid issues where the IRQ handler can run but PM runtime is disabled. However, as the IRQs could also be used from other parts of the driver, it would be better to move this handling to the MFD level. Remove the handling from the ASoC driver and move it to the MFD driver. Whilst moving also ensure the IRQs are all masked at the device level before powering down the device, as per hardware recommendations. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Mark Brown <broonie@kernel.org.> Link: https://lore.kernel.org/r/20241014095202.828194-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/cs42l43.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/sound/soc/codecs/cs42l43.c b/sound/soc/codecs/cs42l43.c
index d0098b4558b5..3ede0e3110f3 100644
--- a/sound/soc/codecs/cs42l43.c
+++ b/sound/soc/codecs/cs42l43.c
@@ -2402,49 +2402,7 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
return 0;
}
-static int cs42l43_codec_suspend(struct device *dev)
-{
- struct cs42l43_codec *priv = dev_get_drvdata(dev);
- struct cs42l43 *cs42l43 = priv->core;
-
- disable_irq(cs42l43->irq);
-
- return 0;
-}
-
-static int cs42l43_codec_suspend_noirq(struct device *dev)
-{
- struct cs42l43_codec *priv = dev_get_drvdata(dev);
- struct cs42l43 *cs42l43 = priv->core;
-
- enable_irq(cs42l43->irq);
-
- return 0;
-}
-
-static int cs42l43_codec_resume(struct device *dev)
-{
- struct cs42l43_codec *priv = dev_get_drvdata(dev);
- struct cs42l43 *cs42l43 = priv->core;
-
- enable_irq(cs42l43->irq);
-
- return 0;
-}
-
-static int cs42l43_codec_resume_noirq(struct device *dev)
-{
- struct cs42l43_codec *priv = dev_get_drvdata(dev);
- struct cs42l43 *cs42l43 = priv->core;
-
- disable_irq(cs42l43->irq);
-
- return 0;
-}
-
static const struct dev_pm_ops cs42l43_codec_pm_ops = {
- SYSTEM_SLEEP_PM_OPS(cs42l43_codec_suspend, cs42l43_codec_resume)
- NOIRQ_SYSTEM_SLEEP_PM_OPS(cs42l43_codec_suspend_noirq, cs42l43_codec_resume_noirq)
RUNTIME_PM_OPS(NULL, cs42l43_codec_runtime_resume, NULL)
};