summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/regulator/Kconfig9
-rw-r--r--drivers/w1-eeprom/ds24xxx.c2
-rw-r--r--drivers/w1/w1-uclass.c14
3 files changed, 17 insertions, 8 deletions
diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 414f4a53f78..2561a8a8561 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -86,12 +86,19 @@ config SPL_DM_REGULATOR_FIXED
config DM_REGULATOR_GPIO
bool "Enable Driver Model for GPIO REGULATOR"
- depends on DM_REGULATOR
+ depends on DM_REGULATOR && DM_GPIO
---help---
This config enables implementation of driver-model regulator uclass
features for gpio regulators. The driver implements get/set for
voltage value.
+config SPL_DM_REGULATOR_GPIO
+ bool "Enable Driver Model for GPIO REGULATOR in SPL"
+ depends on DM_REGULATOR_GPIO && SPL_GPIO_SUPPORT
+ ---help---
+ This config enables implementation of driver-model regulator uclass
+ features for gpio regulators in SPL.
+
config REGULATOR_RK8XX
bool "Enable driver for RK8XX regulators"
depends on DM_REGULATOR && PMIC_RK8XX
diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c
index 56186e587cf..0967accdf00 100644
--- a/drivers/w1-eeprom/ds24xxx.c
+++ b/drivers/w1-eeprom/ds24xxx.c
@@ -31,7 +31,7 @@ static int ds24xxx_probe(struct udevice *dev)
{
struct w1_device *w1;
- w1 = dev_get_platdata(dev);
+ w1 = dev_get_parent_platdata(dev);
w1->id = 0;
return 0;
}
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index aecf7fec77c..cb41b68eff1 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -115,17 +115,19 @@ int w1_get_bus(int busnum, struct udevice **busp)
struct udevice *dev;
for (ret = uclass_first_device(UCLASS_W1, &dev);
- !ret;
- uclass_next_device(&dev), i++) {
- if (ret) {
- debug("Cannot find w1 bus %d\n", busnum);
- return ret;
- }
+ dev && !ret;
+ ret = uclass_next_device(&dev), i++) {
if (i == busnum) {
*busp = dev;
return 0;
}
}
+
+ if (!ret) {
+ debug("Cannot find w1 bus %d\n", busnum);
+ ret = -ENODEV;
+ }
+
return ret;
}