Lines Matching refs:svc
17 struct gb_svc *svc; member
32 gb_svc_watchdog_disable(watchdog->svc); in svc_watchdog_pm_notifier()
35 gb_svc_watchdog_enable(watchdog->svc); in svc_watchdog_pm_notifier()
66 struct gb_svc *svc; in do_work() local
70 svc = watchdog->svc; in do_work()
72 dev_dbg(&svc->dev, "%s: ping.\n", __func__); in do_work()
73 retval = gb_svc_ping(svc); in do_work()
82 dev_err(&svc->dev, in do_work()
86 if (svc->action == GB_SVC_WATCHDOG_BITE_PANIC_KERNEL) { in do_work()
88 } else if (svc->action == GB_SVC_WATCHDOG_BITE_RESET_UNIPRO) { in do_work()
89 dev_err(&svc->dev, "Resetting the greybus network, watch out!!!\n"); in do_work()
107 int gb_svc_watchdog_create(struct gb_svc *svc) in gb_svc_watchdog_create() argument
112 if (svc->watchdog) in gb_svc_watchdog_create()
120 watchdog->svc = svc; in gb_svc_watchdog_create()
122 svc->watchdog = watchdog; in gb_svc_watchdog_create()
127 dev_err(&svc->dev, "error registering pm notifier(%d)\n", in gb_svc_watchdog_create()
132 retval = gb_svc_watchdog_enable(svc); in gb_svc_watchdog_create()
134 dev_err(&svc->dev, "error enabling watchdog (%d)\n", retval); in gb_svc_watchdog_create()
141 svc->watchdog = NULL; in gb_svc_watchdog_create()
147 void gb_svc_watchdog_destroy(struct gb_svc *svc) in gb_svc_watchdog_destroy() argument
149 struct gb_svc_watchdog *watchdog = svc->watchdog; in gb_svc_watchdog_destroy()
155 gb_svc_watchdog_disable(svc); in gb_svc_watchdog_destroy()
156 svc->watchdog = NULL; in gb_svc_watchdog_destroy()
160 bool gb_svc_watchdog_enabled(struct gb_svc *svc) in gb_svc_watchdog_enabled() argument
162 if (!svc || !svc->watchdog) in gb_svc_watchdog_enabled()
164 return svc->watchdog->enabled; in gb_svc_watchdog_enabled()
167 int gb_svc_watchdog_enable(struct gb_svc *svc) in gb_svc_watchdog_enable() argument
171 if (!svc->watchdog) in gb_svc_watchdog_enable()
174 watchdog = svc->watchdog; in gb_svc_watchdog_enable()
183 int gb_svc_watchdog_disable(struct gb_svc *svc) in gb_svc_watchdog_disable() argument
187 if (!svc->watchdog) in gb_svc_watchdog_disable()
190 watchdog = svc->watchdog; in gb_svc_watchdog_disable()