aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorSvyatoslav Ryhel <clamor95@gmail.com>2023-10-24 10:49:06 +0300
committerTom Rini <trini@konsulko.com>2023-11-03 17:41:54 -0400
commit9d937cdc2ce831adfef969ced5e35b72a3131dea (patch)
treeee11de56b5133cd24222b71456ff30d9b86028f1 /drivers/power
parentfa1e72ea3d62f561fb990113ce404ad603d61e83 (diff)
downloadu-boot-9d937cdc2ce831adfef969ced5e35b72a3131dea.tar.gz
sysreset: implement TPS80031 sysreset functions
TPS80031/TPS80032 PMICs have embedded power control functions used by some device to initiane device power off. Implement it as sysreset driver. Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/pmic/tps80031.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/power/pmic/tps80031.c b/drivers/power/pmic/tps80031.c
index 6b36ebbf7db..a2f935b0c6d 100644
--- a/drivers/power/pmic/tps80031.c
+++ b/drivers/power/pmic/tps80031.c
@@ -44,7 +44,16 @@ static int tps80031_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
static int tps80031_bind(struct udevice *dev)
{
ofnode regulators_node;
- int children;
+ int children, ret;
+
+ if (IS_ENABLED(CONFIG_SYSRESET_TPS80031)) {
+ ret = device_bind_driver(dev, TPS80031_RST_DRIVER,
+ "sysreset", NULL);
+ if (ret) {
+ log_err("cannot bind SYSRESET (ret = %d)\n", ret);
+ return ret;
+ }
+ }
regulators_node = dev_read_subnode(dev, "regulators");
if (!ofnode_valid(regulators_node)) {