diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2023-11-21 15:44:19 +0000 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-11-22 14:39:42 +0100 |
commit | 732c678eb021dbc514a699be1815e194692fdd5c (patch) | |
tree | 36c9a07e0c3f4b1b08ecebf3013397dfe92296c9 /sound/pci | |
parent | d04ce4113cb4e5c2deddcb161db42a25917f285f (diff) | |
download | linux-732c678eb021dbc514a699be1815e194692fdd5c.tar.gz linux-732c678eb021dbc514a699be1815e194692fdd5c.tar.bz2 linux-732c678eb021dbc514a699be1815e194692fdd5c.zip |
ALSA: hda: cs35l56: Enable low-power hibernation mode on SPI
SPI hibernation is now supported with the latest hibernation/wake
sequences in the shared ASoC code.
This has a functional dependency on two commits:
commit 3df761bdbc8b ("ASoC: cs35l56: Wake transactions need to be issued
twice")
commit a47cf4dac7dc ("ASoC: cs35l56: Change hibernate sequence to use
allow auto hibernate")
To protect against this, enabling hibernation is conditional on
CS35L56_WAKE_HOLD_TIME_US being defined, which indicates that the new
hibernation sequences are available.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231121154419.19435-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/cs35l56_hda_spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/cs35l56_hda_spi.c b/sound/pci/hda/cs35l56_hda_spi.c index 756aec342eab..27d7fbc56b4c 100644 --- a/sound/pci/hda/cs35l56_hda_spi.c +++ b/sound/pci/hda/cs35l56_hda_spi.c @@ -21,6 +21,10 @@ static int cs35l56_hda_spi_probe(struct spi_device *spi) return -ENOMEM; cs35l56->base.dev = &spi->dev; + +#ifdef CS35L56_WAKE_HOLD_TIME_US + cs35l56->base.can_hibernate = true; +#endif cs35l56->base.regmap = devm_regmap_init_spi(spi, &cs35l56_regmap_spi); if (IS_ERR(cs35l56->base.regmap)) { ret = PTR_ERR(cs35l56->base.regmap); |