public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] ALSA: hda: cs35l56: Enable low-power hibernation mode on i2c
@ 2023-11-13 16:40 Richard Fitzgerald
  2023-11-14 13:10 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2023-11-13 16:40 UTC (permalink / raw)
  To: tiwai
  Cc: alsa-devel, linux-sound, linux-kernel, patches, Simon Trimmer,
	Richard Fitzgerald

From: Simon Trimmer <simont@opensource.cirrus.com>

This can now be re-enabled as the sequence to reliably wake the device
has been implemented in the shared ASoC code.

This has a functional dependency on commit 3df761bdbc8b
("ASoC: cs35l56: Wake transactions need to be issued twice")

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: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/pci/hda/cs35l56_hda_i2c.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sound/pci/hda/cs35l56_hda_i2c.c b/sound/pci/hda/cs35l56_hda_i2c.c
index 757a4d193e0f..a9ef6d86de83 100644
--- a/sound/pci/hda/cs35l56_hda_i2c.c
+++ b/sound/pci/hda/cs35l56_hda_i2c.c
@@ -21,6 +21,10 @@ static int cs35l56_hda_i2c_probe(struct i2c_client *clt)
 		return -ENOMEM;
 
 	cs35l56->base.dev = &clt->dev;
+
+#ifdef CS35L56_WAKE_HOLD_TIME_US
+	cs35l56->base.can_hibernate = true;
+#endif
 	cs35l56->base.regmap = devm_regmap_init_i2c(clt, &cs35l56_regmap_i2c);
 	if (IS_ERR(cs35l56->base.regmap)) {
 		ret = PTR_ERR(cs35l56->base.regmap);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RESEND] ALSA: hda: cs35l56: Enable low-power hibernation mode on i2c
  2023-11-13 16:40 [PATCH RESEND] ALSA: hda: cs35l56: Enable low-power hibernation mode on i2c Richard Fitzgerald
@ 2023-11-14 13:10 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2023-11-14 13:10 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: tiwai, alsa-devel, linux-sound, linux-kernel, patches,
	Simon Trimmer

On Mon, 13 Nov 2023 17:40:29 +0100,
Richard Fitzgerald wrote:
> 
> From: Simon Trimmer <simont@opensource.cirrus.com>
> 
> This can now be re-enabled as the sequence to reliably wake the device
> has been implemented in the shared ASoC code.
> 
> This has a functional dependency on commit 3df761bdbc8b
> ("ASoC: cs35l56: Wake transactions need to be issued twice")
> 
> 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: Simon Trimmer <simont@opensource.cirrus.com>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-14 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 16:40 [PATCH RESEND] ALSA: hda: cs35l56: Enable low-power hibernation mode on i2c Richard Fitzgerald
2023-11-14 13:10 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox