]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/uapi/linux/gps_proxy.h
Add GPS Proxy Driver
[karo-tx-linux.git] / include / uapi / linux / gps_proxy.h
1 /* Copyright (c) 2016, The Linux Foundation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License version 2 and
5  * only version 2 as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  */
12
13 #ifndef __GPS_PROXY_H__
14 #define __GPS_PROXY_H__
15
16 #define QMI_LOC_NMEA_STRING_MAX_LENGTH_V02 201
17
18 enum QGPS_TTY_IOCTL_CMDS {
19         QGPS_REGISTER_HANDLE_IOC = 0,
20         QGPS_SEND_NMEA_IOC,
21         QGPS_IS_ACTIVE_IOC,
22 };
23
24 #define QGPS_IOC_MAGIC          'q'
25 #define QGPS_REGISTER_HANDLE    _IO(QGPS_IOC_MAGIC, QGPS_REGISTER_HANDLE_IOC)
26 #define QGPS_SEND_NMEA          _IO(QGPS_IOC_MAGIC, QGPS_SEND_NMEA_IOC)
27 #define QGPS_IS_ACTIVE          _IO(QGPS_IOC_MAGIC, QGPS_IS_ACTIVE_IOC)
28
29 struct gps_proxy_data {
30         size_t nmea_length;
31         char nmea_string[QMI_LOC_NMEA_STRING_MAX_LENGTH_V02];
32 };
33
34 #endif /* __GPS_PROXY_H__ */