summaryrefslogtreecommitdiff
path: root/drivers/mxc/gps_ioctrl/agpsgpiodev.h
blob: 815890578f4aa2235c8f3fb994a48a1261975355 (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
/*
 * Copyright 2008-2009 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
 */

/*!
 * @file agpsgpiodev.h
 *
 * @brief head file of Simple character device interface for AGPS kernel module.
 *
 * @ingroup
 */

#ifndef AGPSGPIODEV_H
#define AGPSGPIODEV_H

#include <linux/ioctl.h>

#define USE_BLOCKING		/* Test driver with blocking calls */
#undef USE_FASYNC		/* Test driver with async notification */

/* The major device number. We can't rely on dynamic registration any more
   because ioctls need to know it */
#define MAJOR_NUM 100

#define IOCTL_WRITEGPIO   _IOWR(MAJOR_NUM, 1, char *)
#define IOCTL_READGPIO    _IOR(MAJOR_NUM, 2, char *)
#define IOCTL_MAXNUMBER   2

/* The name of the device file */
#define AGPSGPIO_DEVICE_FILE_NAME "agpsgpio"

/* Exported prototypes */
int init_chrdev(struct device *dev);
void cleanup_chrdev(void);
void wakeup(void);

#endif