Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 363bf77 | 2016-01-21 19:44:56 -0700 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2016 Google, Inc |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
Simon Glass | 363bf77 | 2016-01-21 19:44:56 -0700 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _BACKLIGHT_H |
| 8 | #define _BACKLIGHT_H |
| 9 | |
| 10 | struct backlight_ops { |
| 11 | /** |
| 12 | * enable() - Enable a backlight |
| 13 | * |
| 14 | * @dev: Backlight device to enable |
| 15 | * @return 0 if OK, -ve on error |
| 16 | */ |
| 17 | int (*enable)(struct udevice *dev); |
| 18 | }; |
| 19 | |
| 20 | #define backlight_get_ops(dev) ((struct backlight_ops *)(dev)->driver->ops) |
| 21 | |
| 22 | /** |
| 23 | * backlight_enable() - Enable a backlight |
| 24 | * |
| 25 | * @dev: Backlight device to enable |
| 26 | * @return 0 if OK, -ve on error |
| 27 | */ |
| 28 | int backlight_enable(struct udevice *dev); |
| 29 | |
| 30 | #endif |