mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabled
If the bd718x7 is required, but PMIC_CHILDREN is disabled, this driver throws a compile error. Fix this by putting the function to bind children into an if-statement checking for PMIC_CHILDREN. Allowing PMIC_CHILDREN to be disabled in SPL saves some space and still permits some read/write functions to access the PMIC in early startup. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Fabio Estevam <festevam@gmail.com>
This commit is contained in:
parent
975f4117d5
commit
4dbe07f275
1 changed files with 5 additions and 4 deletions
|
@ -63,10 +63,11 @@ static int bd71837_bind(struct udevice *dev)
|
|||
|
||||
debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
|
||||
|
||||
children = pmic_bind_children(dev, regulators_node, pmic_children_info);
|
||||
if (!children)
|
||||
debug("%s: %s - no child found\n", __func__, dev->name);
|
||||
|
||||
if (CONFIG_IS_ENABLED(PMIC_CHILDREN)) {
|
||||
children = pmic_bind_children(dev, regulators_node, pmic_children_info);
|
||||
if (!children)
|
||||
debug("%s: %s - no child found\n", __func__, dev->name);
|
||||
}
|
||||
/* Always return success for this device */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue