From nobody Sat Feb 7 08:02:11 2026 Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAC5730BF69 for ; Tue, 27 Jan 2026 17:37:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769535465; cv=none; b=Hb6TTU/DUypn1XGQXAqeDVMGWNhWAVHqm7TTDePzYuKU4l35FOM9U/3FY2D3IUTSXz/KQCzNV2c9wO9wyFZvBXLJHYDDfZ8uEqNzA27kZ2pohtYiJXkZ8/hBwBdjzz3D3FKML0n2p/Zh+qBY1MItdAZHxMT8V3RpDcRv8mcbuFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769535465; c=relaxed/simple; bh=lK9II1Dsnwq0vjo+mhmmlISiI/o/6ljoq4WEuaNBdMI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UjXqJb/jxB7dtGYQNU/lyniXRGH3knkTYaVdL+Q9k+qT1Rb3cxKoZgHSvHQTf6MlnNq7If7X35LdIsAECdgDLWNU3s4oa0Q8TdxGUZWs4aJh/AKq3URLV9FuZCa4ygHB5ODufYrKQ4rd8c8sIZuqVAF67ixgiBEqvNLeGJ4AEOI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YDDUt3kW; arc=none smtp.client-ip=209.85.215.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YDDUt3kW" Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-c227206e6dcso3976375a12.2 for ; Tue, 27 Jan 2026 09:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769535463; x=1770140263; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FEmxLuzrO1YBtIr6Vi+MR0THe4Bxy0XforMzKziIKYU=; b=YDDUt3kWmCwkZ1mMDuwpxhDUYwS96vwK21wiaG871nOgBjrB1S5mhcjJzYXkLyygJ8 UkT0PoPspY41tUjXGTkFJ6bBQ8wAFDmSMBV2dOUMM2TZLXRS3Vwc6x+9yi968C8zn94Y tcXc+apeqFSpGRMR4nXRJpIr9pUryYznT/1ODkcVNPY1xb5yHZa1gYFWffM4qHxWZfaW LtcTsG86h/H0NxgPDJ3HbAVQJhKw+l0ITujshTsO7iFdEWA9g5SuQCuWLtMH25lwkbVF BW7B91MmpPkhB1URqmHDXKgJ1eH9IyyEWVDMAFeYEhjN9N1EWkQh6oKFZSkCOcX+aSgo KCYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769535463; x=1770140263; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FEmxLuzrO1YBtIr6Vi+MR0THe4Bxy0XforMzKziIKYU=; b=wAi+VqbXapDWQwL3uDGU3yKfUZHeZar91qY5W7BA5PODy1Gqhfisn6P8MYEddqMCy4 M7tzJ4t8mGaOi1Oq2Myh++w5H1zQ2EHKJxrLIbahZlObJT6T70aGh5ucnnUtnGmmQR2G t9QU4iQzw6HVjutxOZL37fCPNAdJ3p4VBIHyT/ZQeih8aUZqbXy7uwPO6w48EPmALb5U u5Z8+xy1HnJb+d2n5UE8raPUH+z9NpC6fqYzVELKfqoOshdJjEjwCYKmP/YsUl2qMk8T RUTU1BbELo5f9SZ+6HC39e3apPWRldpP7fr6+cCo7jJx017q+zdNgEIg7+4l4Y62h8jp m59Q== X-Forwarded-Encrypted: i=1; AJvYcCX0WctZS++hwDwHlMAOD2hV0bLnllj5SRoO8jEG4VP4RNQPvBOF9e5VS684DaeDdJLYGLRMTTPAoE6dQC4=@vger.kernel.org X-Gm-Message-State: AOJu0YyGsUoGz6Fy06kOuDnQr8cR+RcCKmfXT4W4SYe2I3XTFb29jJ4D UO73wzAXOx9kBRhX9prYF2aKv21xteegvu4ERqr4NHuMuZrJRRHUNSN4 X-Gm-Gg: AZuq6aJ/hyNxcuDyporf+gLisVo7mmHVFGpru6dpWqOJW5PKiED4pxt0jLSL2VJLxnA 1gI9bXdNUe59cbA3HJYxPNigD2bSmiwRDiTYDu8QZP6ZaTVkrd9dsUWcbsJMq5mjlJ2AnKlq0bz FrgX/Op0LWhCLXFeA8iNYDU208xlDZyZGAJa9EF78xXBtwmrWYf5sOGp7ysdk5Pc11lszUBw4Op qMb1dxwQOc5LyDN9q6Nw8Fd+UKK9bTsEKKAI5jF5MoZexo8XMIKvQIEpLHRlXsBZph9MmkPHC0o thrS8uufgF0I0fuO8LlAWpecwRJgfwnp7sCfVYbGCBT5wr7B2QA7H8hVsVjzXQPjJzmx4xmMvbB demH6XZF4LmhMPt2vZcg94r3/KbI6r10aE/2BgmWm+zZQWHW6JVl0BtsSqj3sJAqOcfMxh6Vk/v Z1vwi2Pt+ylVHAbxKnDx0RbZY9jG/W8yNLTsg= X-Received: by 2002:a17:903:2bcc:b0:290:c516:8c53 with SMTP id d9443c01a7336-2a870e35c72mr25832805ad.40.1769535463159; Tue, 27 Jan 2026 09:37:43 -0800 (PST) Received: from saikiran-Yoga-Slim-7-14Q8X9 ([2402:e280:3d17:646:d29a:ea37:2567:751]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b3eecb7sm181485ad.1.2026.01.27.09.37.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 09:37:42 -0800 (PST) From: Saikiran To: broonie@kernel.org, lgirdwood@gmail.com Cc: andersson@kernel.org, konrad.dybcio@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Saikiran Subject: [PATCH v2] regulator: qcom-rpmh: Add support for regulator-off-on-delay-us Date: Tue, 27 Jan 2026 23:07:36 +0530 Message-ID: <20260127173736.82976-1-bjsaikiran@gmail.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The core regulator framework supports enforcing a physical off-time via standard properties, but the `qcom-rpmh-regulator` driver currently ignores them. This prevents boards with slow-discharging rails from enforcing safe power-cycling constraints. On the Lenovo Yoga Slim 7x (Snapdragon X Elite), certain camera regulators rely on passive discharge and require a significant off-time to drop below brownout thresholds. Without this driver support, we cannot enforce this constraint via Device Tree, leading to sensor initialization failures during rapid power cycling. Add support for parsing the `regulator-off-on-delay-us` property from the device tree. I have tested this on the Yoga Slim 7x. When the delay property is present in the device tree, the regulator core correctly blocks re-enable calls until the delay passes, fixing the camera brownout issues. Signed-off-by: Saikiran --- drivers/regulator/qcom-rpmh-regulator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qc= om-rpmh-regulator.c index 6e4cb2871fca..aafba61551b3 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -503,6 +503,9 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *v= reg, struct device *dev, vreg->always_wait_for_ack =3D of_property_read_bool(node, "qcom,always-wait-for-ack"); =20 + of_property_read_u32(node, "regulator-off-on-delay-us", + &vreg->rdesc.off_on_delay); + vreg->rdesc.owner =3D THIS_MODULE; vreg->rdesc.type =3D REGULATOR_VOLTAGE; vreg->rdesc.ops =3D vreg->hw_data->ops; --=20 2.51.0