Lines Matching full:wdd

34 static int smcwd_call(struct watchdog_device *wdd, enum smcwd_call call,  in smcwd_call()  argument
42 arm_smccc_smc((u32)(uintptr_t)watchdog_get_drvdata(wdd), call, arg, 0, in smcwd_call()
54 static int smcwd_ping(struct watchdog_device *wdd) in smcwd_ping() argument
56 return smcwd_call(wdd, SMCWD_PET, 0, NULL); in smcwd_ping()
59 static unsigned int smcwd_get_timeleft(struct watchdog_device *wdd) in smcwd_get_timeleft() argument
63 smcwd_call(wdd, SMCWD_GET_TIMELEFT, 0, &res); in smcwd_get_timeleft()
69 static int smcwd_set_timeout(struct watchdog_device *wdd, unsigned int timeout) in smcwd_set_timeout() argument
73 res = smcwd_call(wdd, SMCWD_SET_TIMEOUT, timeout, NULL); in smcwd_set_timeout()
75 wdd->timeout = timeout; in smcwd_set_timeout()
79 static int smcwd_stop(struct watchdog_device *wdd) in smcwd_stop() argument
81 return smcwd_call(wdd, SMCWD_ENABLE, 0, NULL); in smcwd_stop()
84 static int smcwd_start(struct watchdog_device *wdd) in smcwd_start() argument
86 return smcwd_call(wdd, SMCWD_ENABLE, 1, NULL); in smcwd_start()
113 struct watchdog_device *wdd; in smcwd_probe() local
118 wdd = devm_kzalloc(&pdev->dev, sizeof(*wdd), GFP_KERNEL); in smcwd_probe()
119 if (!wdd) in smcwd_probe()
121 platform_set_drvdata(pdev, wdd); in smcwd_probe()
126 watchdog_set_drvdata(wdd, (void *)(uintptr_t)smc_func_id); in smcwd_probe()
128 err = smcwd_call(wdd, SMCWD_INIT, 0, &res); in smcwd_probe()
132 wdd->info = &smcwd_info; in smcwd_probe()
134 if (smcwd_call(wdd, SMCWD_GET_TIMELEFT, 0, NULL)) in smcwd_probe()
135 wdd->ops = &smcwd_ops; in smcwd_probe()
137 wdd->ops = &smcwd_timeleft_ops; in smcwd_probe()
138 wdd->timeout = res.a2; in smcwd_probe()
139 wdd->max_timeout = res.a2; in smcwd_probe()
140 wdd->min_timeout = res.a1; in smcwd_probe()
141 wdd->parent = &pdev->dev; in smcwd_probe()
143 watchdog_stop_on_reboot(wdd); in smcwd_probe()
144 watchdog_stop_on_unregister(wdd); in smcwd_probe()
145 watchdog_set_nowayout(wdd, nowayout); in smcwd_probe()
146 watchdog_init_timeout(wdd, timeout, &pdev->dev); in smcwd_probe()
147 err = smcwd_set_timeout(wdd, wdd->timeout); in smcwd_probe()
151 err = devm_watchdog_register_device(&pdev->dev, wdd); in smcwd_probe()
157 wdd->timeout, nowayout); in smcwd_probe()