Patch "ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove" has been added to the 4.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-sgtl5000-reset-the-chip_clk_ctrl-reg-on-remove.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9f00dc72a542143fcdb5a705d2bcdf53fd655dee
Author: Detlev Casanova <detlev.casanova@xxxxxxxxxxxxx>
Date:   Thu Nov 10 14:06:12 2022 -0500

    ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove
    
    [ Upstream commit 0bb8e9b36b5b7f2e77892981ff6c27ee831d8026 ]
    
    Since commit bf2aebccddef ("ASoC: sgtl5000: Fix noise on shutdown/remove"),
    the device power control registers are reset when the driver is
    removed/shutdown.
    
    This is an issue when the device is configured to use the PLL clock. The
    device will stop responding if it is still configured to use the PLL
    clock but the PLL clock is powered down.
    
    When rebooting linux, the probe function will show:
    sgtl5000 0-000a: Error reading chip id -11
    
    Make sure that the CHIP_CLK_CTRL is reset to its default value before
    powering down the device.
    
    Fixes: bf2aebccddef ("ASoC: sgtl5000: Fix noise on shutdown/remove")
    Signed-off-by: Detlev Casanova <detlev.casanova@xxxxxxxxxxxxx>
    Reviewed-by: Fabio Estevam <festevam@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221110190612.1341469-1-detlev.casanova@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 13e752f8b3f7..0708b5019910 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1769,6 +1769,7 @@ static int sgtl5000_i2c_remove(struct i2c_client *client)
 {
 	struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
 
+	regmap_write(sgtl5000->regmap, SGTL5000_CHIP_CLK_CTRL, SGTL5000_CHIP_CLK_CTRL_DEFAULT);
 	regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT);
 	regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux