Patch "ASoC: cs42l42: Don't rely on GPIOD_OUT_LOW to set RESET initially low" has been added to the 6.5-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: cs42l42: Don't rely on GPIOD_OUT_LOW to set RESET initially low

to the 6.5-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-cs42l42-don-t-rely-on-gpiod_out_low-to-set-rese.patch
and it can be found in the queue-6.5 subdirectory.

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



commit d28f20adc5b573763f25d8ece90a3dcbabc07d91
Author: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
Date:   Wed Sep 13 16:00:11 2023 +0100

    ASoC: cs42l42: Don't rely on GPIOD_OUT_LOW to set RESET initially low
    
    [ Upstream commit a479b44ac0a0ac25cd48e5356200078924d78022 ]
    
    The ACPI setting for a GPIO default state has higher priority than the
    flag passed to devm_gpiod_get_optional() so ACPI can override the
    GPIOD_OUT_LOW. Explicitly set the GPIO low when hard resetting.
    
    Although GPIOD_OUT_LOW can't be relied on this doesn't seem like a
    reason to stop passing it to devm_gpiod_get_optional(). So we still pass
    it to state our intent, but can deal with it having no effect.
    
    Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Stefan Binding <sbinding@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230913150012.604775-3-sbinding@xxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 56d2857a4f01c..dc93861ddfb02 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -2321,6 +2321,12 @@ int cs42l42_common_probe(struct cs42l42_private *cs42l42,
 	if (cs42l42->reset_gpio) {
 		dev_dbg(cs42l42->dev, "Found reset GPIO\n");
 
+		/*
+		 * ACPI can override the default GPIO state we requested
+		 * so ensure that we start with RESET low.
+		 */
+		gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
+
 		/* Ensure minimum reset pulse width */
 		usleep_range(10, 500);
 



[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