forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/video/backlight/lcd.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * LCD Lowlevel Control Abstraction
34 *
....@@ -29,18 +30,6 @@
2930 struct lcd_device *ld;
3031 struct fb_event *evdata = data;
3132
32
- /* If we aren't interested in this event, skip it immediately ... */
33
- switch (event) {
34
- case FB_EVENT_BLANK:
35
- case FB_EVENT_MODE_CHANGE:
36
- case FB_EVENT_MODE_CHANGE_ALL:
37
- case FB_EARLY_EVENT_BLANK:
38
- case FB_R_EARLY_EVENT_BLANK:
39
- break;
40
- default:
41
- return 0;
42
- }
43
-
4433 ld = container_of(self, struct lcd_device, fb_notif);
4534 if (!ld->ops)
4635 return 0;
....@@ -50,14 +39,6 @@
5039 if (event == FB_EVENT_BLANK) {
5140 if (ld->ops->set_power)
5241 ld->ops->set_power(ld, *(int *)evdata->data);
53
- } else if (event == FB_EARLY_EVENT_BLANK) {
54
- if (ld->ops->early_set_power)
55
- ld->ops->early_set_power(ld,
56
- *(int *)evdata->data);
57
- } else if (event == FB_R_EARLY_EVENT_BLANK) {
58
- if (ld->ops->r_early_set_power)
59
- ld->ops->r_early_set_power(ld,
60
- *(int *)evdata->data);
6142 } else {
6243 if (ld->ops->set_mode)
6344 ld->ops->set_mode(ld, evdata->data);
....@@ -198,6 +179,7 @@
198179 * lcd_device_register - register a new object of lcd_device class.
199180 * @name: the name of the new object(must be the same as the name of the
200181 * respective framebuffer device).
182
+ * @parent: pointer to the parent's struct device .
201183 * @devdata: an optional pointer to be stored in the device. The
202184 * methods may retrieve it by using lcd_get_data(ld).
203185 * @ops: the lcd operations structure.