Skip to content

Commit c73be62

Browse files
fschrempfbroonie
authored andcommitted
Revert "regulator: pca9450: Add SD_VSEL GPIO for LDO5"
This reverts commit 8c67a11. 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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b5ec74c commit c73be62

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

drivers/regulator/pca9450-regulator.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
#include <linux/err.h>
8-
#include <linux/gpio/consumer.h>
98
#include <linux/i2c.h>
109
#include <linux/interrupt.h>
1110
#include <linux/kernel.h>
@@ -32,7 +31,6 @@ struct pca9450_regulator_desc {
3231
struct pca9450 {
3332
struct device *dev;
3433
struct regmap *regmap;
35-
struct gpio_desc *sd_vsel_gpio;
3634
enum pca9450_chip_type type;
3735
unsigned int rcnt;
3836
int irq;
@@ -1031,17 +1029,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
10311029
"Failed to enable I2C level translator\n");
10321030
}
10331031

1034-
/*
1035-
* The driver uses the LDO5CTRL_H register to control the LDO5 regulator.
1036-
* This is only valid if the SD_VSEL input of the PMIC is high. Let's
1037-
* check if the pin is available as GPIO and set it to high.
1038-
*/
1039-
pca9450->sd_vsel_gpio = gpiod_get_optional(pca9450->dev, "sd-vsel", GPIOD_OUT_HIGH);
1040-
1041-
if (IS_ERR(pca9450->sd_vsel_gpio))
1042-
return dev_err_probe(&i2c->dev, PTR_ERR(pca9450->sd_vsel_gpio),
1043-
"Failed to get SD_VSEL GPIO\n");
1044-
10451032
dev_info(&i2c->dev, "%s probed.\n",
10461033
type == PCA9450_TYPE_PCA9450A ? "pca9450a" :
10471034
(type == PCA9450_TYPE_PCA9451A ? "pca9451a" : "pca9450bc"));

0 commit comments

Comments
 (0)