Commit fff393db authored by Stefan Binding's avatar Stefan Binding Committed by Takashi Iwai

ALSA: hda: cs35l41: Assert Reset prior to de-asserting in probe and system resume

To ensure we are in a known state, exiting from reset at the point of
probe or in system resume, assert reset before we de-assert it.

Since the BIOS may enter into a pre-boot environment to control the
amps (for example for boot beep), we need to ensure we start from a
known, reset state prior to probe or system resume.
Signed-off-by: default avatarStefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231026150558.2105827-4-sbinding@opensource.cirrus.comSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a7423e90
......@@ -840,6 +840,7 @@ static int cs35l41_system_resume(struct device *dev)
}
if (cs35l41->reset_gpio) {
gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
usleep_range(2000, 2100);
gpiod_set_value_cansleep(cs35l41->reset_gpio, 1);
}
......@@ -1693,6 +1694,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
}
}
if (cs35l41->reset_gpio) {
gpiod_set_value_cansleep(cs35l41->reset_gpio, 0);
usleep_range(2000, 2100);
gpiod_set_value_cansleep(cs35l41->reset_gpio, 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment