From 9467a3f62c6a32fde8eb5ec10407b9c560995108 Mon Sep 17 00:00:00 2001 From: Anuj Gangwar Date: Wed, 20 Mar 2019 11:41:42 +0530 Subject: include: uapi: move saf775x_ioctl.h with IOCTL Create new header file saf775x_ioctl.h in include/uapi/misc/. The new file has IOCTL definitions which is moved from drivers/misc/saf775x/. Bug 2062672 Change-Id: Id180b15964d3e3a89da85a9117586b8b79ab641a Signed-off-by: Anuj Gangwar Reviewed-on: https://git-master.nvidia.com/r/2077102 (cherry picked from commit 8c2f5f580dadb73e12b1a1866c8c4f267c6d0594) Reviewed-on: https://git-master.nvidia.com/r/2109932 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/uapi/misc/saf775x_ioctl.h | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/uapi/misc/saf775x_ioctl.h (limited to 'include/uapi') diff --git a/include/uapi/misc/saf775x_ioctl.h b/include/uapi/misc/saf775x_ioctl.h new file mode 100644 index 000000000..95bd83476 --- /dev/null +++ b/include/uapi/misc/saf775x_ioctl.h @@ -0,0 +1,57 @@ + /* + * saf775x_ioctl.h -- SAF775X Soc Audio driver IO control + * + * Copyright (c) 2014-2019 NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHIN + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __UAPI_SAF775X_IOCTL_H__ +#define __UAPI_SAF775X_IOCTL_H__ + +#include + +struct saf775x_cmd { + unsigned int reg; + unsigned int reg_len; + unsigned long val; + unsigned int val_len; +}; + +struct saf775x_control_param { + char name[20]; + unsigned int *reg; + unsigned int num_reg; + int val; +}; + +struct saf775x_control_info { + char name[20]; + int min; + int max; + int step; + int val; +}; + +#define SAF775X_CONTROL_SET_IOCTL _IOW(0xF4, 0x01, struct saf775x_cmd) +#define SAF775x_CODEC_RESET_IOCTL _IO(0xF4, 0x02) +#define SAF775X_CONTROL_GET_IOCTL _IOR(0xF4, 0x03, struct saf775x_cmd) +#define SAF775X_CONTROL_GET_MIXER _IOR(0xF4, 0x04, \ + struct saf775x_control_info) +#define SAF775X_CONTROL_SET_MIXER _IOW(0xF4, 0x05, \ + struct saf775x_control_param) +#define SAF775X_CONTROL_SETIF _IOW(0xF4, 0x6, unsigned int) +#define SAF775X_CONTROL_GETIF _IO(0xF4, 0x7) +#define SAF775X_CONTROL_KEYCODE _IOW(0xF4, 0x8, struct saf775x_cmd) + +#endif /* __UAPI_SAF775X_IOCTL_H__ */ -- cgit v1.2.2