| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * LCD Lowlevel Control Abstraction |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 29 | 30 | struct lcd_device *ld; |
|---|
| 30 | 31 | struct fb_event *evdata = data; |
|---|
| 31 | 32 | |
|---|
| 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 | | - |
|---|
| 44 | 33 | ld = container_of(self, struct lcd_device, fb_notif); |
|---|
| 45 | 34 | if (!ld->ops) |
|---|
| 46 | 35 | return 0; |
|---|
| .. | .. |
|---|
| 50 | 39 | if (event == FB_EVENT_BLANK) { |
|---|
| 51 | 40 | if (ld->ops->set_power) |
|---|
| 52 | 41 | 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); |
|---|
| 61 | 42 | } else { |
|---|
| 62 | 43 | if (ld->ops->set_mode) |
|---|
| 63 | 44 | ld->ops->set_mode(ld, evdata->data); |
|---|
| .. | .. |
|---|
| 198 | 179 | * lcd_device_register - register a new object of lcd_device class. |
|---|
| 199 | 180 | * @name: the name of the new object(must be the same as the name of the |
|---|
| 200 | 181 | * respective framebuffer device). |
|---|
| 182 | + * @parent: pointer to the parent's struct device . |
|---|
| 201 | 183 | * @devdata: an optional pointer to be stored in the device. The |
|---|
| 202 | 184 | * methods may retrieve it by using lcd_get_data(ld). |
|---|
| 203 | 185 | * @ops: the lcd operations structure. |
|---|