mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frieder Schrempf <frieder@fris.de>
To: linux-arm-kernel@lists.infradead.org, Marek Vasut <marex@denx.de>,
	Conor Dooley <conor@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Cc: Frieder Schrempf <frieder.schrempf@kontron.de>,
	Bo Liu <liubo03@inspur.com>, Frank Li <Frank.Li@nxp.com>,
	Joy Zou <joy.zou@nxp.com>, Robin Gong <yibin.gong@nxp.com>
Subject: [PATCH v3 3/9] Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5"
Date: Wed, 18 Dec 2024 16:27:26 +0100	[thread overview]
Message-ID: <20241218152842.97483-4-frieder@fris.de> (raw)
In-Reply-To: <20241218152842.97483-1-frieder@fris.de>

From: Frieder Schrempf <frieder.schrempf@kontron.de>

This reverts commit 8c67a11bae889f51fe5054364c3c789dfae3ad73.

It turns out that all boards using the PCA9450 actually have the
SD_VSEL input connected to the VSELECT signal of the SoCs SD/MMC
interface or use a fixed level.

The assumptions on which this was implemented were wrong. There
is no need for a GPIO-only-based approach and keeping this will
cause confusion and lead people to implement non-standard setups.

All in-tree users of this have been migrated and we can savely
remove this now and allow for a more future-proof approach
of syncing the actual status of SD_VSEL and the PMIC driver.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
Changes for v3:
* Rebase to next-20241218

Changes for v2:
* rebase to current master
---
 drivers/regulator/pca9450-regulator.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index faa6b79c27d75..9e5e81a9315f6 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -5,7 +5,6 @@
  */
 
 #include <linux/err.h>
-#include <linux/gpio/consumer.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
@@ -32,7 +31,6 @@ struct pca9450_regulator_desc {
 struct pca9450 {
 	struct device *dev;
 	struct regmap *regmap;
-	struct gpio_desc *sd_vsel_gpio;
 	enum pca9450_chip_type type;
 	unsigned int rcnt;
 	int irq;
@@ -1031,17 +1029,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
 					     "Failed to enable I2C level translator\n");
 	}
 
-	/*
-	 * The driver uses the LDO5CTRL_H register to control the LDO5 regulator.
-	 * This is only valid if the SD_VSEL input of the PMIC is high. Let's
-	 * check if the pin is available as GPIO and set it to high.
-	 */
-	pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH);
-
-	if (IS_ERR(pca9450->sd_vsel_gpio))
-		return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->sd_vsel_gpio),
-				     "Failed to get SD_VSEL GPIO\n");
-
 	dev_info(&i2c->dev, "%s probed.\n",
 		type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
 		(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
-- 
2.47.1


  parent reply	other threads:[~2024-12-18 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 15:27 [PATCH v3 0/9] Use correct LDO5 control registers for PCA9450 Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 1/9] dt-bindings: regulator: pca9450: Add properties for handling LDO5 Frieder Schrempf
2024-12-18 16:42   ` Conor Dooley
2024-12-18 15:27 ` [PATCH v3 2/9] arm64: dts: imx8mp-skov-reva: Use hardware signal for SD card VSELECT Frieder Schrempf
2024-12-18 15:27 ` Frieder Schrempf [this message]
2024-12-18 15:54   ` [PATCH v3 3/9] Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5" Mark Brown
2024-12-18 15:27 ` [PATCH v3 4/9] regulator: pca9450: Fix control register for LDO5 Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 5/9] regulator: pca9450: Fix enable " Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 6/9] regulator: pca9450: Handle hardware with fixed SD_VSEL " Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 7/9] arm64: dts: imx8mm-kontron: Add support for reading SD_VSEL signal Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 8/9] arm64: dts: imx93-kontron: Fix SD card IO voltage control Frieder Schrempf
2024-12-18 15:27 ` [PATCH v3 9/9] arm64: dts: imx8mp-kontron: Add support for reading SD_VSEL signal Frieder Schrempf
2025-01-28  7:44 ` [PATCH v3 0/9] Use correct LDO5 control registers for PCA9450 Frieder Schrempf
2025-01-28 11:06   ` Mark Brown
2025-02-03 19:57 ` (subset) " Mark Brown
2025-02-18  8:02   ` Frieder Schrempf
2025-02-18  3:11 ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241218152842.97483-4-frieder@fris.de \
    --to=frieder@fris.de \
    --cc=Frank.Li@nxp.com \
    --cc=broonie@kernel.org \
    --cc=conor@kernel.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=joy.zou@nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liubo03@inspur.com \
    --cc=marex@denx.de \
    --cc=yibin.gong@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®