Lines Matching full:wdt

58 	/* Set WDT clear in OFF and sleep mode */
68 /* Set WDT clear in sleep mode (there is no WDTOFFC on MAX77714) */
74 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); in max77620_wdt_start() local
76 return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, in max77620_wdt_start()
82 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); in max77620_wdt_stop() local
84 return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, in max77620_wdt_stop()
90 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); in max77620_wdt_ping() local
92 return regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl3, in max77620_wdt_ping()
93 wdt->drv_data->wdtc_mask, 0x1); in max77620_wdt_ping()
99 struct max77620_wdt *wdt = watchdog_get_drvdata(wdt_dev); in max77620_wdt_set_timeout() local
131 ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl3, in max77620_wdt_set_timeout()
132 wdt->drv_data->wdtc_mask, 0x1); in max77620_wdt_set_timeout()
136 ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, in max77620_wdt_set_timeout()
162 struct max77620_wdt *wdt; in max77620_wdt_probe() local
167 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); in max77620_wdt_probe()
168 if (!wdt) in max77620_wdt_probe()
171 wdt->dev = dev; in max77620_wdt_probe()
172 wdt->drv_data = (const struct max77620_variant *) id->driver_data; in max77620_wdt_probe()
174 wdt->rmap = dev_get_regmap(dev->parent, NULL); in max77620_wdt_probe()
175 if (!wdt->rmap) { in max77620_wdt_probe()
176 dev_err(wdt->dev, "Failed to get parent regmap\n"); in max77620_wdt_probe()
180 wdt_dev = &wdt->wdt_dev; in max77620_wdt_probe()
187 platform_set_drvdata(pdev, wdt); in max77620_wdt_probe()
189 /* Enable WD_RST_WK - WDT expire results in a restart */ in max77620_wdt_probe()
190 ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_onoff_cnfg2, in max77620_wdt_probe()
191 wdt->drv_data->bit_wd_rst_wk, in max77620_wdt_probe()
192 wdt->drv_data->bit_wd_rst_wk); in max77620_wdt_probe()
194 dev_err(wdt->dev, "Failed to set WD_RST_WK: %d\n", ret); in max77620_wdt_probe()
198 /* Set the "auto WDT clear" bits available on the chip */ in max77620_wdt_probe()
199 ret = regmap_update_bits(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, in max77620_wdt_probe()
200 wdt->drv_data->cnfg_glbl2_cfg_bits, in max77620_wdt_probe()
201 wdt->drv_data->cnfg_glbl2_cfg_bits); in max77620_wdt_probe()
203 dev_err(wdt->dev, "Failed to set WDT OFF mode: %d\n", ret); in max77620_wdt_probe()
207 /* Check if WDT running and if yes then set flags properly */ in max77620_wdt_probe()
208 ret = regmap_read(wdt->rmap, wdt->drv_data->reg_cnfg_glbl2, &regval); in max77620_wdt_probe()
210 dev_err(wdt->dev, "Failed to read WDT CFG register: %d\n", ret); in max77620_wdt_probe()
233 watchdog_set_drvdata(wdt_dev, wdt); in max77620_wdt_probe()