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