96 lines
2.8 KiB
C
96 lines
2.8 KiB
C
/* alps/ALPS_SW/TRUNK/MAIN/alps/kernel/include/linux/kpd.h
|
|
*
|
|
* (C) Copyright 2009
|
|
* MediaTek <www.MediaTek.com>
|
|
*
|
|
* MT6516 Sensor IOCTL & data structure
|
|
*
|
|
* 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, or
|
|
* (at your option) any later version.
|
|
*
|
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
#ifndef __KPD_H__
|
|
#define __KPD_H__
|
|
|
|
#include <linux/ioctl.h>
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/input.h>
|
|
#include <linux/workqueue.h>
|
|
#include <linux/timer.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/fs.h>
|
|
#include <linux/miscdevice.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/earlysuspend.h>
|
|
#include <linux/aee.h>
|
|
|
|
#ifdef CONFIG_MTK_SMARTBOOK_SUPPORT
|
|
#include <linux/sbsuspend.h> /* smartbook */
|
|
#endif
|
|
|
|
#include <asm/atomic.h>
|
|
#include <asm/uaccess.h>
|
|
|
|
#include <mach/hal_pub_kpd.h>
|
|
|
|
#define KPD_AUTOTEST KPD_YES
|
|
#define KPD_DEBUG KPD_YES
|
|
|
|
#if KPD_AUTOTEST
|
|
#define PRESS_OK_KEY _IO('k', 1)
|
|
#define RELEASE_OK_KEY _IO('k', 2)
|
|
#define PRESS_MENU_KEY _IO('k', 3)
|
|
#define RELEASE_MENU_KEY _IO('k', 4)
|
|
#define PRESS_UP_KEY _IO('k', 5)
|
|
#define RELEASE_UP_KEY _IO('k', 6)
|
|
#define PRESS_DOWN_KEY _IO('k', 7)
|
|
#define RELEASE_DOWN_KEY _IO('k', 8)
|
|
#define PRESS_LEFT_KEY _IO('k', 9)
|
|
#define RELEASE_LEFT_KEY _IO('k', 10)
|
|
#define PRESS_RIGHT_KEY _IO('k', 11)
|
|
#define RELEASE_RIGHT_KEY _IO('k', 12)
|
|
#define PRESS_HOME_KEY _IO('k', 13)
|
|
#define RELEASE_HOME_KEY _IO('k', 14)
|
|
#define PRESS_BACK_KEY _IO('k', 15)
|
|
#define RELEASE_BACK_KEY _IO('k', 16)
|
|
#define PRESS_CALL_KEY _IO('k', 17)
|
|
#define RELEASE_CALL_KEY _IO('k', 18)
|
|
#define PRESS_ENDCALL_KEY _IO('k', 19)
|
|
#define RELEASE_ENDCALL_KEY _IO('k', 20)
|
|
#define PRESS_VLUP_KEY _IO('k', 21)
|
|
#define RELEASE_VLUP_KEY _IO('k', 22)
|
|
#define PRESS_VLDOWN_KEY _IO('k', 23)
|
|
#define RELEASE_VLDOWN_KEY _IO('k', 24)
|
|
#define PRESS_FOCUS_KEY _IO('k', 25)
|
|
#define RELEASE_FOCUS_KEY _IO('k', 26)
|
|
#define PRESS_CAMERA_KEY _IO('k', 27)
|
|
#define RELEASE_CAMERA_KEY _IO('k', 28)
|
|
#define PRESS_POWER_KEY _IO('k', 30)
|
|
#define RELEASE_POWER_KEY _IO('k', 31)
|
|
#endif
|
|
#define SET_KPD_KCOL _IO('k', 29)
|
|
|
|
|
|
#define KPD_SAY "kpd: "
|
|
#if KPD_DEBUG
|
|
#define kpd_print(fmt, arg...) printk(KPD_SAY fmt, ##arg)
|
|
#else
|
|
#define kpd_print(fmt, arg...) do {} while (0)
|
|
#endif
|
|
|
|
|
|
#endif /* __KPD_H__ */
|