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>
This commit is contained in:
Paul Barker
2024-02-28 18:42:27 +01:00
committed by Marek Vasut
parent 167eb89a21
commit a79f96112b
+9
View File
@@ -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;
}