From patchwork Fri Oct 6 11:10:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 730008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C145BE936FB for ; Fri, 6 Oct 2023 11:12:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 11B64F0; Fri, 6 Oct 2023 13:11:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 11B64F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696590748; bh=+okZeCy4YEMvfRqP0z4i0l5cjxr9KbrkVDAGvXbHtRw=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=mQqZQHhXGndVGeeJcojwlKuspzdM7OtHslYyarfuAJ7YpG65rLM9KrjA0i6aB56WD zG3xbTnq3x+fbaZimbZL/1RrMlUQIFUQ9ThL/4PmW0iVoaJNKnK0XwwA5/kcSBVvuC q2/Amf1bPqHHk83X+6u8mju0SgA69K8dMfUXf5t0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B0001F80552; Fri, 6 Oct 2023 13:11:01 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EDA32F8047D; Fri, 6 Oct 2023 13:11:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 810DEF80553; Fri, 6 Oct 2023 13:10:55 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 880F8F80166 for ; Fri, 6 Oct 2023 13:10:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 880F8F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=DpTv58/r Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 396An4mD006823; Fri, 6 Oct 2023 06:10:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=0zBqGPEQTQ7H/6c/RrnU9opyRaEYN9jVzR4spOSXdYI=; b= DpTv58/rHiV2u/LVDUIFqqlkCsb/+hcY0tyZznH4kN3eEALncTzco2Tg8GHr4WKL RXDycWbUaNA4d35Mz8xofJ4CZDVOMEO1eRRfCgENbBASFK8zgU9LgeQaYaZV2lXj aTKKhxkPgjB5GU3EnvXIlOFa3/FneiD8IKOBKy20fGDHjFDLSGG6kg3/Kb4kraV5 ryMk381rqeipdr6DUMhfe/eXG7EtrFBfVQDSvmw0sa1sS/lMqLfM/Ic4iZn1XmtP EIVl5LoA0Hj0l1h4BG7H4jLnj9BHdXKuvBWjL3K9MxcE5OniFHFTtzOy5MbLf1iE +fUVEWrkW/WqM0gA8Cve2g== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3teg3k812p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 06:10:44 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Fri, 6 Oct 2023 12:10:42 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Fri, 6 Oct 2023 12:10:42 +0100 Received: from work-debian.ad.cirrus.com (unknown [198.61.64.45]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4B69A15B9; Fri, 6 Oct 2023 11:10:42 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH 1/4] ASoC: cs35l56: Change hibernate sequence to use allow auto hibernate Date: Fri, 6 Oct 2023 12:10:36 +0100 Message-ID: <20231006111039.101914-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006111039.101914-1-rf@opensource.cirrus.com> References: <20231006111039.101914-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: vuHgu9vlpzucuUgr3uO0ndyVgfLXYYqA X-Proofpoint-ORIG-GUID: vuHgu9vlpzucuUgr3uO0ndyVgfLXYYqA X-Proofpoint-Spam-Reason: safe Message-ID-Hash: TWYJWR4HTGQWGZKHF6ENIM5K6HGSRO47 X-Message-ID-Hash: TWYJWR4HTGQWGZKHF6ENIM5K6HGSRO47 X-MailFrom: prvs=5643372036=rf@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Trimmer If the hardware uses SPI_MOSI, I2C_SCL or I2C_SDA as the wake source the bus activity of sending HIBERNATE_NOW will wake up the amps that were already put into hibernate. ALLOW_AUTO_HIBERNATE tells the firmware to hibernate itself after a timeout of a few seconds, giving the driver instances time to send this before any amps have gone into hibernate. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56-shared.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c index 01b6fa97b36b..68dc93b82789 100644 --- a/sound/soc/codecs/cs35l56-shared.c +++ b/sound/soc/codecs/cs35l56-shared.c @@ -439,7 +439,7 @@ EXPORT_SYMBOL_NS_GPL(cs35l56_is_fw_reload_needed, SND_SOC_CS35L56_SHARED); static const struct reg_sequence cs35l56_hibernate_seq[] = { /* This must be the last register access */ - REG_SEQ0(CS35L56_DSP_VIRTUAL1_MBOX_1, CS35L56_MBOX_CMD_HIBERNATE_NOW), + REG_SEQ0(CS35L56_DSP_VIRTUAL1_MBOX_1, CS35L56_MBOX_CMD_ALLOW_AUTO_HIBERNATE), }; static const struct reg_sequence cs35l56_hibernate_wake_seq[] = { @@ -473,12 +473,6 @@ int cs35l56_runtime_suspend_common(struct cs35l56_base *cs35l56_base) return 0; } - /* - * Enable auto-hibernate. If it is woken by some other wake source - * it will automatically return to hibernate. - */ - cs35l56_mbox_send(cs35l56_base, CS35L56_MBOX_CMD_ALLOW_AUTO_HIBERNATE); - /* * Must enter cache-only first so there can't be any more register * accesses other than the controlled hibernate sequence below. @@ -545,11 +539,12 @@ int cs35l56_runtime_resume_common(struct cs35l56_base *cs35l56_base, bool is_sou return 0; err: - regmap_write(cs35l56_base->regmap, CS35L56_DSP_VIRTUAL1_MBOX_1, - CS35L56_MBOX_CMD_HIBERNATE_NOW); - regcache_cache_only(cs35l56_base->regmap, true); + regmap_multi_reg_write_bypassed(cs35l56_base->regmap, + cs35l56_hibernate_seq, + ARRAY_SIZE(cs35l56_hibernate_seq)); + return ret; } EXPORT_SYMBOL_NS_GPL(cs35l56_runtime_resume_common, SND_SOC_CS35L56_SHARED); From patchwork Fri Oct 6 11:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 730006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BDE70E936FC for ; Fri, 6 Oct 2023 11:13:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0725C83B; Fri, 6 Oct 2023 13:12:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0725C83B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696590816; bh=uQXQSepVaQWeFBI6iPnh1Rk1V4cPYfKm5n09moTc3ME=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=m4/hOYjdg3aNbjMprV4oHFTEgUCIbZvQ4ERzlzr0P/yHTT09DtT4z2bIJNF4Df/C+ 3iLGR/QcAEKJdLyjGPtAUcxAK/MtZ8GIvhiJ8baYlo7gRmuuCjIPCpv1XEV3ZN34Bd Blohcivl79bWqa7w1/gBqizXSAUNG8G3DvQJA1kw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4FA7EF805AF; Fri, 6 Oct 2023 13:11:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D5873F805AD; Fri, 6 Oct 2023 13:11:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AF3E8F805A0; Fri, 6 Oct 2023 13:11:28 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1BD3AF80551 for ; Fri, 6 Oct 2023 13:10:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1BD3AF80551 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=QPOi9KeQ Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3965fxce025983; Fri, 6 Oct 2023 06:10:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=RlyXKyITjmeNbb6voK2kiPtwUMgBnTpkOA+RxMPoLIg=; b= QPOi9KeQqQpZRQU+r2xbZi+XuvNxhBp7qpe46+J1LFQhcf0/TUgjngZ5WnC1dnW2 gYhQ9YcSo4/Lj6Y2CNNPiLvyLgp9tksCwUT7n2UHjSwcCk7B8jvZQvOrN+jAuAmB mkDOMtxjmgHBp1/gPqjLCDucE+6LtoPA4bRyVzLcU1map4KgGMGOQe6x5UZ+XUq9 b5hk5qlUyPjs1Xrp5MRUW8y8yMEZCiPLlGJLrCSdMm30r0ftzWsDAO/Si20qGmW1 +JbzZHVcbOTPWMfXfIjlqOud9ngfcf2ITJdHQgORXlHAR60lE26Rc8JiLgtpPzFn JDNBkwUumvXylA4ki2IZLQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3th2dtbmxb-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 06:10:45 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Fri, 6 Oct 2023 12:10:42 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Fri, 6 Oct 2023 12:10:42 +0100 Received: from work-debian.ad.cirrus.com (unknown [198.61.64.45]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id A1CEA11AA; Fri, 6 Oct 2023 11:10:42 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH 2/4] ASoC: cs35l56: Wake transactions need to be issued twice Date: Fri, 6 Oct 2023 12:10:37 +0100 Message-ID: <20231006111039.101914-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006111039.101914-1-rf@opensource.cirrus.com> References: <20231006111039.101914-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: vfrFDBZ8iX4B25Cg-1VZgT8UXHnE1qt4 X-Proofpoint-GUID: vfrFDBZ8iX4B25Cg-1VZgT8UXHnE1qt4 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: LO3R3OEN2ENVIJIMOYKJKFXI44BHJAZ6 X-Message-ID-Hash: LO3R3OEN2ENVIJIMOYKJKFXI44BHJAZ6 X-MailFrom: prvs=5643372036=rf@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Trimmer As the dummy wake is a toggling signal (either I2C or SPI activity) it is not guaranteed to meet the minimum asserted hold time for a wake signal. In this case the wake must guarantee rising edges separated by at least the minimum hold time. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- include/sound/cs35l56.h | 1 + sound/soc/codecs/cs35l56-shared.c | 51 +++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index 762b96b29211..8c18e8b6d27d 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -243,6 +243,7 @@ #define CS35L56_HALO_STATE_POLL_US 1000 #define CS35L56_HALO_STATE_TIMEOUT_US 50000 #define CS35L56_RESET_PULSE_MIN_US 1100 +#define CS35L56_WAKE_HOLD_TIME_US 1000 #define CS35L56_SDW1_PLAYBACK_PORT 1 #define CS35L56_SDW1_CAPTURE_PORT 3 diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c index 68dc93b82789..953ba066bab1 100644 --- a/sound/soc/codecs/cs35l56-shared.c +++ b/sound/soc/codecs/cs35l56-shared.c @@ -446,6 +446,32 @@ static const struct reg_sequence cs35l56_hibernate_wake_seq[] = { REG_SEQ0(CS35L56_DSP_VIRTUAL1_MBOX_1, CS35L56_MBOX_CMD_WAKEUP), }; +static void cs35l56_issue_wake_event(struct cs35l56_base *cs35l56_base) +{ + /* + * Dummy transactions to trigger I2C/SPI auto-wake. Issue two + * transactions to meet the minimum required time from the rising edge + * to the last falling edge of wake. + * + * It uses bypassed write because we must wake the chip before + * disabling regmap cache-only. + * + * This can NAK on I2C which will terminate the write sequence so the + * single-write sequence is issued twice. + */ + regmap_multi_reg_write_bypassed(cs35l56_base->regmap, + cs35l56_hibernate_wake_seq, + ARRAY_SIZE(cs35l56_hibernate_wake_seq)); + + usleep_range(CS35L56_WAKE_HOLD_TIME_US, 2 * CS35L56_WAKE_HOLD_TIME_US); + + regmap_multi_reg_write_bypassed(cs35l56_base->regmap, + cs35l56_hibernate_wake_seq, + ARRAY_SIZE(cs35l56_hibernate_wake_seq)); + + cs35l56_wait_control_port_ready(); +} + int cs35l56_runtime_suspend_common(struct cs35l56_base *cs35l56_base) { unsigned int val; @@ -500,17 +526,9 @@ int cs35l56_runtime_resume_common(struct cs35l56_base *cs35l56_base, bool is_sou if (!cs35l56_base->can_hibernate) goto out_sync; - if (!is_soundwire) { - /* - * Dummy transaction to trigger I2C/SPI auto-wake. This will NAK on I2C. - * Must be done before releasing cache-only. - */ - regmap_multi_reg_write_bypassed(cs35l56_base->regmap, - cs35l56_hibernate_wake_seq, - ARRAY_SIZE(cs35l56_hibernate_wake_seq)); - - cs35l56_wait_control_port_ready(); - } + /* Must be done before releasing cache-only */ + if (!is_soundwire) + cs35l56_issue_wake_event(cs35l56_base); out_sync: regcache_cache_only(cs35l56_base->regmap, false); @@ -578,13 +596,14 @@ int cs35l56_hw_init(struct cs35l56_base *cs35l56_base) unsigned int devid, revid, otpid, secured; /* - * If the system is not using a reset_gpio then issue a - * dummy read to force a wakeup. + * When the system is not using a reset_gpio ensure the device is + * awake, otherwise the device has just been released from reset and + * the driver must wait for the control port to become usable. */ if (!cs35l56_base->reset_gpio) - regmap_read(cs35l56_base->regmap, CS35L56_DSP_VIRTUAL1_MBOX_1, &devid); - - cs35l56_wait_control_port_ready(); + cs35l56_issue_wake_event(cs35l56_base); + else + cs35l56_wait_control_port_ready(); /* * The HALO_STATE register is in different locations on Ax and B0 From patchwork Fri Oct 6 11:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 730337 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B08FDE936FB for ; Fri, 6 Oct 2023 11:12:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C6E0B828; Fri, 6 Oct 2023 13:11:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C6E0B828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696590762; bh=bqOSyfytZTZ/0+klzRV33sy5WWdaXYikD4gJtQvmbhY=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=fNnj9Eefw3Oiz1qtPTrnp3sZ8rEMzS1W/BuOCOjYckuaD2bXKFLv3FQEY6OwUcRfl +TjRilwpXPkgLvRmhuUDfXFdGCp3pfMTYQbm8n8IioI+A5HXqPNek5c5t9EwSG8ziB 5dUq5KJnWy7FrG/DpgISVIsyotwDOdWibRzJuOpg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 18A1EF80564; Fri, 6 Oct 2023 13:11:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 61C13F80564; Fri, 6 Oct 2023 13:11:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A1C66F80552; Fri, 6 Oct 2023 13:10:57 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B19FEF80310 for ; Fri, 6 Oct 2023 13:10:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B19FEF80310 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=XcLCzlUy Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 396An4mE006823; Fri, 6 Oct 2023 06:10:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=g8oiQTo8bruK3bLc2ltLGw1QTSsNOM4NkrryXMd4wTo=; b= XcLCzlUyVPBMMkJDA2uTe6duhysQotdFctsjKRKwrCv/5/YHRZanSHTZp3DlT39F ySEzu6ZihTVgjr7U26jiYGpLsHOzWt0cEH8inqp94Os4xVGjtNh9H33U05+j7Ruw HusqwGuJifvxWfy0wm73k3H6ozLwVdw5pFYLyvIW6oyxHGeHfjigvcKAl83bFmz9 0t+k6hejFgcMovblAPrZxBUjws4TkO4M8y3t6S6hFrL3hab8RcDGwyqq5Vrw0jDH 1I3JmAajQcC+yuzrW8yHtYblGEs5uIW4dfhSIzWmtWDtFVpO5f2slTfO+iOvnaMX cyj0LPwDZDp2N85WA71d2Q== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3teg3k812p-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 06:10:44 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Fri, 6 Oct 2023 12:10:43 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Fri, 6 Oct 2023 12:10:43 +0100 Received: from work-debian.ad.cirrus.com (unknown [198.61.64.45]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 058C43575; Fri, 6 Oct 2023 11:10:42 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH 3/4] ASoC: cs35l56: Enable low-power hibernation mode on i2c Date: Fri, 6 Oct 2023 12:10:38 +0100 Message-ID: <20231006111039.101914-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006111039.101914-1-rf@opensource.cirrus.com> References: <20231006111039.101914-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: kcUkljDucTnCyy5E_GLIs-2oIMLT0mAc X-Proofpoint-ORIG-GUID: kcUkljDucTnCyy5E_GLIs-2oIMLT0mAc X-Proofpoint-Spam-Reason: safe Message-ID-Hash: G52F3XFONQKBIHTQB7FCS67QAQ6VIPHV X-Message-ID-Hash: G52F3XFONQKBIHTQB7FCS67QAQ6VIPHV X-MailFrom: prvs=5643372036=rf@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Trimmer This can now be re-enabled as the sequence to reliably wake the device has been implemented in the shared code. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56-i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cs35l56-i2c.c b/sound/soc/codecs/cs35l56-i2c.c index 9e5670b09af6..7063c400e896 100644 --- a/sound/soc/codecs/cs35l56-i2c.c +++ b/sound/soc/codecs/cs35l56-i2c.c @@ -27,6 +27,7 @@ static int cs35l56_i2c_probe(struct i2c_client *client) return -ENOMEM; cs35l56->base.dev = dev; + cs35l56->base.can_hibernate = true; i2c_set_clientdata(client, cs35l56); cs35l56->base.regmap = devm_regmap_init_i2c(client, regmap_config); From patchwork Fri Oct 6 11:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 730336 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14E7CE936FC for ; Fri, 6 Oct 2023 11:13:12 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3594786E; Fri, 6 Oct 2023 13:12:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3594786E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1696590790; bh=/ZeLXjYF+qO09y8SwXVPJfeFgZDGpuzd6RCcyJidjjM=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ilNJhiQbOdimGanzv9FYftMzBpXyCtYNW0DUgll1UBQIJXqb6V+yW7UccyFj4BB+S C/OHfaJ8Zijvez8LhcjHAo3iolFeNgnAvN9tDxTGli0gDdDtzqi+vDi/SpihAF7WYM N0R1M7Cp/DBO8FfeklP30Qw0M5u7C0W1oVRv8Ltc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0CDA9F80589; Fri, 6 Oct 2023 13:11:28 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 55BD6F80589; Fri, 6 Oct 2023 13:11:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7D10FF80589; Fri, 6 Oct 2023 13:11:24 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D533FF80549 for ; Fri, 6 Oct 2023 13:10:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D533FF80549 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=PddZTK8F Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 396An4mF006823; Fri, 6 Oct 2023 06:10:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=n31ClrR7pAHjPb9Ka48kOGEYMP6+xN1DN1qSQpeBfl4=; b= PddZTK8FflKwXLmBVeQPRdvarSPJ9RBGhnLcI5SzrrPi0E24dDEzzyAfPDK9LISE Al23Ti7d7cwhyXuQFs/t+Gcii4M6O+GiPmXpPkSobjjcFe8Ctd4+Li23xg1B78Lu AFxhbwd/APlNDs3RjehEOqdofA66GlHbqfgoQjkjNEPzVNfP05z7rgxCZzIm5I5b PQFXufE06gveYUDJ9eapfS1vHt6DWz4b9NU7dfn9KHEq1dVTWk9NqHlDUSFFgXpw q6hwmWJ+3KpxUfn5/W36P6zrfyHeV1GVoPthFvXrnEVj4m4Hz7oEzUIGLwA1iAwi ZIR3xdfflOEoQ+LKmY/ZnQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3teg3k812p-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 06:10:45 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Fri, 6 Oct 2023 12:10:43 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Fri, 6 Oct 2023 12:10:43 +0100 Received: from work-debian.ad.cirrus.com (unknown [198.61.64.45]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6AE18357D; Fri, 6 Oct 2023 11:10:43 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 4/4] ASoC: cs35l56: Enable low-power hibernation mode on SPI Date: Fri, 6 Oct 2023 12:10:39 +0100 Message-ID: <20231006111039.101914-5-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20231006111039.101914-1-rf@opensource.cirrus.com> References: <20231006111039.101914-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: t_TLtslMzrYc01xR3S83o8_ipRHwwlvM X-Proofpoint-ORIG-GUID: t_TLtslMzrYc01xR3S83o8_ipRHwwlvM X-Proofpoint-Spam-Reason: safe Message-ID-Hash: PHZELWFFU66KOGUR2WFQCLXYUMNTTIWI X-Message-ID-Hash: PHZELWFFU66KOGUR2WFQCLXYUMNTTIWI X-MailFrom: prvs=5643372036=rf@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hibernation can be enabled on SPI-connected devices now that the hibernate and wake sequences have been updated to work with wake-on-MOSI. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56-spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/cs35l56-spi.c b/sound/soc/codecs/cs35l56-spi.c index 768ffe8213dc..b07b798b0b45 100644 --- a/sound/soc/codecs/cs35l56-spi.c +++ b/sound/soc/codecs/cs35l56-spi.c @@ -32,6 +32,7 @@ static int cs35l56_spi_probe(struct spi_device *spi) } cs35l56->base.dev = &spi->dev; + cs35l56->base.can_hibernate = true; ret = cs35l56_common_probe(cs35l56); if (ret != 0)