]> git.baikalelectronics.ru Git - uboot.git/commit
regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabled
authorAdam Ford <aford173@gmail.com>
Sat, 22 Oct 2022 13:43:42 +0000 (08:43 -0500)
committerStefano Babic <sbabic@denx.de>
Mon, 7 Nov 2022 21:45:04 +0000 (22:45 +0100)
commit54cafeae4476d20532490ddee1b54c4d7bacf6a1
tree17fea5ad77e3246cc98e4d1787b7169a4648ee26
parent0137190a989a875eb1bd7c0c99a0292327a524b8
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>
drivers/power/pmic/bd71837.c