Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Part of the HSI character device driver.
0004  *
0005  * Copyright (C) 2010 Nokia Corporation. All rights reserved.
0006  *
0007  * Contact: Andras Domokos <andras.domokos at nokia.com>
0008  *
0009  * This program is free software; you can redistribute it and/or
0010  * modify it under the terms of the GNU General Public License
0011  * version 2 as published by the Free Software Foundation.
0012  *
0013  * This program is distributed in the hope that it will be useful, but
0014  * WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016  * General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU General Public License
0019  * along with this program; if not, write to the Free Software
0020  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
0021  * 02110-1301 USA
0022  */
0023 
0024 #ifndef __HSI_CHAR_H
0025 #define __HSI_CHAR_H
0026 
0027 #include <linux/types.h>
0028 
0029 #define HSI_CHAR_MAGIC      'k'
0030 #define HSC_IOW(num, dtype) _IOW(HSI_CHAR_MAGIC, num, dtype)
0031 #define HSC_IOR(num, dtype) _IOR(HSI_CHAR_MAGIC, num, dtype)
0032 #define HSC_IOWR(num, dtype)    _IOWR(HSI_CHAR_MAGIC, num, dtype)
0033 #define HSC_IO(num)     _IO(HSI_CHAR_MAGIC, num)
0034 
0035 #define HSC_RESET       HSC_IO(16)
0036 #define HSC_SET_PM      HSC_IO(17)
0037 #define HSC_SEND_BREAK      HSC_IO(18)
0038 #define HSC_SET_RX      HSC_IOW(19, struct hsc_rx_config)
0039 #define HSC_GET_RX      HSC_IOW(20, struct hsc_rx_config)
0040 #define HSC_SET_TX      HSC_IOW(21, struct hsc_tx_config)
0041 #define HSC_GET_TX      HSC_IOW(22, struct hsc_tx_config)
0042 
0043 #define HSC_PM_DISABLE      0
0044 #define HSC_PM_ENABLE       1
0045 
0046 #define HSC_MODE_STREAM     1
0047 #define HSC_MODE_FRAME      2
0048 #define HSC_FLOW_SYNC       0
0049 #define HSC_ARB_RR      0
0050 #define HSC_ARB_PRIO        1
0051 
0052 struct hsc_rx_config {
0053     __u32 mode;
0054     __u32 flow;
0055     __u32 channels;
0056 };
0057 
0058 struct hsc_tx_config {
0059     __u32 mode;
0060     __u32 channels;
0061     __u32 speed;
0062     __u32 arb_mode;
0063 };
0064 
0065 #endif /* __HSI_CHAR_H */