Lines Matching full:da9063

3  * Watchdog driver for DA9063 PMICs.
19 #include <linux/mfd/da9063/registers.h>
20 #include <linux/mfd/da9063/core.h>
55 static unsigned int da9063_wdt_read_timeout(struct da9063 *da9063) in da9063_wdt_read_timeout() argument
59 regmap_read(da9063->regmap, DA9063_REG_CONTROL_D, &val); in da9063_wdt_read_timeout()
64 static int da9063_wdt_disable_timer(struct da9063 *da9063) in da9063_wdt_disable_timer() argument
66 return regmap_update_bits(da9063->regmap, DA9063_REG_CONTROL_D, in da9063_wdt_disable_timer()
72 da9063_wdt_update_timeout(struct da9063 *da9063, unsigned int timeout) in da9063_wdt_update_timeout() argument
85 ret = da9063_wdt_disable_timer(da9063); in da9063_wdt_update_timeout()
92 return regmap_update_bits(da9063->regmap, DA9063_REG_CONTROL_D, in da9063_wdt_update_timeout()
98 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_start() local
101 ret = da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_start()
103 dev_err(da9063->dev, "Watchdog failed to start (err = %d)\n", in da9063_wdt_start()
111 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_stop() local
114 ret = da9063_wdt_disable_timer(da9063); in da9063_wdt_stop()
116 dev_alert(da9063->dev, "Watchdog failed to stop (err = %d)\n", in da9063_wdt_stop()
124 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_ping() local
134 ret = regmap_write(da9063->regmap, DA9063_REG_CONTROL_F, in da9063_wdt_ping()
137 dev_alert(da9063->dev, "Failed to ping the watchdog (err = %d)\n", in da9063_wdt_ping()
146 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_set_timeout() local
160 ret = da9063_wdt_update_timeout(da9063, timeout); in da9063_wdt_set_timeout()
163 dev_err(da9063->dev, "Failed to set watchdog timeout (err = %d)\n", in da9063_wdt_set_timeout()
174 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_restart() local
175 struct i2c_client *client = to_i2c_client(da9063->dev); in da9063_wdt_restart()
191 dev_alert(da9063->dev, "Failed to shutdown (err = %d)\n", in da9063_wdt_restart()
202 .identity = "DA9063 Watchdog",
217 struct da9063 *da9063; in da9063_wdt_probe() local
224 da9063 = dev_get_drvdata(dev->parent); in da9063_wdt_probe()
225 if (!da9063) in da9063_wdt_probe()
232 da9063->use_sw_pm = device_property_present(dev, "dlg,use-sw-pm"); in da9063_wdt_probe()
243 watchdog_set_drvdata(wdd, da9063); in da9063_wdt_probe()
249 timeout = da9063_wdt_read_timeout(da9063); in da9063_wdt_probe()
259 da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_probe()
269 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_suspend() local
271 if (!da9063->use_sw_pm) in da9063_wdt_suspend()
283 struct da9063 *da9063 = watchdog_get_drvdata(wdd); in da9063_wdt_resume() local
285 if (!da9063->use_sw_pm) in da9063_wdt_resume()
307 MODULE_DESCRIPTION("Watchdog driver for Dialog DA9063");