]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
wdt: Update uclass to make clear that the timeout is in ms
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 4 Aug 2017 21:48:28 +0000 (15:48 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 13 Aug 2017 19:17:34 +0000 (15:17 -0400)
Convert name to show explicitly that we are using milliseconds. For a
watchdog timer this is precise enough.

No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/watchdog/wdt-uclass.c
include/wdt.h

index bb9ae808666f577bef796ab277f1ea8a8e20d6e8..8a30f024fdbf9511785ad206a28e9942953f37e9 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int wdt_start(struct udevice *dev, u64 timeout, ulong flags)
+int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags)
 {
        const struct wdt_ops *ops = device_get_ops(dev);
 
        if (!ops->start)
                return -ENOSYS;
 
-       return ops->start(dev, timeout, flags);
+       return ops->start(dev, timeout_ms, flags);
 }
 
 int wdt_stop(struct udevice *dev)
index 0b5f05851a33c0e7527d30958a86e2214a9469e4..9b90fbeeb3a304d44ce1149ffd7d1dc9899cc3c3 100644 (file)
  * Start the timer
  *
  * @dev: WDT Device
- * @timeout: Number of ticks before timer expires
+ * @timeout_ms: Number of ticks (milliseconds) before timer expires
  * @flags: Driver specific flags. This might be used to specify
  * which action needs to be executed when the timer expires
  * @return: 0 if OK, -ve on error
  */
-int wdt_start(struct udevice *dev, u64 timeout, ulong flags);
+int wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags);
 
 /*
  * Stop the timer, thus disabling the Watchdog. Use wdt_start to start it again.
@@ -67,12 +67,12 @@ struct wdt_ops {
         * Start the timer
         *
         * @dev: WDT Device
-        * @timeout: Number of ticks before the timer expires
+        * @timeout_ms: Number of ticks (milliseconds) before the timer expires
         * @flags: Driver specific flags. This might be used to specify
         * which action needs to be executed when the timer expires
         * @return: 0 if OK, -ve on error
         */
-       int (*start)(struct udevice *dev, u64 timeout, ulong flags);
+       int (*start)(struct udevice *dev, u64 timeout_ms, ulong flags);
        /*
         * Stop the timer
         *