regulator: pca9450: Handle hardware with fixed SD_VSEL for LDO5
PATCH RESEND v3 1/1 regulator: pca9450: Handle hardware with fixed SD_VSEL for LDO5
From: Frieder Schrempf <[email protected]>
There are two ways to set the output voltage of the LD05 regulator. First by writing to the voltage selection registers and second by toggling the SD_VSEL signal.
Usually board designers connect SD_VSEL to the VSELECT signal controlled by the USDHC controller, but in some cases the signal is hardwired to a fixed low level (therefore selecting 3.3V as initial value for allowing to boot from the SD card).
In these cases, the voltage is only determined by the value of the LDO5CTRL_L register. Introduce a property nxp,sd-vsel-fixed-low to let the driver know that SD_VSEL is low and there is no GPIO to actually get that information from dynamically.
---
This was originally part of the series here: [1]. The other patches were already applied, but this one is missing in regulator/for-next and linux-next, which is why I'm resending.
[1] https://patchwork.kernel.org/project/linux-arm-kernel/cover/[email protected]/
---
--- drivers/regulator/pca9450-regulator.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/regulator/pca9450-regulator.c +7 -0
@@ -36,6 +36,7 @@ struct pca9450 {enum pca9450_chip_type type;unsigned int rcnt;int irq; +bool sd_vsel_fixed_low; };static const struct regmap_range pca9450_status_range = {
@@ -102,6 +103,9 @@ static unsigned int pca9450_ldo5_get_reg_voltage_sel(struct regulator_dev *rdev) {struct pca9450 *pca9450 =rdev_get_drvdata (rdev); +if (pca9450->sd_vsel_fixed_low) +return PCA9450_REG_LDO5CTRL_L ; +if (pca9450->sd_vsel_gpio && !gpiod_get_value (pca9450->sd_vsel_gpio))return PCA9450_REG_LDO5CTRL_L ;
@@ -1100,6 +1104,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)return ret; } + pca9450->sd_vsel_fixed_low = +of_property_read_bool (ldo5->dev.of_node,"nxp,sd-vsel-fixed-low" ); +dev_info (&i2c->dev,"%s probed.\n" , type ==PCA9450_TYPE_PCA9450A ?"pca9450a" : (type ==PCA9450_TYPE_PCA9451A ?"pca9451a" :"pca9450bc" ));
Signature · 1 line
2.48.1
Mark Brown
maintainerQuoted 10 lines · Frieder Schrempf
There are two ways to set the output voltage of the LD05 regulator. First by writing to the voltage selection registers and second by toggling the
SD_VSELsignal.Usually board designers connect
SD_VSELto the VSELECT signal controlled by the USDHC controller, but in some cases the signal is hardwired to a fixed low level (therefore selecting 3.3V as initial value for allowing to boot from the SD card).[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: pca9450: Handle hardware with fixed SD_VSEL for LDO5
commit: c8c1ab2c5cb797fe455aa18b4ab7bf39897627f6
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark