1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Part of the HSI character device driver. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2010 Nokia Corporation. All rights reserved. 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * Contact: Andras Domokos <andras.domokos at nokia.com> 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 10*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License 11*4882a593Smuzhiyun * version 2 as published by the Free Software Foundation. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, but 14*4882a593Smuzhiyun * WITHOUT ANY WARRANTY; without even the implied warranty of 15*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16*4882a593Smuzhiyun * General Public License for more details. 17*4882a593Smuzhiyun * 18*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License 19*4882a593Smuzhiyun * along with this program; if not, write to the Free Software 20*4882a593Smuzhiyun * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 21*4882a593Smuzhiyun * 02110-1301 USA 22*4882a593Smuzhiyun */ 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun #ifndef __HSI_CHAR_H 25*4882a593Smuzhiyun #define __HSI_CHAR_H 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #include <linux/types.h> 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun #define HSI_CHAR_MAGIC 'k' 30*4882a593Smuzhiyun #define HSC_IOW(num, dtype) _IOW(HSI_CHAR_MAGIC, num, dtype) 31*4882a593Smuzhiyun #define HSC_IOR(num, dtype) _IOR(HSI_CHAR_MAGIC, num, dtype) 32*4882a593Smuzhiyun #define HSC_IOWR(num, dtype) _IOWR(HSI_CHAR_MAGIC, num, dtype) 33*4882a593Smuzhiyun #define HSC_IO(num) _IO(HSI_CHAR_MAGIC, num) 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #define HSC_RESET HSC_IO(16) 36*4882a593Smuzhiyun #define HSC_SET_PM HSC_IO(17) 37*4882a593Smuzhiyun #define HSC_SEND_BREAK HSC_IO(18) 38*4882a593Smuzhiyun #define HSC_SET_RX HSC_IOW(19, struct hsc_rx_config) 39*4882a593Smuzhiyun #define HSC_GET_RX HSC_IOW(20, struct hsc_rx_config) 40*4882a593Smuzhiyun #define HSC_SET_TX HSC_IOW(21, struct hsc_tx_config) 41*4882a593Smuzhiyun #define HSC_GET_TX HSC_IOW(22, struct hsc_tx_config) 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #define HSC_PM_DISABLE 0 44*4882a593Smuzhiyun #define HSC_PM_ENABLE 1 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun #define HSC_MODE_STREAM 1 47*4882a593Smuzhiyun #define HSC_MODE_FRAME 2 48*4882a593Smuzhiyun #define HSC_FLOW_SYNC 0 49*4882a593Smuzhiyun #define HSC_ARB_RR 0 50*4882a593Smuzhiyun #define HSC_ARB_PRIO 1 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun struct hsc_rx_config { 53*4882a593Smuzhiyun __u32 mode; 54*4882a593Smuzhiyun __u32 flow; 55*4882a593Smuzhiyun __u32 channels; 56*4882a593Smuzhiyun }; 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun struct hsc_tx_config { 59*4882a593Smuzhiyun __u32 mode; 60*4882a593Smuzhiyun __u32 channels; 61*4882a593Smuzhiyun __u32 speed; 62*4882a593Smuzhiyun __u32 arb_mode; 63*4882a593Smuzhiyun }; 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun #endif /* __HSI_CHAR_H */ 66