Lines Matching +full:ping +full:- +full:gpios
1 // SPDX-License-Identifier: GPL-2.0-only
10 * the case for the Arcom Zeus). Should it be connected over GPIOs or
36 * to ping the watchdog.
54 void (*ping)(struct max63xx_wdt *wdt); member
103 while (table->twd) { in max63xx_select_timeout()
104 if (value <= table->twd) { in max63xx_select_timeout()
105 if (nodelay && table->tdelay == 0) in max63xx_select_timeout()
122 wdt->ping(wdt); in max63xx_wdt_ping()
130 wdt->set(wdt, wdt->timeout->wdset); in max63xx_wdt_start()
133 if (wdt->timeout->tdelay == 0) in max63xx_wdt_start()
134 wdt->ping(wdt); in max63xx_wdt_start()
142 wdt->set(wdt, MAX6369_WDSET_DISABLED); in max63xx_wdt_stop()
150 .ping = max63xx_wdt_ping,
162 spin_lock(&wdt->lock); in max63xx_mmap_ping()
164 val = __raw_readb(wdt->base); in max63xx_mmap_ping()
166 __raw_writeb(val | MAX6369_WDI, wdt->base); in max63xx_mmap_ping()
167 __raw_writeb(val & ~MAX6369_WDI, wdt->base); in max63xx_mmap_ping()
169 spin_unlock(&wdt->lock); in max63xx_mmap_ping()
176 spin_lock(&wdt->lock); in max63xx_mmap_set()
178 val = __raw_readb(wdt->base); in max63xx_mmap_set()
181 __raw_writeb(val, wdt->base); in max63xx_mmap_set()
183 spin_unlock(&wdt->lock); in max63xx_mmap_set()
188 wdt->base = devm_platform_ioremap_resource(p, 0); in max63xx_mmap_init()
189 if (IS_ERR(wdt->base)) in max63xx_mmap_init()
190 return PTR_ERR(wdt->base); in max63xx_mmap_init()
192 spin_lock_init(&wdt->lock); in max63xx_mmap_init()
194 wdt->ping = max63xx_mmap_ping; in max63xx_mmap_init()
195 wdt->set = max63xx_mmap_set; in max63xx_mmap_init()
201 struct device *dev = &pdev->dev; in max63xx_wdt_probe()
208 return -ENOMEM; in max63xx_wdt_probe()
213 table = (struct max63xx_timeout *)pdev->id_entry->driver_data; in max63xx_wdt_probe()
218 wdt->timeout = max63xx_select_timeout(table, heartbeat); in max63xx_wdt_probe()
219 if (!wdt->timeout) { in max63xx_wdt_probe()
222 return -EINVAL; in max63xx_wdt_probe()
229 platform_set_drvdata(pdev, &wdt->wdd); in max63xx_wdt_probe()
230 watchdog_set_drvdata(&wdt->wdd, wdt); in max63xx_wdt_probe()
232 wdt->wdd.parent = dev; in max63xx_wdt_probe()
233 wdt->wdd.timeout = wdt->timeout->twd; in max63xx_wdt_probe()
234 wdt->wdd.info = &max63xx_wdt_info; in max63xx_wdt_probe()
235 wdt->wdd.ops = &max63xx_wdt_ops; in max63xx_wdt_probe()
237 watchdog_set_nowayout(&wdt->wdd, nowayout); in max63xx_wdt_probe()
239 err = devm_watchdog_register_device(dev, &wdt->wdd); in max63xx_wdt_probe()
244 wdt->timeout->twd, wdt->timeout->tdelay); in max63xx_wdt_probe()