| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright(C) 2023 Svyatoslav Ryhel <clamor95@gmail.com> |
| #include <power/tps65910_pmic.h> |
| static int tps65910_sysreset_request(struct udevice *dev, |
| val = pmic_reg_read(dev->parent, TPS65910_REG_DEVICE_CTRL); |
| /* define power-off to be sequential */ |
| pmic_reg_write(dev->parent, TPS65910_REG_DEVICE_CTRL, val); |
| /* TPS65910: DEV_OFF_RST > DEVICE_CTRL */ |
| pmic_reg_write(dev->parent, TPS65910_REG_DEVICE_CTRL, |
| /* TPS65910: DEV_OFF > DEVICE_CTRL */ |
| pmic_reg_write(dev->parent, TPS65910_REG_DEVICE_CTRL, |
| static struct sysreset_ops tps65910_sysreset = { |
| .request = tps65910_sysreset_request, |
| U_BOOT_DRIVER(sysreset_tps65910) = { |
| .name = TPS65910_RST_DRIVER, |
| .ops = &tps65910_sysreset, |