Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5"

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>
Link: https://patch.msgid.link/20241218152842.97483-4-frieder@fris.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Frieder Schrempf and committed by
Mark Brown
c73be62c b5ec74c2

-13
-13
drivers/regulator/pca9450-regulator.c
··· 5 5 */ 6 6 7 7 #include <linux/err.h> 8 - #include <linux/gpio/consumer.h> 9 8 #include <linux/i2c.h> 10 9 #include <linux/interrupt.h> 11 10 #include <linux/kernel.h> ··· 31 32 struct pca9450 { 32 33 struct device *dev; 33 34 struct regmap *regmap; 34 - struct gpio_desc *sd_vsel_gpio; 35 35 enum pca9450_chip_type type; 36 36 unsigned int rcnt; 37 37 int irq; ··· 1028 1030 return dev_err_probe(&i2c->dev, ret, 1029 1031 "Failed to enable I2C level translator\n"); 1030 1032 } 1031 - 1032 - /* 1033 - * The driver uses the LDO5CTRL_H register to control the LDO5 regulator. 1034 - * This is only valid if the SD_VSEL input of the PMIC is high. Let's 1035 - * check if the pin is available as GPIO and set it to high. 1036 - */ 1037 - pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH); 1038 - 1039 - if (IS_ERR(pca9450->sd_vsel_gpio)) 1040 - return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->sd_vsel_gpio), 1041 - "Failed to get SD_VSEL GPIO\n"); 1042 1033 1043 1034 dev_info(&i2c->dev, "%s probed.\n", 1044 1035 type == PCA9450_TYPE_PCA9450A ? "pca9450a" :