wdt: Update uclass to make clear that the timeout is in ms

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>
This commit is contained in:
Andy Shevchenko 2017-08-04 15:48:28 -06:00 committed by Tom Rini
parent 160cfc4b5a
commit ffdec3000a
2 changed files with 6 additions and 6 deletions

View file

@ -13,14 +13,14 @@
DECLARE_GLOBAL_DATA_PTR; 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); const struct wdt_ops *ops = device_get_ops(dev);
if (!ops->start) if (!ops->start)
return -ENOSYS; return -ENOSYS;
return ops->start(dev, timeout, flags); return ops->start(dev, timeout_ms, flags);
} }
int wdt_stop(struct udevice *dev) int wdt_stop(struct udevice *dev)

View file

@ -21,12 +21,12 @@
* Start the timer * Start the timer
* *
* @dev: WDT Device * @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 * @flags: Driver specific flags. This might be used to specify
* which action needs to be executed when the timer expires * which action needs to be executed when the timer expires
* @return: 0 if OK, -ve on error * @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. * Stop the timer, thus disabling the Watchdog. Use wdt_start to start it again.
@ -67,12 +67,12 @@ struct wdt_ops {
* Start the timer * Start the timer
* *
* @dev: WDT Device * @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 * @flags: Driver specific flags. This might be used to specify
* which action needs to be executed when the timer expires * which action needs to be executed when the timer expires
* @return: 0 if OK, -ve on error * @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 * Stop the timer
* *