mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
ASoC: cs35l56: Don't rely on GPIOD_OUT_LOW to set RESET initially low
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@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230808164702.21272-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ebd0f7b08e
commit
853734588d
@ -1069,6 +1069,8 @@ int cs35l56_common_probe(struct cs35l56_private *cs35l56)
|
||||
return dev_err_probe(cs35l56->base.dev, ret, "Failed to enable supplies\n");
|
||||
|
||||
if (cs35l56->base.reset_gpio) {
|
||||
/* ACPI can override GPIOD_OUT_LOW flag so force it to start low */
|
||||
gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 0);
|
||||
cs35l56_wait_min_reset_pulse();
|
||||
gpiod_set_value_cansleep(cs35l56->base.reset_gpio, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user