Lines Matching refs:tp
30 struct tp_device *tp; in fb_notifier_callback() local
35 tp = container_of(self, struct tp_device, fb_notif); in fb_notifier_callback()
40 mutex_lock(&tp->ops_lock); in fb_notifier_callback()
47 if (tp->status != FB_BLANK_UNBLANK) { in fb_notifier_callback()
48 tp->status = blank_mode; in fb_notifier_callback()
49 tp->tp_resume(tp); in fb_notifier_callback()
53 if (tp->status == FB_BLANK_UNBLANK) { in fb_notifier_callback()
54 tp->status = blank_mode; in fb_notifier_callback()
55 ret = tp->tp_suspend(tp); in fb_notifier_callback()
60 mutex_unlock(&tp->ops_lock); in fb_notifier_callback()
74 struct tp_device *tp; in ebc_notifier_callback() local
76 tp = container_of(self, struct tp_device, ebc_notif); in ebc_notifier_callback()
78 mutex_lock(&tp->ops_lock); in ebc_notifier_callback()
81 tp->tp_suspend(tp); in ebc_notifier_callback()
83 tp->tp_resume(tp); in ebc_notifier_callback()
85 mutex_unlock(&tp->ops_lock); in ebc_notifier_callback()
90 static inline int tp_register_fb(struct tp_device *tp) in tp_register_fb() argument
92 memset(&tp->fb_notif, 0, sizeof(tp->fb_notif)); in tp_register_fb()
93 tp->fb_notif.notifier_call = fb_notifier_callback; in tp_register_fb()
94 tp->ebc_notif.notifier_call = ebc_notifier_callback; in tp_register_fb()
95 mutex_init(&tp->ops_lock); in tp_register_fb()
96 tp->status = FB_BLANK_UNBLANK; in tp_register_fb()
98 ebc_register_notifier(&tp->ebc_notif); in tp_register_fb()
99 fb_register_client(&tp->fb_notif); in tp_register_fb()
104 static inline void tp_unregister_fb(struct tp_device *tp) in tp_unregister_fb() argument
106 ebc_unregister_notifier(&tp->ebc_notif); in tp_unregister_fb()
107 fb_unregister_client(&tp->fb_notif); in tp_unregister_fb()