From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 3B73AC2E0; Mon, 23 Jun 2025 21:32:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714326; cv=none; b=kqS2Pfx50aunktQI+j1V5kF9GA2bEUdPQDIYcgpz7+yqQKTJ9cwTx2mOzv1w6jfMSXMntcUiDA/LYREVxkhEX8OQ+qa1mHhQx3UE5YLimn6weFQvDPdlwZ7uC/SxHJcOSdXWTUDIzU88UyHe0AewHYfsrOZP1C280Gl2xHYnOos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750714326; c=relaxed/simple; bh=t6nG/YLeJOoYcVxWwMKvEcxfjMiTT3ddKdCZHT4J1h8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VT41sYQebm1Y2m48UqIv6ajBnW+Z7imehAOVdJg/KNYD8wAi56NVdGzLtBz+z7FBm7xZ9QRtbsImYxLtiNVNYjdM1yt4y3zT9C2oUe7m3QzUTQhmn+qMXveurS7twV/FIqJ2u9/7y6VivJFYzX0rRHXQQfHTf2zujSRj+lFsf8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ejapOw3s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ejapOw3s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6B24C4CEEA; Mon, 23 Jun 2025 21:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750714326; bh=t6nG/YLeJOoYcVxWwMKvEcxfjMiTT3ddKdCZHT4J1h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejapOw3sNxeK5Sa2RePKbD2dFtxqv2XszPEwRC0zLsYoNC8t2KTq7oBZ9vSwfV2TZ 7j1DTMrmey5qN7vAEaGt94NmMLri0sMuQ7L9E8lbHOvURPZcq31DvnHZqGQGQ6O2Dd zErqMIjwU5dTDVBY7Zqa3aIIm+5/DH0gK1m8BjQY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peng Fan , Linus Walleij , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 6.6 130/290] gpiolib: of: Add polarity quirk for s5m8767 Date: Mon, 23 Jun 2025 15:06:31 +0200 Message-ID: <20250623130630.833125740@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.910356556@linuxfoundation.org> References: <20250623130626.910356556@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peng Fan [ Upstream commit 4e310626eb4df52a31a142c1360fead0fcbd3793 ] This is prepare patch for switching s5m8767 regulator driver to use GPIO descriptor. DTS for exynos5250 spring incorrectly specifies "active low" polarity for the DVS and DS line. But per datasheet, they are actually active high. So add polarity quirk for it. Signed-off-by: Peng Fan Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20250327004945.563765-1-peng.fan@oss.nxp.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin --- drivers/gpio/gpiolib-of.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index a0a2a0f75bba4..c1e83b2926ae4 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -203,6 +203,15 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np, */ { "lantiq,pci-xway", "gpio-reset", false }, #endif +#if IS_ENABLED(CONFIG_REGULATOR_S5M8767) + /* + * According to S5M8767, the DVS and DS pin are + * active-high signals. However, exynos5250-spring.dts use + * active-low setting. + */ + { "samsung,s5m8767-pmic", "s5m8767,pmic-buck-dvs-gpios", true }, + { "samsung,s5m8767-pmic", "s5m8767,pmic-buck-ds-gpios", true }, +#endif #if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2005) /* * DTS for Nokia N900 incorrectly specified "active high" -- 2.39.5