aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/odroid-keypad.h
blob: 31d126b46f4643f8011e1d990687f9543f33de18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//[*]--------------------------------------------------------------------------------------------------[*]
/*
 *	
 * ODROID Dev Board key-pad header file (charles.park) 
 *
 */
//[*]--------------------------------------------------------------------------------------------------[*]
#ifndef	_ODROID_KEYPAD_H_
#define	_ODROID_KEYPAD_H_

//[*]--------------------------------------------------------------------------------------------------[*]
#define DEVICE_NAME 			"odroid-keypad"

//[*]--------------------------------------------------------------------------------------------------[*]
#define	KEY_PRESS				1
#define	KEY_RELEASE				0

#define	KEYPAD_TIMER_PERIOD		100000000	// ns : ktime_set(sec, nsec)
#define	POWEROFF_CHECK_PERIOD	5			// sec : ktime_set(sec, nsec)

#if defined(CONFIG_FB_S5P_S6E8AA1)
    #define LONGKEY_CHECK_PERIOD    3
#endif	
#if defined(CONFIG_BOARD_ODROID_X)
    #define LED_STATUS_PERIOD       1
    #define LED_STATUS_PORT         EXYNOS4_GPC1(0)
    #define LED_STATUS_PORT_NAME    "STATUS LED"
#endif

//[*]--------------------------------------------------------------------------------------------------[*]
typedef	struct	odroid_keypad__t	{
	
	// keypad control
	struct input_dev		*input;			// input driver
	char					phys[32];
	
	struct hrtimer			timer;			// keypad timer
	struct hrtimer			poweroff_timer;	// force power off control
#if defined(CONFIG_FB_S5P_S6E8AA1)
    char                    pause;
	struct hrtimer			long_timer;	    // long key support
	unsigned char           long_status;
#endif	

#if defined(CONFIG_BOARD_ODROID_X)
	struct hrtimer			led_timer;	    // long key support
#endif
	
}	odroid_keypad_t;

//[*]--------------------------------------------------------------------------------------------------[*]
#endif		/* _ODROID_KEYPAD_H_*/
//[*]--------------------------------------------------------------------------------------------------[*]
//[*]--------------------------------------------------------------------------------------------------[*]