backlight.h 604 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2016 Google, Inc
  3. * Written by Simon Glass <sjg@chromium.org>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #ifndef _BACKLIGHT_H
  8. #define _BACKLIGHT_H
  9. struct backlight_ops {
  10. /**
  11. * enable() - Enable a backlight
  12. *
  13. * @dev: Backlight device to enable
  14. * @return 0 if OK, -ve on error
  15. */
  16. int (*enable)(struct udevice *dev);
  17. };
  18. #define backlight_get_ops(dev) ((struct backlight_ops *)(dev)->driver->ops)
  19. /**
  20. * backlight_enable() - Enable a backlight
  21. *
  22. * @dev: Backlight device to enable
  23. * @return 0 if OK, -ve on error
  24. */
  25. int backlight_enable(struct udevice *dev);
  26. #endif