panel.h 674 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 _PANEL_H
  8. #define _PANEL_H
  9. struct panel_ops {
  10. /**
  11. * enable_backlight() - Enable the panel backlight
  12. *
  13. * @dev: Panel device containing the backlight to enable
  14. * @return 0 if OK, -ve on error
  15. */
  16. int (*enable_backlight)(struct udevice *dev);
  17. };
  18. #define panel_get_ops(dev) ((struct panel_ops *)(dev)->driver->ops)
  19. /**
  20. * panel_enable_backlight() - Enable the panel backlight
  21. *
  22. * @dev: Panel device containing the backlight to enable
  23. * @return 0 if OK, -ve on error
  24. */
  25. int panel_enable_backlight(struct udevice *dev);
  26. #endif