Re: [PATCH] watchdog: meson: Fix the wrong value of left time

From: Kevin Hilman
Date: Thu Oct 03 2019 - 13:35:27 EST


Xingyu Chen <xingyu.chen@xxxxxxxxxxx> writes:

> The left time value is wrong when we get it by sysfs. The left time value
> should be equal to preset timeout value minus elapsed time value. According
> to the Meson-GXB/GXL datasheets which can be found at [0], the timeout value
> is saved to BIT[0-15] of the WATCHDOG_TCNT, and elapsed time value is saved
> to BIT[16-31] of the WATCHDOG_TCNT.
>
> [0]: http://linux-meson.com
>
> Fixes: 683fa50f0e18 ("watchdog: Add Meson GXBB Watchdog Driver")
> Signed-off-by: Xingyu Chen <xingyu.chen@xxxxxxxxxxx>

Reviewed-by: Kevin Hilman <khilman@xxxxxxxxxxxx>