hecubafb.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * hecubafb.h - definitions for the hecuba framebuffer driver
  3. *
  4. * Copyright (C) 2008 by Jaya Kumar
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file COPYING in the main directory of this archive for
  8. * more details.
  9. *
  10. */
  11. #ifndef _LINUX_HECUBAFB_H_
  12. #define _LINUX_HECUBAFB_H_
  13. /* Apollo controller specific defines */
  14. #define APOLLO_START_NEW_IMG 0xA0
  15. #define APOLLO_STOP_IMG_DATA 0xA1
  16. #define APOLLO_DISPLAY_IMG 0xA2
  17. #define APOLLO_ERASE_DISPLAY 0xA3
  18. #define APOLLO_INIT_DISPLAY 0xA4
  19. /* Hecuba interface specific defines */
  20. #define HCB_WUP_BIT 0x01
  21. #define HCB_DS_BIT 0x02
  22. #define HCB_RW_BIT 0x04
  23. #define HCB_CD_BIT 0x08
  24. #define HCB_ACK_BIT 0x80
  25. /* struct used by hecuba. board specific stuff comes from *board */
  26. struct hecubafb_par {
  27. struct fb_info *info;
  28. struct hecuba_board *board;
  29. void (*send_command)(struct hecubafb_par *, unsigned char);
  30. void (*send_data)(struct hecubafb_par *, unsigned char);
  31. };
  32. /* board specific routines
  33. board drivers can implement wait_for_ack with interrupts if desired. if
  34. wait_for_ack is called with clear=0, then go to sleep and return when ack
  35. goes hi or if wait_for_ack with clear=1, then return when ack goes lo */
  36. struct hecuba_board {
  37. struct module *owner;
  38. void (*remove)(struct hecubafb_par *);
  39. void (*set_ctl)(struct hecubafb_par *, unsigned char, unsigned char);
  40. void (*set_data)(struct hecubafb_par *, unsigned char);
  41. void (*wait_for_ack)(struct hecubafb_par *, int);
  42. int (*init)(struct hecubafb_par *);
  43. };
  44. #endif