• Home
  • Raw
  • Download

Lines Matching refs:ld

30 	struct lcd_device *ld;  in fb_notifier_callback()  local
33 ld = container_of(self, struct lcd_device, fb_notif); in fb_notifier_callback()
34 if (!ld->ops) in fb_notifier_callback()
37 mutex_lock(&ld->ops_lock); in fb_notifier_callback()
38 if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { in fb_notifier_callback()
40 if (ld->ops->set_power) in fb_notifier_callback()
41 ld->ops->set_power(ld, *(int *)evdata->data); in fb_notifier_callback()
43 if (ld->ops->set_mode) in fb_notifier_callback()
44 ld->ops->set_mode(ld, evdata->data); in fb_notifier_callback()
47 mutex_unlock(&ld->ops_lock); in fb_notifier_callback()
51 static int lcd_register_fb(struct lcd_device *ld) in lcd_register_fb() argument
53 memset(&ld->fb_notif, 0, sizeof(ld->fb_notif)); in lcd_register_fb()
54 ld->fb_notif.notifier_call = fb_notifier_callback; in lcd_register_fb()
55 return fb_register_client(&ld->fb_notif); in lcd_register_fb()
58 static void lcd_unregister_fb(struct lcd_device *ld) in lcd_unregister_fb() argument
60 fb_unregister_client(&ld->fb_notif); in lcd_unregister_fb()
63 static int lcd_register_fb(struct lcd_device *ld) in lcd_register_fb() argument
68 static inline void lcd_unregister_fb(struct lcd_device *ld) in lcd_unregister_fb() argument
77 struct lcd_device *ld = to_lcd_device(dev); in lcd_power_show() local
79 mutex_lock(&ld->ops_lock); in lcd_power_show()
80 if (ld->ops && ld->ops->get_power) in lcd_power_show()
81 rc = sprintf(buf, "%d\n", ld->ops->get_power(ld)); in lcd_power_show()
84 mutex_unlock(&ld->ops_lock); in lcd_power_show()
93 struct lcd_device *ld = to_lcd_device(dev); in lcd_power_store() local
102 mutex_lock(&ld->ops_lock); in lcd_power_store()
103 if (ld->ops && ld->ops->set_power) { in lcd_power_store()
105 ld->ops->set_power(ld, power); in lcd_power_store()
108 mutex_unlock(&ld->ops_lock); in lcd_power_store()
118 struct lcd_device *ld = to_lcd_device(dev); in contrast_show() local
120 mutex_lock(&ld->ops_lock); in contrast_show()
121 if (ld->ops && ld->ops->get_contrast) in contrast_show()
122 rc = sprintf(buf, "%d\n", ld->ops->get_contrast(ld)); in contrast_show()
123 mutex_unlock(&ld->ops_lock); in contrast_show()
132 struct lcd_device *ld = to_lcd_device(dev); in contrast_store() local
141 mutex_lock(&ld->ops_lock); in contrast_store()
142 if (ld->ops && ld->ops->set_contrast) { in contrast_store()
144 ld->ops->set_contrast(ld, contrast); in contrast_store()
147 mutex_unlock(&ld->ops_lock); in contrast_store()
156 struct lcd_device *ld = to_lcd_device(dev); in max_contrast_show() local
158 return sprintf(buf, "%d\n", ld->props.max_contrast); in max_contrast_show()
166 struct lcd_device *ld = to_lcd_device(dev); in lcd_device_release() local
167 kfree(ld); in lcd_device_release()
235 void lcd_device_unregister(struct lcd_device *ld) in lcd_device_unregister() argument
237 if (!ld) in lcd_device_unregister()
240 mutex_lock(&ld->ops_lock); in lcd_device_unregister()
241 ld->ops = NULL; in lcd_device_unregister()
242 mutex_unlock(&ld->ops_lock); in lcd_device_unregister()
243 lcd_unregister_fb(ld); in lcd_device_unregister()
245 device_unregister(&ld->dev); in lcd_device_unregister()
308 void devm_lcd_device_unregister(struct device *dev, struct lcd_device *ld) in devm_lcd_device_unregister() argument
313 devm_lcd_device_match, ld); in devm_lcd_device_unregister()