uapi: Add QTI specific header for UART
Create QTI specific header for UART IOCTLs. Bluetooth uses the IOCTL to control UART clock/power states. Choose higher numerical value for UART IOCTL macros to avoid any conflict with upstream addition for new IOCTL. Change-Id: I6dbabe30f5a12b5bc21cfe8fb16cdccfcc770484 Signed-off-by: Akash Asthana <akashast@codeaurora.org>
This commit is contained in:
parent
858cd7768a
commit
2b1ef2cd9e
@ -25,6 +25,7 @@
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <uapi/linux/msm_geni_serial.h>
|
||||
|
||||
/* UART specific GENI registers */
|
||||
#define SE_UART_LOOPBACK_CFG (0x22C)
|
||||
@ -537,15 +538,18 @@ static int msm_geni_serial_ioctl(struct uart_port *uport, unsigned int cmd,
|
||||
int ret = -ENOIOCTLCMD;
|
||||
|
||||
switch (cmd) {
|
||||
case TIOCPMGET: {
|
||||
case TIOCPMGET:
|
||||
case MSM_GENI_SERIAL_TIOCPMGET: {
|
||||
ret = vote_clock_on(uport);
|
||||
break;
|
||||
}
|
||||
case TIOCPMPUT: {
|
||||
case TIOCPMPUT:
|
||||
case MSM_GENI_SERIAL_TIOCPMPUT: {
|
||||
ret = vote_clock_off(uport);
|
||||
break;
|
||||
}
|
||||
case TIOCPMACT: {
|
||||
case TIOCPMACT:
|
||||
case MSM_GENI_SERIAL_TIOCPMACT: {
|
||||
ret = !pm_runtime_status_suspended(uport->dev);
|
||||
break;
|
||||
}
|
||||
|
@ -384,6 +384,7 @@ gen_headers_out_arm = [
|
||||
"linux/msdos_fs.h",
|
||||
"linux/msg.h",
|
||||
"linux/msm_dsps.h",
|
||||
"linux/msm_geni_serial.h",
|
||||
"linux/msm_ion.h",
|
||||
"linux/msm_ion_ids.h",
|
||||
"linux/msm_ipa.h",
|
||||
|
@ -379,6 +379,7 @@ gen_headers_out_arm64 = [
|
||||
"linux/msdos_fs.h",
|
||||
"linux/msg.h",
|
||||
"linux/msm_dsps.h",
|
||||
"linux/msm_geni_serial.h",
|
||||
"linux/msm_ion.h",
|
||||
"linux/msm_ion_ids.h",
|
||||
"linux/msm_ipa.h",
|
||||
|
15
include/uapi/linux/msm_geni_serial.h
Normal file
15
include/uapi/linux/msm_geni_serial.h
Normal file
@ -0,0 +1,15 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __UAPI_LINUX_MSM_GENI_SERIAL_H
|
||||
#define __UAPI_LINUX_MSM_GENI_SERIAL_H
|
||||
|
||||
/* IOCTLS used by BT clients to control UART power state */
|
||||
|
||||
#define MSM_GENI_SERIAL_TIOCPMGET 0x54ED /* PM get */
|
||||
#define MSM_GENI_SERIAL_TIOCPMPUT 0x54EE /* PM put */
|
||||
#define MSM_GENI_SERIAL_TIOCPMACT 0x54EF /* PM is active */
|
||||
|
||||
#endif /* __UAPI_LINUX_MSM_GENI_SERIAL_H */
|
Loading…
Reference in New Issue
Block a user