]>
Commit | Line | Data |
---|---|---|
363bf77a SG |
1 | /* |
2 | * Copyright (c) 2016 Google, Inc | |
3 | * Written by Simon Glass <[email protected]> | |
4 | * | |
5 | * SPDX-License-Identifier: GPL-2.0+ | |
6 | */ | |
7 | ||
8 | #ifndef _BACKLIGHT_H | |
9 | #define _BACKLIGHT_H | |
10 | ||
11 | struct backlight_ops { | |
12 | /** | |
13 | * enable() - Enable a backlight | |
14 | * | |
15 | * @dev: Backlight device to enable | |
16 | * @return 0 if OK, -ve on error | |
17 | */ | |
18 | int (*enable)(struct udevice *dev); | |
19 | }; | |
20 | ||
21 | #define backlight_get_ops(dev) ((struct backlight_ops *)(dev)->driver->ops) | |
22 | ||
23 | /** | |
24 | * backlight_enable() - Enable a backlight | |
25 | * | |
26 | * @dev: Backlight device to enable | |
27 | * @return 0 if OK, -ve on error | |
28 | */ | |
29 | int backlight_enable(struct udevice *dev); | |
30 | ||
31 | #endif |