Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a01b0eea authored by Mayank Rana's avatar Mayank Rana
Browse files

USB: Move MBIM interface related IOCTLs definition to uapi directory



USB GSI driver has set of IOCTLS supported specific for MBIM interface.
QBI daemon is duplicating those IOCTLs definitions. Hence move those
IOCTLs definition into uapi based .h file. So QBI and QMUX bridge
daemon can use it and doesn't need to duplicate it. This change also
adds new IOCTL which allows both daemon to query USB cable status when
USB MBIM and USB GPS interfaces are part of USB composition.

Change-Id: I4b392db7877b78ca21465a463aa5fb3c74087fc3
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 8e48e221
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -72,10 +72,6 @@
/* default pkt alignment factor */
#define DEFAULT_PKT_ALIGNMENT_FACTOR 4

#define GSI_MBIM_IOCTL_MAGIC 'o'
#define GSI_MBIM_GET_NTB_SIZE  _IOR(GSI_MBIM_IOCTL_MAGIC, 2, u32)
#define GSI_MBIM_GET_DATAGRAM_COUNT  _IOR(GSI_MBIM_IOCTL_MAGIC, 3, u16)
#define GSI_MBIM_EP_LOOKUP _IOR(GSI_MBIM_IOCTL_MAGIC, 4, struct ep_info)
#define GSI_MBIM_DATA_EP_TYPE_HSUSB 0x2
/* ID for Microsoft OS String */
#define GSI_MBIM_OS_STRING_ID 0xEE
@@ -148,9 +144,9 @@ struct event_queue {
};

struct gsi_ntb_info {
	u32	ntb_input_size;
	u16	ntb_max_datagrams;
	u16	reserved;
	__u32	ntb_input_size;
	__u16	ntb_max_datagrams;
	__u16	reserved;
};

struct gsi_ctrl_pkt {
+6 −0
Original line number Diff line number Diff line
@@ -14,6 +14,12 @@
#define QTI_CTRL_DATA_BUF_INFO \
	_IOR(QTI_CTRL_IOCTL_MAGIC, 6, struct data_buf_info)

#define GSI_MBIM_IOCTL_MAGIC 'o'
#define GSI_MBIM_GET_NTB_SIZE  _IOR(GSI_MBIM_IOCTL_MAGIC, 2, __u32)
#define GSI_MBIM_GET_DATAGRAM_COUNT  _IOR(GSI_MBIM_IOCTL_MAGIC, 3, __u16)
#define GSI_MBIM_EP_LOOKUP _IOR(GSI_MBIM_IOCTL_MAGIC, 4, struct ep_info)
#define GSI_MBIM_GPS_USB_STATUS _IOR(GSI_MBIM_IOCTL_MAGIC, 5, int)

enum peripheral_ep_type {
	DATA_EP_TYPE_RESERVED	= 0x0,
	DATA_EP_TYPE_HSIC	= 0x1,