Merge "uapi: Add QTI specific header for UART"

This commit is contained in:
qctecmdr 2020-12-08 19:20:02 -08:00 • committed by Gerrit - the friendly Code Review server
commit 32447710b0
4 changed files with 24 additions and 3 deletions

View file

@ -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;
}

View file

@ -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",

View file

@ -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",

View 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 */