From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796312499; b=nr7TFbVvZNct6RCOIPwixIAxk+A7LOxP3DeSoNJnVh//TTCe8Rozqz7Jc7mXqVJh4hJz 5kZhGGqlmlH86TwykTLTjcT59k41kk11mZwvdZGd/Yab/ZKzZxw3aAJ+krrAfTmcF1fcF 8FliYqhOLY0APjgXxG3ZWxPtkRJXCvvIP8794HSqj9wUXek/6wbLmEWSXh8pjdHr997lq qJu5qxEdTa+lEusjoW9ZXV2nbAX3oJurvcdDIQt4+ndBvNTkPbnSBRcNXYsiyyBqo6GNE azA1kV7W/AuWYCZjAsFgSplaejb8APNWSgz1+VH3TPJxsLkxgNDVcq/74C42+KBvkMQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796312499; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=JVQsJDWStmgHq93iNevBJc92rvTbeiHYyAgcFQStIlE=; b=iPEBpEY2teqECn5PFiFFlYf59w/iaySkxUbW5Q5a5jW3x2WWwU3edsEDbz+HHvAnN5jV m+YL1WU4fYtt9LSIImm17HDqr3/umISpbK1c0kWmeeN5fVlskusEMLbLZaQEQRoHP8hAp SMe1p80vBZq1ReKXCUt2vMrJhTw9zrDKBe/dxS1yBSt6DQ+FVRx/sooM6XMhsvrn460MA 58grYd8qSO9fZ3+SvwuhgoeaN7tHhTCj+E0akT+naofRTeWrW7l6GMuf3gv0weoD7xFZD FyNMPh/TbpOYrco708IpUEvEO113tsFkO3xsZsOfPykiniC204F7roIOtfbK8PWr4RQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fuWj8Pk2; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EE26606A338 for ; Thu, 3 Dec 2026 15:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=fuWj8Pk2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F12F1F0089A; Thu, 3 Dec 2026 15:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796312499; bh=JVQsJDWStmgHq93iNevBJc92rvTbeiHYyAgcFQStIlE=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=fuWj8Pk21Brdp9C2hT6xJozw9x2lHkhwDV1jfPbCd7dzySmf7G9lzRMO4nixUesG5 khmFfIsWWMEISz2F5++SWCgW50gj7CZqeI8PP0ow67otNuUmx/4MhyVICk18AOLFar CaUR1XBmCmMylxFnxw4p1bhRZyJVq+cl7az7LYtHwShKXu1xD2jWxiD3MJszwcst7X bxBi0g0Cvco0FEeRQeuVV+C1KPFNWx4wb1fTsU3TA+1I+B2jGCSVW5+EH0dgq3oBu6 XsyE0KLRTmSYQqUqEu4/iltuT6AkLc6cweJg8+O5ulmL6VbUsT1NTCPXNo2rPvwdLw 7vI7G0at9pz5g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 4/8] ALSA: hda/cs35l41: Split System Suspend/Resume callbacks Reply-To: sashiko-reviews@lists.linux.dev To: "Stefan Binding" Cc: linux-sound@vger.kernel.org In-Reply-To: <20261203141359.150688-5-sbinding@opensource.cirrus.com> References: <20261203141359.150688-1-sbinding@opensource.cirrus.com> <20261203141359.150688-5-sbinding@opensource.cirrus.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 15:41:38 +0000 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] ALSA: hda/cs35l41: missing hibernate exit on aborted suspend for I2C amps -- commit 675e655a22615ff2d728d6c5f5bc78c54e5f9d4f Author: Stefan Binding ALSA: hda/cs35l41: Split System Suspend/Resume callbacks This commit splits the CS35L41 HDA system sleep handling across suspend/resume, suspend_late/resume_early, and suspend_noirq/resume_noirq callbacks. It moves reset GPIO assertion and deassertion into suspend_late and resume_early, and disables the shared IRQ across suspend and resume. > diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda.c b/sound/hda/codec= s/side-codecs/cs35l41_hda.c > index 2e2bf231d3fc4..b30f000dab71d 100644 > --- a/sound/hda/codecs/side-codecs/cs35l41_hda.c > +++ b/sound/hda/codecs/side-codecs/cs35l41_hda.c [ ... ] > +static int cs35l41_system_resume_early(struct device *dev) > +{ > + struct cs35l41_hda *cs35l41 =3D dev_get_drvdata(dev); > + > + if (cs35l41->hw_cfg.bst_type =3D=3D CS35L41_EXT_BOOST_NO_VSPK_SWITCH) > + return 0; /* don't block the whole system resume */ > + > if (cs35l41->reset_gpio) { > + dev_info(cs35l41->dev, "Deasserting Reset\n"); > gpiod_set_value_cansleep(cs35l41->reset_gpio, 0); > usleep_range(2000, 2100); > gpiod_set_value_cansleep(cs35l41->reset_gpio, 1); > + usleep_range(2000, 2100); > } > =20 > - usleep_range(2000, 2100); > + return 0; > +} > + > +static int cs35l41_system_resume(struct device *dev) > +{ > + struct cs35l41_hda *cs35l41 =3D dev_get_drvdata(dev); > + int ret; > + > + dev_dbg(cs35l41->dev, "System Resume\n"); > + > + if (cs35l41->hw_cfg.bst_type =3D=3D CS35L41_EXT_BOOST_NO_VSPK_SWITCH) > + return 0; /* don't block the whole system resume */ > =20 > regcache_cache_only(cs35l41->regmap, false); > =20 > ret =3D cs35l41_reset_and_boot(cs35l41->dev, cs35l41->regmap); [Severity: Medium] Can an aborted system suspend leave an I2C amp in hibernation when cs35l41_reset_and_boot() runs here? cs35l41_system_suspend() hibernates the amp via pm_runtime_force_suspend() and clears cs_dsp.running. If suspend aborts before suspend_late() runs (e.g. another device fails dpm_suspend()), cs35l41_system_resume_early() is skipped and reset_gpio is never pulsed. cs35l41_system_resume() still runs and calls cs35l41_reset_and_boot() without exiting hibernation. On I2C, writing CS35L41_SFT_RESET while hibernating can NAK or be ignored, failing resume with -ETIMEDOUT or leaving the amp stuck in hibernation with cs_dsp.running already cleared. Commit "ALSA: hda/cs35l41: Ensure SPI devices are always reset during system suspend" exits hibernation before resetting SPI devices, but leaves I2C devices unhandled. Calling cs35l41_exit_hibernate() before cs35l41_reset_and_boot() when resume_early() did not run would avoid this. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203141359.1506= 88-1-sbinding@opensource.cirrus.com?part=3D4