summaryrefslogtreecommitdiff
path: root/include/asm-arm/arch-mxc/hw_events.h
blob: f0aa3ad7a266fea7d69b8359795acc66518b3bc5 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
/*
 * Copyright 2007-2008 Freescale Semiconductor, Inc. All Rights Reserved.
 */

/*
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/*!
 * hw_events.h
 * include the headset/cvbs interrupt detect
 */

#ifndef HW_EVENT_H
#define HW_EVENT_H

#define HW_EVENT_GROUP		2
#define HWE_DEF_PRIORITY	1
#define HWE_HIGH_PRIORITY	0

typedef enum {

	HWE_PHONEJACK_PLUG = 0,
	HWE_BAT_CHARGER_PLUG,
	HWE_BAT_CHARGER_OVERVOLTAGE,
	HWE_BAT_BATTERY_LOW,
	HWE_BAT_POWER_FAILED,
	HWE_BAT_CHARGER_FULL,
	HWE_POWER_KEY,
} HW_EVENT_T;

typedef enum {

	PJT_NONE = 0,
	PJT_CVBS,
	PJT_HEADSET,
} PHONEJACK_TYPE;

typedef enum {

	PWRK_UNPRESS = 0,
	PWRK_PRESS,
} POWERKEY_TYPE;

typedef enum {

	UNPLUG = 0,
	PLUGGED,
} PLUG_TYPE;

struct mxc_hw_event {
	unsigned int event;
	int args;
};

#ifdef __KERNEL__
extern int hw_event_send(int priority, struct mxc_hw_event *new_event);
#endif

#endif				/* HW_EVENT_H */