The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] regulator: pca9450: Remove duplicate code in probe
@ 2025-02-19  8:01 Frieder Schrempf
  2025-02-19 23:08 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Frieder Schrempf @ 2025-02-19  8:01 UTC (permalink / raw)
  To: linux-arm-kernel, Liam Girdwood, linux-kernel, Mark Brown
  Cc: Frieder Schrempf, Bo Liu, Frank Li, Joy Zou, Marek Vasut,
	Robin Gong

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

The SD_VSEL GPIO is fetched twice for no reason. Remove the
duplicate code.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
Apparently something went wrong when preparing the v3 patch
that got applied to regulator/for-next and is now in linux-next.
---
 drivers/regulator/pca9450-regulator.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index 4519e725706cd..8f81d813640d9 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -1100,18 +1100,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
 		return ret;
 	}
 
-	/*
-	 * For LDO5 we need to be able to check the status of the SD_VSEL input in
-	 * order to know which control register is used. Most boards connect SD_VSEL
-	 * to the VSELECT signal, so we can use the GPIO that is internally routed
-	 * to this signal (if SION bit is set in IOMUX).
-	 */
-	pca9450->sd_vsel_gpio = gpiod_get_optional(&ldo5->dev, "sd-vsel", GPIOD_IN);
-	if (IS_ERR(pca9450->sd_vsel_gpio)) {
-		dev_err(&i2c->dev, "Failed to get SD_VSEL GPIO\n");
-		return ret;
-	}
-
 	dev_info(&i2c->dev, "%s probed.\n",
 		type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
 		(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-19 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19  8:01 [PATCH] regulator: pca9450: Remove duplicate code in probe Frieder Schrempf
2025-02-19 23:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox