aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPaul Barker <paul.barker.ct@bp.renesas.com>2024-02-27 20:40:34 +0000
committerMarek Vasut <marek.vasut+renesas@mailbox.org>2024-02-28 18:42:27 +0100
commita79f96112be4a2f1f11d45827daf1b4270ae8a70 (patch)
tree551b8e3253b21f560137e6fa22a9f8d6438b79e1 /drivers
parent167eb89a211a52c20d47b031a1053a74bbca1942 (diff)
downloadu-boot-a79f96112be4a2f1f11d45827daf1b4270ae8a70.zip
u-boot-a79f96112be4a2f1f11d45827daf1b4270ae8a70.tar.gz
u-boot-a79f96112be4a2f1f11d45827daf1b4270ae8a70.tar.bz2
pmic: raa215300: Bind sysreset driver
If SYSRESET support is enabled for the RAA215300 PMIC, we need to bind the raa215300_sysreset driver as a child device of the PMIC. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/pmic/raa215300.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/power/pmic/raa215300.c b/drivers/power/pmic/raa215300.c
index b93a0d3..a581a1f 100644
--- a/drivers/power/pmic/raa215300.c
+++ b/drivers/power/pmic/raa215300.c
@@ -29,6 +29,15 @@ static const struct udevice_id raa215300_ids[] = {
static int raa215300_bind(struct udevice *dev)
{
+ if (IS_ENABLED(CONFIG_SYSRESET_RAA215300)) {
+ struct driver *drv = lists_driver_lookup_name("raa215300_sysreset");
+ if (!drv)
+ return -ENOENT;
+
+ return device_bind(dev, drv, dev->name, NULL, dev_ofnode(dev),
+ NULL);
+ }
+
return 0;
}