panel.h 674 B

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