/linux-6.3-rc2/drivers/watchdog/ |
A D | watchdog_dev.c | 267 err = wdd->ops->start(wdd); in watchdog_start() 306 err = wdd->ops->stop(wdd); in watchdog_stop() 336 status = wdd->ops->status(wdd); in watchdog_get_status() 384 if (wdd->pretimeout >= wdd->timeout) in watchdog_set_timeout() 437 *timeleft = wdd->ops->get_timeleft(wdd); in watchdog_get_timeleft() 680 return wdd->ops->ioctl(wdd, cmd, arg); in watchdog_ioctl_op() 726 wdd = wd_data->wdd; in watchdog_write() 761 wdd = wd_data->wdd; in watchdog_ioctl() 881 wdd = wd_data->wdd; in watchdog_open() 950 wdd = wd_data->wdd; in watchdog_release() [all …]
|
A D | watchdog_core.c | 94 if (!wdd->max_hw_heartbeat_ms && wdd->min_timeout > wdd->max_timeout) { in watchdog_check_min_max_timeout() 121 const char *dev_str = wdd->parent ? dev_name(wdd->parent) : in watchdog_init_timeout() 165 if (watchdog_active(wdd) || watchdog_hw_running(wdd)) { in watchdog_reboot_notifier() 168 ret = wdd->ops->stop(wdd); in watchdog_reboot_notifier() 186 ret = wdd->ops->restart(wdd, action, data); in watchdog_restart_notifier() 244 if (wdd == NULL || wdd->info == NULL || wdd->ops == NULL) in __watchdog_register_device() 248 if (!wdd->ops->start || (!wdd->ops->stop && !wdd->max_hw_heartbeat_ms)) in __watchdog_register_device() 272 wdd->id = id; in __watchdog_register_device() 284 wdd->id = id; in __watchdog_register_device() 363 dev_str = wdd->parent ? dev_name(wdd->parent) : in watchdog_register_device() [all …]
|
A D | rave-sp-wdt.c | 54 struct watchdog_device wdd; member 62 return container_of(wdd, struct rave_sp_wdt, wdd); in to_rave_sp_wdt() 91 [3] = (u8)wdd->timeout, in rave_sp_wdt_rdu_configure() 114 return to_rave_sp_wdt(wdd)->variant->configure(wdd, on); in rave_sp_wdt_configure() 198 wdd->timeout = timeout; in rave_sp_wdt_set_timeout() 200 return rave_sp_wdt_configure(wdd, watchdog_active(wdd)); in rave_sp_wdt_set_timeout() 269 wdd = &sp_wd->wdd; in rave_sp_wdt_probe() 270 wdd->parent = dev; in rave_sp_wdt_probe() 276 wdd->timeout = 60; in rave_sp_wdt_probe() 304 wdd->max_hw_heartbeat_ms = wdd->max_timeout * 1000; in rave_sp_wdt_probe() [all …]
|
A D | npcm_wdt.c | 52 return container_of(wdd, struct npcm_wdt, wdd); in to_npcm_wdt() 118 wdd->timeout = 1; in npcm_wdt_set_timeout() 120 wdd->timeout = 2; in npcm_wdt_set_timeout() 122 wdd->timeout = 5; in npcm_wdt_set_timeout() 124 wdd->timeout = 10; in npcm_wdt_set_timeout() 126 wdd->timeout = 21; in npcm_wdt_set_timeout() 128 wdd->timeout = 43; in npcm_wdt_set_timeout() 130 wdd->timeout = 86; in npcm_wdt_set_timeout() 132 wdd->timeout = 172; in npcm_wdt_set_timeout() 134 wdd->timeout = 687; in npcm_wdt_set_timeout() [all …]
|
A D | arm_smc_wdt.c | 75 wdd->timeout = timeout; in smcwd_set_timeout() 118 wdd = devm_kzalloc(&pdev->dev, sizeof(*wdd), GFP_KERNEL); in smcwd_probe() 119 if (!wdd) in smcwd_probe() 132 wdd->info = &smcwd_info; in smcwd_probe() 135 wdd->ops = &smcwd_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() 147 err = smcwd_set_timeout(wdd, wdd->timeout); in smcwd_probe() [all …]
|
A D | da9063_wdt.c | 160 if (watchdog_active(wdd)) in da9063_wdt_set_timeout() 219 struct watchdog_device *wdd; in da9063_wdt_probe() local 229 wdd = devm_kzalloc(dev, sizeof(*wdd), GFP_KERNEL); in da9063_wdt_probe() 230 if (!wdd) in da9063_wdt_probe() 240 wdd->parent = dev; in da9063_wdt_probe() 245 dev_set_drvdata(dev, wdd); in da9063_wdt_probe() 252 wdd->timeout = timeout; in da9063_wdt_probe() 256 da9063_wdt_set_timeout(wdd, wdd->timeout); in da9063_wdt_probe() 274 if (watchdog_active(wdd)) in da9063_wdt_suspend() 275 return da9063_wdt_stop(wdd); in da9063_wdt_suspend() [all …]
|
A D | bcm47xx_wdt.c | 45 return container_of(wdd, struct bcm47xx_wdt, wdd); in bcm47xx_wdt_get() 83 wdd->timeout = new_time; in bcm47xx_wdt_hard_set_timeout() 132 bcm47xx_wdt_soft_keepalive(wdd); in bcm47xx_wdt_soft_start() 157 wdd->timeout = new_time; in bcm47xx_wdt_soft_set_timeout() 189 wdt->wdd.ops = &bcm47xx_wdt_soft_ops; in bcm47xx_wdt_probe() 192 wdt->wdd.ops = &bcm47xx_wdt_hard_ops; in bcm47xx_wdt_probe() 195 wdt->wdd.info = &bcm47xx_wdt_info; in bcm47xx_wdt_probe() 196 wdt->wdd.timeout = WDT_DEFAULT_TIME; in bcm47xx_wdt_probe() 197 wdt->wdd.parent = &pdev->dev; in bcm47xx_wdt_probe() 198 ret = wdt->wdd.ops->set_timeout(&wdt->wdd, timeout); in bcm47xx_wdt_probe() [all …]
|
A D | tegra_wdt.c | 60 struct watchdog_device wdd; member 133 wdd->timeout = timeout; in tegra_wdt_set_timeout() 135 if (watchdog_active(wdd)) { in tegra_wdt_set_timeout() 136 tegra_wdt_stop(wdd); in tegra_wdt_set_timeout() 185 struct watchdog_device *wdd; in tegra_wdt_probe() local 208 wdd = &wdt->wdd; in tegra_wdt_probe() 209 wdd->timeout = heartbeat; in tegra_wdt_probe() 210 wdd->info = &tegra_wdt_info; in tegra_wdt_probe() 211 wdd->ops = &tegra_wdt_ops; in tegra_wdt_probe() 214 wdd->parent = dev; in tegra_wdt_probe() [all …]
|
A D | qcom-wdt.c | 48 struct watchdog_device wdd; member 62 return container_of(wdd, struct qcom_wdt, wdd); in to_qcom_wdt() 77 unsigned int bark = wdd->timeout - wdd->pretimeout; in qcom_wdt_start() 106 wdd->timeout = timeout; in qcom_wdt_set_timeout() 107 return qcom_wdt_start(wdd); in qcom_wdt_set_timeout() 113 wdd->pretimeout = timeout; in qcom_wdt_set_pretimeout() 114 return qcom_wdt_start(wdd); in qcom_wdt_set_pretimeout() 254 wdt->wdd.pretimeout = 1; in qcom_wdt_probe() 263 wdt->wdd.min_timeout = 1; in qcom_wdt_probe() 265 wdt->wdd.parent = dev; in qcom_wdt_probe() [all …]
|
A D | sl28cpld_wdt.c | 41 struct watchdog_device wdd; member 101 wdd->timeout = timeout; in sl28cpld_wdt_set_timeout() 122 struct watchdog_device *wdd; in sl28cpld_wdt_probe() local 147 wdd = &wdt->wdd; in sl28cpld_wdt_probe() 148 wdd->parent = &pdev->dev; in sl28cpld_wdt_probe() 150 wdd->ops = &sl28cpld_wdt_ops; in sl28cpld_wdt_probe() 151 wdd->min_timeout = 1; in sl28cpld_wdt_probe() 152 wdd->max_timeout = 255; in sl28cpld_wdt_probe() 179 wdd->timeout = val; in sl28cpld_wdt_probe() 184 sl28cpld_wdt_set_timeout(wdd, wdd->timeout); in sl28cpld_wdt_probe() [all …]
|
A D | sbsa_gwdt.c | 88 struct watchdog_device wdd; member 152 wdd->timeout = timeout; in sbsa_gwdt_set_timeout() 262 struct watchdog_device *wdd; in sbsa_gwdt_probe() local 289 wdd = &gwdt->wdd; in sbsa_gwdt_probe() 290 wdd->parent = dev; in sbsa_gwdt_probe() 291 wdd->info = &sbsa_gwdt_info; in sbsa_gwdt_probe() 292 wdd->ops = &sbsa_gwdt_ops; in sbsa_gwdt_probe() 293 wdd->min_timeout = 1; in sbsa_gwdt_probe() 297 sbsa_gwdt_get_version(wdd); in sbsa_gwdt_probe() 345 sbsa_gwdt_set_timeout(wdd, wdd->timeout); in sbsa_gwdt_probe() [all …]
|
A D | ts72xx_wdt.c | 47 struct watchdog_device wdd; member 97 wdd->timeout = to; in ts72xx_wdt_settimeout() 99 if (watchdog_active(wdd)) { in ts72xx_wdt_settimeout() 100 ts72xx_wdt_stop(wdd); in ts72xx_wdt_settimeout() 101 ts72xx_wdt_start(wdd); in ts72xx_wdt_settimeout() 127 struct watchdog_device *wdd; in ts72xx_wdt_probe() local 142 wdd = &priv->wdd; in ts72xx_wdt_probe() 143 wdd->info = &ts72xx_wdt_ident; in ts72xx_wdt_probe() 144 wdd->ops = &ts72xx_wdt_ops; in ts72xx_wdt_probe() 145 wdd->min_timeout = 1; in ts72xx_wdt_probe() [all …]
|
A D | rti_wdt.c | 66 struct watchdog_device wdd; member 88 wdd->min_hw_heartbeat_ms = 500 * wdd->timeout; in rti_wdt_start() 197 struct watchdog_device *wdd; in rti_wdt_probe() local 236 wdd = &wdt->wdd; in rti_wdt_probe() 237 wdd->info = &rti_wdt_info; in rti_wdt_probe() 238 wdd->ops = &rti_wdt_ops; in rti_wdt_probe() 239 wdd->min_timeout = 1; in rti_wdt_probe() 242 wdd->parent = dev; in rti_wdt_probe() 244 watchdog_set_drvdata(wdd, wdt); in rti_wdt_probe() 245 watchdog_set_nowayout(wdd, 1); in rti_wdt_probe() [all …]
|
A D | ts4800_wdt.c | 31 struct watchdog_device wdd; member 114 struct watchdog_device *wdd; in ts4800_wdt_probe() local 149 wdd = &wdt->wdd; in ts4800_wdt_probe() 150 wdd->parent = dev; in ts4800_wdt_probe() 151 wdd->info = &ts4800_wdt_info; in ts4800_wdt_probe() 152 wdd->ops = &ts4800_wdt_ops; in ts4800_wdt_probe() 166 if (!wdd->timeout) in ts4800_wdt_probe() 167 wdd->timeout = wdd->max_timeout; in ts4800_wdt_probe() 168 ts4800_wdt_set_timeout(wdd, wdd->timeout); in ts4800_wdt_probe() 174 ts4800_wdt_stop(wdd); in ts4800_wdt_probe() [all …]
|
A D | apple_wdt.c | 57 struct watchdog_device wdd; member 64 return container_of(wdd, struct apple_wdt, wdd); in to_apple_wdt() 69 struct apple_wdt *wdt = to_apple_wdt(wdd); in apple_wdt_start() 79 struct apple_wdt *wdt = to_apple_wdt(wdd); in apple_wdt_stop() 88 struct apple_wdt *wdt = to_apple_wdt(wdd); in apple_wdt_ping() 97 struct apple_wdt *wdt = to_apple_wdt(wdd); in apple_wdt_set_timeout() 102 wdd->timeout = s; in apple_wdt_set_timeout() 176 wdt->wdd.ops = &apple_wdt_ops; in apple_wdt_probe() 177 wdt->wdd.info = &apple_wdt_info; in apple_wdt_probe() 186 apple_wdt_set_timeout(&wdt->wdd, wdt->wdd.timeout); in apple_wdt_probe() [all …]
|
A D | gxp-wdt.c | 26 struct watchdog_device wdd; member 38 static int gxp_wdt_start(struct watchdog_device *wdd) in gxp_wdt_start() argument 47 static int gxp_wdt_stop(struct watchdog_device *wdd) in gxp_wdt_stop() argument 64 wdd->timeout = timeout; in gxp_wdt_set_timeout() 136 drvdata->wdd.info = &gxp_wdt_info; in gxp_wdt_probe() 137 drvdata->wdd.ops = &gxp_wdt_ops; in gxp_wdt_probe() 139 drvdata->wdd.parent = dev; in gxp_wdt_probe() 140 drvdata->wdd.timeout = WDT_DEFAULT_TIMEOUT; in gxp_wdt_probe() 142 watchdog_set_drvdata(&drvdata->wdd, drvdata); in gxp_wdt_probe() 148 set_bit(WDOG_HW_RUNNING, &drvdata->wdd.status); in gxp_wdt_probe() [all …]
|
A D | ep93xx_wdt.c | 45 struct watchdog_device wdd; member 94 struct watchdog_device *wdd; in ep93xx_wdt_probe() local 108 wdd = &priv->wdd; in ep93xx_wdt_probe() 110 wdd->info = &ep93xx_wdt_ident; in ep93xx_wdt_probe() 111 wdd->ops = &ep93xx_wdt_ops; in ep93xx_wdt_probe() 112 wdd->min_timeout = 1; in ep93xx_wdt_probe() 113 wdd->max_hw_heartbeat_ms = 200; in ep93xx_wdt_probe() 114 wdd->parent = dev; in ep93xx_wdt_probe() 116 watchdog_set_nowayout(wdd, nowayout); in ep93xx_wdt_probe() 118 wdd->timeout = WDT_TIMEOUT; in ep93xx_wdt_probe() [all …]
|
A D | sp805_wdt.c | 68 struct watchdog_device wdd; member 187 return wdt_config(wdd, true); in wdt_ping() 193 return wdt_config(wdd, false); in wdt_enable() 268 wdt->wdd.info = &wdt_info; in sp805_wdt_probe() 269 wdt->wdd.ops = &wdt_ops; in sp805_wdt_probe() 270 wdt->wdd.parent = &adev->dev; in sp805_wdt_probe() 284 wdt_setload(&wdt->wdd, wdt->wdd.timeout); in sp805_wdt_probe() 291 wdt_enable(&wdt->wdd); in sp805_wdt_probe() 321 if (watchdog_active(&wdt->wdd)) in sp805_wdt_suspend() 322 return wdt_disable(&wdt->wdd); in sp805_wdt_suspend() [all …]
|
A D | asm9260_wdt.c | 56 struct watchdog_device wdd; member 109 asm9260_wdt_updatetimeout(wdd); in asm9260_wdt_enable() 111 asm9260_wdt_feed(wdd); in asm9260_wdt_enable() 129 wdd->timeout = to; in asm9260_wdt_settimeout() 143 asm9260_wdt_feed(&priv->wdd); in asm9260_wdt_sys_reset() 289 struct watchdog_device *wdd; in asm9260_wdt_probe() local 311 wdd = &priv->wdd; in asm9260_wdt_probe() 313 wdd->ops = &asm9260_wdt_ops; in asm9260_wdt_probe() 314 wdd->min_timeout = 1; in asm9260_wdt_probe() 316 wdd->parent = dev; in asm9260_wdt_probe() [all …]
|
A D | ixp4xx_wdt.c | 24 struct watchdog_device wdd; member 48 return container_of(wdd, struct ixp4xx_wdt, wdd); in to_ixp4xx_wdt() 57 __raw_writel(wdd->timeout * iwdt->rate, in ixp4xx_wdt_start() 80 wdd->timeout = timeout; in ixp4xx_wdt_set_timeout() 81 if (watchdog_active(wdd)) in ixp4xx_wdt_set_timeout() 82 ixp4xx_wdt_start(wdd); in ixp4xx_wdt_set_timeout() 155 iwdt->wdd.info = &ixp4xx_wdt_info; in ixp4xx_wdt_probe() 156 iwdt->wdd.ops = &ixp4xx_wdt_ops; in ixp4xx_wdt_probe() 157 iwdt->wdd.min_timeout = 1; in ixp4xx_wdt_probe() 159 iwdt->wdd.parent = dev; in ixp4xx_wdt_probe() [all …]
|
A D | tqmx86_wdt.c | 28 struct watchdog_device wdd; member 54 wdd->timeout = t; in tqmx86_wdt_set_timeout() 90 watchdog_set_drvdata(&priv->wdd, priv); in tqmx86_wdt_probe() 92 priv->wdd.parent = dev; in tqmx86_wdt_probe() 93 priv->wdd.info = &tqmx86_wdt_info; in tqmx86_wdt_probe() 94 priv->wdd.ops = &tqmx86_wdt_ops; in tqmx86_wdt_probe() 95 priv->wdd.min_timeout = 1; in tqmx86_wdt_probe() 96 priv->wdd.max_timeout = 4096; in tqmx86_wdt_probe() 97 priv->wdd.max_hw_heartbeat_ms = 4096*1000; in tqmx86_wdt_probe() 98 priv->wdd.timeout = WDT_TIMEOUT; in tqmx86_wdt_probe() [all …]
|
A D | ftwdt010_wdt.c | 38 struct watchdog_device wdd; member 47 return container_of(wdd, struct ftwdt010_wdt, wdd); in to_ftwdt010_wdt() 96 wdd->timeout = timeout; in ftwdt010_wdt_set_timeout() 97 if (watchdog_active(wdd)) in ftwdt010_wdt_set_timeout() 98 ftwdt010_wdt_start(wdd); in ftwdt010_wdt_set_timeout() 153 gwdt->wdd.info = &ftwdt010_wdt_info; in ftwdt010_wdt_probe() 154 gwdt->wdd.ops = &ftwdt010_wdt_ops; in ftwdt010_wdt_probe() 155 gwdt->wdd.min_timeout = 1; in ftwdt010_wdt_probe() 157 gwdt->wdd.parent = dev; in ftwdt010_wdt_probe() 163 gwdt->wdd.timeout = 13U; in ftwdt010_wdt_probe() [all …]
|
A D | stm32_iwdg.c | 69 struct watchdog_device wdd; member 96 wdd->min_timeout, wdd->max_hw_heartbeat_ms / 1000); in stm32_iwdg_start() 145 wdd->timeout = timeout; in stm32_iwdg_set_timeout() 147 if (watchdog_active(wdd)) in stm32_iwdg_set_timeout() 148 return stm32_iwdg_start(wdd); in stm32_iwdg_set_timeout() 226 struct watchdog_device *wdd; in stm32_iwdg_probe() local 248 wdd = &wdt->wdd; in stm32_iwdg_probe() 249 wdd->parent = dev; in stm32_iwdg_probe() 250 wdd->info = &stm32_iwdg_info; in stm32_iwdg_probe() 251 wdd->ops = &stm32_iwdg_ops; in stm32_iwdg_probe() [all …]
|
A D | nic7018_wdt.c | 48 struct watchdog_device wdd; member 109 nic7018_set_timeout(wdd, wdd->timeout); in nic7018_start() 171 struct watchdog_device *wdd; in nic7018_probe() local 195 wdd = &wdt->wdd; in nic7018_probe() 196 wdd->info = &nic7018_wdd_info; in nic7018_probe() 197 wdd->ops = &nic7018_wdd_ops; in nic7018_probe() 198 wdd->min_timeout = WDT_MIN_TIMEOUT; in nic7018_probe() 199 wdd->max_timeout = WDT_MAX_TIMEOUT; in nic7018_probe() 200 wdd->timeout = WDT_DEFAULT_TIMEOUT; in nic7018_probe() 201 wdd->parent = dev; in nic7018_probe() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | watchdog.h | 130 return test_bit(WDOG_ACTIVE, &wdd->status); in watchdog_active() 139 return test_bit(WDOG_HW_RUNNING, &wdd->status); in watchdog_hw_running() 146 set_bit(WDOG_NO_WAY_OUT, &wdd->status); in watchdog_set_nowayout() 152 set_bit(WDOG_STOP_ON_REBOOT, &wdd->status); in watchdog_stop_on_reboot() 158 set_bit(WDOG_STOP_ON_UNREGISTER, &wdd->status); in watchdog_stop_on_unregister() 164 set_bit(WDOG_NO_PING_ON_SUSPEND, &wdd->status); in watchdog_stop_ping_on_suspend() 182 (!wdd->max_hw_heartbeat_ms && wdd->max_timeout && in watchdog_timeout_invalid() 183 t > wdd->max_timeout); in watchdog_timeout_invalid() 190 return t && wdd->timeout && t >= wdd->timeout; in watchdog_pretimeout_invalid() 196 wdd->driver_data = data; in watchdog_set_drvdata() [all …]
|