Lines Matching +full:rave +full:- +full:wdt

1 // SPDX-License-Identifier: GPL-2.0+
4 * Driver for watchdog aspect of for Zodiac Inflight Innovations RAVE
13 #include <linux/mfd/rave-sp.h>
15 #include <linux/nvmem-consumer.h>
29 * struct rave_sp_wdt_variant - RAVE SP watchdog variant
46 * struct rave_sp_wdt - RAVE SP watchdog
49 * @sp: Pointer to parent RAVE SP device
68 return rave_sp_exec(to_rave_sp_wdt(wdd)->sp, in rave_sp_wdt_exec()
79 [4] = on ? wdd->timeout : 0, in rave_sp_wdt_legacy_configure()
91 [3] = (u8)wdd->timeout, in rave_sp_wdt_rdu_configure()
92 [4] = (u8)(wdd->timeout >> 8), in rave_sp_wdt_rdu_configure()
99 * rave_sp_wdt_configure - Configure watchdog device
106 * - Wheither it is ON or OFF
107 * - Its timeout duration
110 * the value of 'wdd->timeout'.
114 return to_rave_sp_wdt(wdd)->variant->configure(wdd, on); in rave_sp_wdt_configure()
154 const int ret = sp_wd->variant->restart(&sp_wd->wdd); in rave_sp_wdt_reboot_notifier()
157 dev_err(sp_wd->wdd.parent, in rave_sp_wdt_reboot_notifier()
176 return -EIO; in rave_sp_wdt_restart()
185 set_bit(WDOG_HW_RUNNING, &wdd->status); in rave_sp_wdt_start()
198 wdd->timeout = timeout; in rave_sp_wdt_set_timeout()
215 .identity = "RAVE SP Watchdog",
243 .compatible = "zii,rave-sp-watchdog-legacy",
247 .compatible = "zii,rave-sp-watchdog",
255 struct device *dev = &pdev->dev; in rave_sp_wdt_probe()
264 return -ENOMEM; in rave_sp_wdt_probe()
266 sp_wd->variant = of_device_get_match_data(dev); in rave_sp_wdt_probe()
267 sp_wd->sp = dev_get_drvdata(dev->parent); in rave_sp_wdt_probe()
269 wdd = &sp_wd->wdd; in rave_sp_wdt_probe()
270 wdd->parent = dev; in rave_sp_wdt_probe()
271 wdd->info = &rave_sp_wdt_info; in rave_sp_wdt_probe()
272 wdd->ops = &rave_sp_wdt_ops; in rave_sp_wdt_probe()
273 wdd->min_timeout = sp_wd->variant->min_timeout; in rave_sp_wdt_probe()
274 wdd->max_timeout = sp_wd->variant->max_timeout; in rave_sp_wdt_probe()
275 wdd->status = WATCHDOG_NOWAYOUT_INIT_STATUS; in rave_sp_wdt_probe()
276 wdd->timeout = 60; in rave_sp_wdt_probe()
278 cell = nvmem_cell_get(dev, "wdt-timeout"); in rave_sp_wdt_probe()
293 sp_wd->reboot_notifier.notifier_call = rave_sp_wdt_reboot_notifier; in rave_sp_wdt_probe()
294 ret = devm_register_reboot_notifier(dev, &sp_wd->reboot_notifier); in rave_sp_wdt_probe()
304 wdd->max_hw_heartbeat_ms = wdd->max_timeout * 1000; in rave_sp_wdt_probe()
335 MODULE_DESCRIPTION("RAVE SP Watchdog driver");
336 MODULE_ALIAS("platform:rave-sp-watchdog");