From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A34064EF12E; Tue, 13 Oct 2026 12:28:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791894485; cv=none; b=k1dMNTKtO+vYxfuXj6VVPk+GYCDeg6oXPqwIM3SXFw9wJDgR1x+ztf+PEyvH9UmxeERkM00njc3yPOT3q1NiBely+5V5YGz87RQuawZsShZPeAfe5eeGorbKEQITRTceC07Bg6BZvB7trX6Pt8/FQJkP5U3WZ1sFb3qsMIOGXgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791894485; c=relaxed/simple; bh=FzXfGIq9L/xJLdkYpncYJ9wLgac2fPm9AdNKxG7bF5s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VfKZXPFrew6ZSmisumreK92m40P5kp5DVGp1jaGcjDPiZKYxlgeS/NcSI7gu6DsoNPUI/KCPBQ+b10+PgEF5yvA2y8DoARI+DwCmcCEJDLxDJBiscEpa0LSq9dDEMNeCTZTgQD8VcQfF+ZcPEi0XCYy2go7AnTUx1Z2w5jvpgpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZxiOS5Gf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZxiOS5Gf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07E531F00898; Tue, 13 Oct 2026 12:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791894484; bh=nR4bmAscFn11rBdbNJTMU0K+manAnT7pFDbBSmY6/5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZxiOS5GfP1+sX+L00Jq3RxANJPpr793ORS6ZsB9oXYnVbiv3xbPZuRNYgOGrk1tyw EtgDqGFz8dNXwS8RjDDKJoLhLUCXpsLNpYvWWkDMCtChDlQLVjgF9z+rC+G9KWmGbv GCo4ZYTwFK0Kv9m4xHrUs7ORzPM1IzUCcvDtgrBU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Alvin=20=C5=A0ipraga?= , =?UTF-8?q?Nuno=20S=C3=A1?= , Mark Brown , Sasha Levin Subject: [PATCH 6.18 574/621] ASoC: adau1372: allow sleepy powerdown GPIOs Date: Tue, 13 Oct 2026 13:39:29 +0200 Message-ID: <20261013112934.428800668@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112920.855194808@linuxfoundation.org> References: <20261013112920.855194808@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alvin Šipraga [ Upstream commit 64dd172bbffe6135d79a06ddad53dd2da4d8bd62 ] gpiod_set_value() emits a WARN when the GPIO provider indicates that it can sleep, as is typical for I2C controlled GPIO expanders. Since the powerdown GPIO is only manipulated in process context, use the _cansleep variant instead. This lets the driver use sleepy GPIOs to power off the chip. Fixes: 6cd4c6459e47 ("ASoC: Add ADAU1372 audio CODEC support") Signed-off-by: Alvin Šipraga Acked-by: Nuno Sá Link: https://patch.msgid.link/20261006-asoc-adau1372-fixes-v1-1-599cc17fb5f6@analog.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/adau1372.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/adau1372.c b/sound/soc/codecs/adau1372.c index 879afeb81c422..a1fcce04c4dfc 100644 --- a/sound/soc/codecs/adau1372.c +++ b/sound/soc/codecs/adau1372.c @@ -799,7 +799,7 @@ static int adau1372_set_power(struct adau1372 *adau1372, bool enable) if (ret) return ret; if (adau1372->pd_gpio) - gpiod_set_value(adau1372->pd_gpio, 0); + gpiod_set_value_cansleep(adau1372->pd_gpio, 0); if (adau1372->switch_mode) adau1372->switch_mode(adau1372->dev); @@ -819,8 +819,7 @@ static int adau1372_set_power(struct adau1372 *adau1372, bool enable) ADAU1372_CLK_CTRL_PLL_EN, 0); regcache_cache_only(adau1372->regmap, true); - if (adau1372->pd_gpio) - gpiod_set_value(adau1372->pd_gpio, 1); + gpiod_set_value_cansleep(adau1372->pd_gpio, 1); clk_disable_unprepare(adau1372->mclk); return ret; } @@ -837,7 +836,7 @@ static int adau1372_set_power(struct adau1372 *adau1372, bool enable) * map. No need to do any register writes to manually * turn things off. */ - gpiod_set_value(adau1372->pd_gpio, 1); + gpiod_set_value_cansleep(adau1372->pd_gpio, 1); regcache_mark_dirty(adau1372->regmap); } else { regmap_update_bits(adau1372->regmap, ADAU1372_REG_CLK_CTRL, -- 2.53.0