Lines Matching refs:wdd
43 static inline struct bcm47xx_wdt *bcm47xx_wdt_get(struct watchdog_device *wdd)
45 return container_of(wdd, struct bcm47xx_wdt, wdd);
48 static int bcm47xx_wdt_hard_keepalive(struct watchdog_device *wdd)
50 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
52 wdt->timer_set_ms(wdt, wdd->timeout * 1000);
57 static int bcm47xx_wdt_hard_start(struct watchdog_device *wdd)
62 static int bcm47xx_wdt_hard_stop(struct watchdog_device *wdd)
64 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
71 static int bcm47xx_wdt_hard_set_timeout(struct watchdog_device *wdd,
74 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
83 wdd->timeout = new_time;
87 static int bcm47xx_wdt_restart(struct watchdog_device *wdd,
90 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
109 u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms);
119 static int bcm47xx_wdt_soft_keepalive(struct watchdog_device *wdd)
121 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
123 atomic_set(&wdt->soft_ticks, wdd->timeout);
128 static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd)
130 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
132 bcm47xx_wdt_soft_keepalive(wdd);
138 static int bcm47xx_wdt_soft_stop(struct watchdog_device *wdd)
140 struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd);
148 static int bcm47xx_wdt_soft_set_timeout(struct watchdog_device *wdd,
157 wdd->timeout = new_time;
189 wdt->wdd.ops = &bcm47xx_wdt_soft_ops;
192 wdt->wdd.ops = &bcm47xx_wdt_hard_ops;
195 wdt->wdd.info = &bcm47xx_wdt_info;
196 wdt->wdd.timeout = WDT_DEFAULT_TIME;
197 wdt->wdd.parent = &pdev->dev;
198 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout);
201 watchdog_set_nowayout(&wdt->wdd, nowayout);
202 watchdog_set_restart_priority(&wdt->wdd, 64);
203 watchdog_stop_on_reboot(&wdt->wdd);
205 ret = devm_watchdog_register_device(&pdev->dev, &wdt->wdd);