Lines Matching full:wdt

47 	struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev);  in pm8916_wdt_start()  local
49 return regmap_update_bits(wdt->regmap, in pm8916_wdt_start()
50 wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL2, in pm8916_wdt_start()
56 struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); in pm8916_wdt_stop() local
58 return regmap_update_bits(wdt->regmap, in pm8916_wdt_stop()
59 wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL2, in pm8916_wdt_stop()
65 struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); in pm8916_wdt_ping() local
67 return regmap_write(wdt->regmap, wdt->baseaddr + PON_PMIC_WD_RESET_PET, in pm8916_wdt_ping()
73 struct pm8916_wdt *wdt = watchdog_get_drvdata(wdev); in pm8916_wdt_configure_timers() local
76 err = regmap_write(wdt->regmap, in pm8916_wdt_configure_timers()
77 wdt->baseaddr + PON_PMIC_WD_RESET_S1_TIMER, in pm8916_wdt_configure_timers()
82 return regmap_write(wdt->regmap, in pm8916_wdt_configure_timers()
83 wdt->baseaddr + PON_PMIC_WD_RESET_S2_TIMER, in pm8916_wdt_configure_timers()
105 struct pm8916_wdt *wdt = arg; in pm8916_wdt_isr() local
108 err = regmap_read(wdt->regmap, wdt->baseaddr + PON_INT_RT_STS, &sts); in pm8916_wdt_isr()
113 watchdog_notify_pretimeout(&wdt->wdev); in pm8916_wdt_isr()
121 .identity = "QCOM PM8916 PON WDT",
128 .identity = "QCOM PM8916 PON WDT",
143 struct pm8916_wdt *wdt; in pm8916_wdt_probe() local
149 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); in pm8916_wdt_probe()
150 if (!wdt) in pm8916_wdt_probe()
156 * The pm8916-pon-wdt is a child of the pon device, which is a child in pm8916_wdt_probe()
161 wdt->regmap = dev_get_regmap(parent->parent, NULL); in pm8916_wdt_probe()
162 if (!wdt->regmap) { in pm8916_wdt_probe()
167 err = device_property_read_u32(parent, "reg", &wdt->baseaddr); in pm8916_wdt_probe()
176 "pm8916_wdt", wdt); in pm8916_wdt_probe()
180 wdt->wdev.info = &pm8916_wdt_pt_ident; in pm8916_wdt_probe()
185 wdt->wdev.info = &pm8916_wdt_ident; in pm8916_wdt_probe()
188 err = regmap_bulk_read(wdt->regmap, wdt->baseaddr + PON_POFF_REASON1, in pm8916_wdt_probe()
197 wdt->wdev.bootstatus |= WDIOF_CARDRESET; in pm8916_wdt_probe()
199 wdt->wdev.bootstatus |= WDIOF_POWERUNDER; in pm8916_wdt_probe()
201 wdt->wdev.bootstatus |= WDIOF_OVERHEAT; in pm8916_wdt_probe()
203 err = regmap_read(wdt->regmap, wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL2, in pm8916_wdt_probe()
210 set_bit(WDOG_HW_RUNNING, &wdt->wdev.status); in pm8916_wdt_probe()
213 err = regmap_write(wdt->regmap, in pm8916_wdt_probe()
214 wdt->baseaddr + PON_PMIC_WD_RESET_S2_CTL, in pm8916_wdt_probe()
221 wdt->wdev.ops = &pm8916_wdt_ops; in pm8916_wdt_probe()
222 wdt->wdev.parent = dev; in pm8916_wdt_probe()
223 wdt->wdev.min_timeout = PM8916_WDT_MIN_TIMEOUT; in pm8916_wdt_probe()
224 wdt->wdev.max_timeout = PM8916_WDT_MAX_TIMEOUT; in pm8916_wdt_probe()
225 wdt->wdev.timeout = PM8916_WDT_DEFAULT_TIMEOUT; in pm8916_wdt_probe()
226 wdt->wdev.pretimeout = 0; in pm8916_wdt_probe()
227 watchdog_set_drvdata(&wdt->wdev, wdt); in pm8916_wdt_probe()
228 platform_set_drvdata(pdev, wdt); in pm8916_wdt_probe()
230 watchdog_init_timeout(&wdt->wdev, 0, dev); in pm8916_wdt_probe()
231 pm8916_wdt_configure_timers(&wdt->wdev); in pm8916_wdt_probe()
233 return devm_watchdog_register_device(dev, &wdt->wdev); in pm8916_wdt_probe()
238 struct pm8916_wdt *wdt = dev_get_drvdata(dev); in pm8916_wdt_suspend() local
240 if (watchdog_active(&wdt->wdev)) in pm8916_wdt_suspend()
241 return pm8916_wdt_stop(&wdt->wdev); in pm8916_wdt_suspend()
248 struct pm8916_wdt *wdt = dev_get_drvdata(dev); in pm8916_wdt_resume() local
250 if (watchdog_active(&wdt->wdev)) in pm8916_wdt_resume()
251 return pm8916_wdt_start(&wdt->wdev); in pm8916_wdt_resume()
260 { .compatible = "qcom,pm8916-wdt" },
268 .name = "pm8916-wdt",