Commit latest Qisda version and Bookeen's modification
This commit is contained in:
107
include/linux/auofb_ioctl.h
Normal file
107
include/linux/auofb_ioctl.h
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* auofb_ioctl.h
|
||||
*
|
||||
* Copyright 2009 Bookeen <devs@bookeen.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef AUOFB_IOCTL_H
|
||||
#define AUOFB_IOCTL_H
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct sAUOCommand_t
|
||||
{
|
||||
|
||||
unsigned long cmd;
|
||||
unsigned short params[5];
|
||||
unsigned long datalen;
|
||||
unsigned short *data;
|
||||
|
||||
} sAUOCommand;
|
||||
#pragma pack()
|
||||
|
||||
/* [MTR]: Epson_S1D13521 Like command interface for AUO TCON K1900 */
|
||||
#define IOCTL_AUO_PREFIX ('A' << 8)
|
||||
#define IOCTL_AUO_SENDCOMMAND (IOCTL_AUO_PREFIX | 0x01)
|
||||
|
||||
/* Command definition *
|
||||
* 3322 2222 2222 1111 1111 1100 0000 0000 *
|
||||
* 1098 7654 3210 9876 5432 1098 7654 3210 *
|
||||
* --------------------------------------- *
|
||||
* WD pppp CCCC CCCC CCCC CCCC *
|
||||
*
|
||||
* W = 'need_wait'
|
||||
* D = 'have_data'
|
||||
* p = 'nb_param'
|
||||
* C = "command"
|
||||
*/
|
||||
#define SET_AUO_COMMAND(command, nb_param, have_data, need_wait) \
|
||||
( ((need_wait & 0x01) << 29) |\
|
||||
((have_data & 0x01) << 28) |\
|
||||
((nb_param & 0x0F) << 20) |\
|
||||
(command & 0xFFFF) )
|
||||
|
||||
#define AUOCMD_INIT_SET SET_AUO_COMMAND(0x0000, 1, 0, 1)
|
||||
#define AUOCMD_STANDBY SET_AUO_COMMAND(0x0001, 0, 0, 1)
|
||||
#define AUOCMD_WAKEUP SET_AUO_COMMAND(0x0002, 0, 0, 0)
|
||||
#define AUOCMD_DISPLAY_START SET_AUO_COMMAND(0x1001, 4, 1, 1)
|
||||
#define AUOCMD_DISPLAY_STOP SET_AUO_COMMAND(0x1002, 0, 0, 1)
|
||||
#define AUOCMD_DISPLAY_REFRESH SET_AUO_COMMAND(0x1004, 0, 0, 1)
|
||||
#define AUOCMD_DISPLAY_RESET SET_AUO_COMMAND(0x1005, 0, 0, 1)
|
||||
//#define AUOCMD_LUMINANCE_BALANCE SET_AUO_COMMAND(0x5001, 1, 0, 1)
|
||||
//#define AUOCMD_AGING_MODE SET_AUO_COMMAND(0x6000, 0, 0, 1)
|
||||
//#define AUOCMD_AGING_MODE_EXIT SET_AUO_COMMAND(0x6001, 0, 0, 1)
|
||||
//#define AUOCMD_POWER_CONTROL SET_AUO_COMMAND(0x7000, 2, 0, 1)
|
||||
|
||||
#define AUO_DSPPARAM_FLASH (1 << 15)
|
||||
#define AUO_DSPPARAM_MODE_GRAYwFLASH (0x00 << 12) /* Mode 0: Gray 4bit With Flash */
|
||||
#define AUO_DSPPARAM_MODE_GRAYnFLASH (0x01 << 12) /* Mode 1: Gray 4bit Without flash */
|
||||
#define AUO_DSPPARAM_MODE_TEXT (0x02 << 12) /* Mode 2: Text mode 2bit */
|
||||
#define AUO_DSPPARAM_MODE_HIGHSPEED (0x03 << 12) /* Mode 3: Highspeed mode 1bit */
|
||||
#define AUO_DSPPARAM_MODE_HANDWRITE (0x04 << 12) /* Mode 4: Handwriting mode 1bit */
|
||||
#define AUO_DSPPARAM_MODE_AUTOSELECT (0x05 << 12) /* Mode 5: Autoselect mode */
|
||||
|
||||
/* INIT_SET command parameters */
|
||||
#define AUO_INITPARAM_OUT_DATA_ARR (0x01 << 5) /* Set to 0 (default) for normal, 1 for inverse byte order */
|
||||
|
||||
#define AUO_INITPARAM_RESOL_800x600 (0x00 << 2) /* Set to 800x600 (default) */
|
||||
#define AUO_INITPARAM_RESOL_1024x768 (0x01 << 2) /* Set to 1024x768 */
|
||||
#define AUO_INITPARAM_RESOL_600x800 (0x04 << 2) /* Set to 600x800 */
|
||||
#define AUO_INITPARAM_RESOL_768x1024 (0x05 << 2) /* Set to 768x1024 */
|
||||
|
||||
#define AUO_INITPARAM_UD_FUNC (0x01 << 1) /* Set to 0 (default) to scan down, 1 to scan up */
|
||||
#define AUO_INITPARAM_SHL_FUNC (0x01 << 0) /* Set to 0 to shift left, 1 (default) to scan right */
|
||||
|
||||
#define AUO_INITPARAM_IN_DATA_ARR (0x01 << 6) /* Set to 0 (default) for normal, 1 for inverse byte order */
|
||||
|
||||
#define AUO_INITPARAM_INV_DISPLAY (0x01 << 9) /* Set to 0 (default) for normal colors, 1 for inversed colors */
|
||||
|
||||
#define AUO_INITPARAM_ROTATION_000 (0x00 << 10) /* Set the rotation to 0° (0) */
|
||||
#define AUO_INITPARAM_ROTATION_090 (0x01 << 10) /* Set the rotation to 90° (PI/2) */
|
||||
#define AUO_INITPARAM_ROTATION_180 (0x02 << 10) /* Set the rotation to 180° (PI) */
|
||||
#define AUO_INITPARAM_ROTATION_270 (0x03 << 10) /* Set the rotation to 270° (1.5*PI) */
|
||||
|
||||
#define AUO_INITPARAM_DATA_FILTER (0x01 << 12) /* Data filter (1: active, 0: inactive) */
|
||||
#define AUO_INITPARAM_TEMP_AVERAGE (0x01 << 13) /* Temperature average (1: active, 0: inactive) */
|
||||
|
||||
int Epaper_sendCommand(sAUOCommand *cmd);
|
||||
|
||||
/* Please, do not use these #define s */
|
||||
#define GET_COMMAND_PARAM_NUM(command) ((command >> 20) & 0x0F)
|
||||
#define GET_COMMAND_HAVE_DATA(command) ((command >> 28) & 0x01)
|
||||
#define GET_COMMAND_NEED_WAIT(command) ((command >> 29) & 0x01)
|
||||
|
||||
#endif /* AUOFB_IOCTL_H */
|
||||
71
include/linux/cyio.h
Normal file
71
include/linux/cyio.h
Normal file
@@ -0,0 +1,71 @@
|
||||
// ===========================================================================
|
||||
// cyio.h
|
||||
// Copyright (C) 2008-2010 Bookeen - All rights reserved
|
||||
// ===========================================================================
|
||||
// Key events
|
||||
#define CYEVENT_KEY_ENTER 'e'
|
||||
#define CYEVENT_KEY_RIGHT 'r'
|
||||
#define CYEVENT_KEY_DOWN 'd'
|
||||
#define CYEVENT_KEY_LEFT 'l'
|
||||
#define CYEVENT_KEY_UP 'u'
|
||||
#define CYEVENT_KEY_F1 '1'
|
||||
#define CYEVENT_KEY_F2 '2'
|
||||
#define CYEVENT_KEY_F3 '3'
|
||||
#define CYEVENT_KEY_F4 '4'
|
||||
#define CYEVENT_KEY_OFF 'o'
|
||||
#define CYEVENT_KEY_DSLP 'S'
|
||||
#define CYEVENT_KEY_VOLP '+'
|
||||
#define CYEVENT_KEY_VOLN '-'
|
||||
#define CYEVENT_KEY_REPEAT_FLAG 0x80
|
||||
#define CYEVENT_KEY_REPEAT_END '0'
|
||||
// Physical events
|
||||
#define CYEVENT_USB_IN 'p'
|
||||
#define CYEVENT_USB_OUT 'q'
|
||||
#define CYEVENT_AC_IN 'a'
|
||||
#define CYEVENT_AC_OUT 'b'
|
||||
#define CYEVENT_ACN_IN 'j'
|
||||
#define CYEVENT_ACN_OUT 'k'
|
||||
#define CYEVENT_SD_IN 's'
|
||||
#define CYEVENT_SD_OUT 't'
|
||||
#define CYEVENT_SDN_IN 'u'
|
||||
#define CYEVENT_SDN_OUT 'v'
|
||||
|
||||
// G-Sensor events
|
||||
#define CYEVENT_ORIENTATIONCHANGED 'O'
|
||||
#define CYEVENT_G_ROT000 'A'
|
||||
#define CYEVENT_G_ROT090 'B'
|
||||
#define CYEVENT_G_ROT180 'C'
|
||||
#define CYEVENT_G_ROT270 'D'
|
||||
#define CYEVENT_TOGGLE_GSENSOR 'G'
|
||||
|
||||
// Logical events
|
||||
// CYEVENT_KEY_OFF + CYEVENT_KEY_VOLN
|
||||
#define CYEVENT_FACTORY_OFF 'x'
|
||||
#define CYEVENT_SUSPEND_SCREEN 'y'
|
||||
#define CYEVENT_SUSPEND_DEVICE 'z'
|
||||
|
||||
/* Normaly no more used... */
|
||||
//#define CYIO_KERNEL_2_6 1
|
||||
|
||||
// ===========================================================================
|
||||
/* Non directly CyIO related values, but used for the Accelerometer */
|
||||
#define G_SENSOR_ON '1'
|
||||
#define G_SENSOR_OFF '0'
|
||||
#define G_SENSOR_CAL 'C'
|
||||
|
||||
enum
|
||||
{
|
||||
CYGSENSOR_STATUS_ENABLED = 0, /** The accelerometer is enabled */
|
||||
CYGSENSOR_STATUS_DISABLED = 1, /** The accelerometer is disabled */
|
||||
CYGSENSOR_STATUS_NOTCALIB = 2, /** Not calibrated, or invalid calibration data */
|
||||
CYGSENSOR_STATUS_CALIBRATED = 3, /** This status should never been read, but it could help to debug */
|
||||
CYGSENSOR_STATUS_UNKNOWN = 4, /** This status should never been read, but it could help to debug */
|
||||
CYGSENSOR_STATUS_CHIPDETECTED = 5, /** This status should never been read, used to say if we correctly detected the I²C accelerometer Chip */
|
||||
CYGSENSOR_STATUS_CRITICALERROR = 6, /** If we are in this status, the G-Sensor is non working: possible cause, defective chip */
|
||||
CYGSENSOR_STATUS_SUSPENDED = 7, /** The GSENSOR was on, the device go to deepsleep, so we go in this state. */
|
||||
};
|
||||
// ===========================================================================
|
||||
/* Exported function of CyIO */
|
||||
void Cyio_ResetTimer(void);
|
||||
int Cyio_PushEvent(char eventId, char unique);
|
||||
// ===========================================================================
|
||||
@@ -178,6 +178,7 @@ otherwise SD card can not be mounted*/
|
||||
#define S3C_WIFI_MAJOR 222 //Qisda, Asaku Chen, 2009/08/20 for wifi power
|
||||
#define S3C_3G_MAJOR 223 //Qisda, Leo SJ Yang, 2009/08/27 for 3G Module power
|
||||
#define S3C_UDC_MAJOR 224 //Qisda, Leo SJ Yang, 2009/11/04 for UDC power state
|
||||
#define S3C_BT_MAJOR 225 //Qisda, Ralph Chang, 2010/02/09 for bt power state
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -103,6 +103,9 @@ struct mmc_host {
|
||||
unsigned int max_req_size; /* maximum number of bytes in one req */
|
||||
unsigned int max_blk_size; /* maximum size of one mmc block */
|
||||
unsigned int max_blk_count; /* maximum number of blocks in one req */
|
||||
/* Qisda, howard hsu, 2010/01/21, fix start slot for SD card { */
|
||||
unsigned int first_devidx; /* preferred starting mmc block device index */
|
||||
/* } Qisda, howard hsu, 2010/01/21, fix start slot for SD card */
|
||||
|
||||
/* private data */
|
||||
spinlock_t lock; /* lock for claim and bus ops */
|
||||
|
||||
Reference in New Issue
Block a user