summaryrefslogtreecommitdiff
path: root/drivers/ddr/imx/phy/ddrphy_train.c
diff options
context:
space:
mode:
authorRasmus Villemoes <ravi@prevas.dk>2024-10-02 21:23:23 +0200
committerStefan Roese <sr@denx.de>2024-10-23 06:52:38 +0200
commit7f3d53c8bf3b851837dc2f5dd85e0c6a0d0116a1 (patch)
tree44db470acb9ffdd9d210dd7fca7d0a851ce25284 /drivers/ddr/imx/phy/ddrphy_train.c
parent392ff1449f7d30cc48fd4d17320d05882cd68f2e (diff)
watchdog: gpio_wdt: add support for stoppable devices
Back when I added this driver in commit 2ac8490412c9, I wrote The corresponding linux driver apparently has support for some watchdog circuits which can be disabled by tri-stating the gpio, but I have never actually encountered such a chip in the wild; That has changed now; I have a board with just such a watchdog on my desk currently. Add support for that. - For a hw_algo="toggle" device, the gpio is requested as output if the always-running flag is set, otherwise as input. - The ->start() method is updated to change the direction to output when required (i.e. it is not always-running). - The ->stop() method is implemented, but of course reports failure if always-running. As I still haven't met any hw_algo="level" devices, I'm not entirely sure how they fit in, but I'm borrowing logic from the corresponding linux driver: - In ->probe(), such devices always request the gpio as GPIOD_IS_OUT. - In ->stop(), the linux driver has an "eternal ping" comment and sets the gpio to (logic) high. Stefan: Added necessary changes in test/dm/wdt.c to fix CI build breakage, as suggested by Rasmus. Signed-off-by: Rasmus Villemoes <ravi@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/ddr/imx/phy/ddrphy_train.c')
0 files changed, 0 insertions, 0 deletions