diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-18 20:09:32 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-01 07:03:12 -0600 |
commit | 7a869e6cd15e012c7b5cde9b8bd5ea7691546a08 (patch) | |
tree | 0bbf1a2d95e7468f2de900cd4ebd15a033790d30 /drivers/power/pmic/rk8xx.c | |
parent | f6e76202d4f11c8e38e2cec6111a8e2f99e83fcc (diff) |
dm: pmic: Convert uclass to livetree
Update the pmic uclass and all pmics to support a live device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/power/pmic/rk8xx.c')
-rw-r--r-- | drivers/power/pmic/rk8xx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c index 394e2ff9db..09b9b54c62 100644 --- a/drivers/power/pmic/rk8xx.c +++ b/drivers/power/pmic/rk8xx.c @@ -57,13 +57,11 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len) #if CONFIG_IS_ENABLED(PMIC_CHILDREN) static int rk8xx_bind(struct udevice *dev) { - const void *blob = gd->fdt_blob; - int regulators_node; + ofnode regulators_node; int children; - regulators_node = fdt_subnode_offset(blob, dev_of_offset(dev), - "regulators"); - if (regulators_node <= 0) { + regulators_node = dev_read_subnode(dev, "regulators"); + if (!ofnode_valid(regulators_node)) { debug("%s: %s regulators subnode not found!", __func__, dev->name); return -ENXIO; |