zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

hsi_char.h (1242B) - Raw


      1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
      2 /*
      3  * Part of the HSI character device driver.
      4  *
      5  * Copyright (C) 2010 Nokia Corporation. All rights reserved.
      6  *
      7  * Contact: Andras Domokos <andras.domokos at nokia.com>
      8  */
      9 
     10 #ifndef __HSI_CHAR_H
     11 #define __HSI_CHAR_H
     12 
     13 #include <linux/types.h>
     14 
     15 #define HSI_CHAR_MAGIC		'k'
     16 #define HSC_IOW(num, dtype)	_IOW(HSI_CHAR_MAGIC, num, dtype)
     17 #define HSC_IOR(num, dtype)	_IOR(HSI_CHAR_MAGIC, num, dtype)
     18 #define HSC_IOWR(num, dtype)	_IOWR(HSI_CHAR_MAGIC, num, dtype)
     19 #define HSC_IO(num)		_IO(HSI_CHAR_MAGIC, num)
     20 
     21 #define HSC_RESET		HSC_IO(16)
     22 #define HSC_SET_PM		HSC_IO(17)
     23 #define HSC_SEND_BREAK		HSC_IO(18)
     24 #define HSC_SET_RX		HSC_IOW(19, struct hsc_rx_config)
     25 #define HSC_GET_RX		HSC_IOW(20, struct hsc_rx_config)
     26 #define HSC_SET_TX		HSC_IOW(21, struct hsc_tx_config)
     27 #define HSC_GET_TX		HSC_IOW(22, struct hsc_tx_config)
     28 
     29 #define HSC_PM_DISABLE		0
     30 #define HSC_PM_ENABLE		1
     31 
     32 #define HSC_MODE_STREAM		1
     33 #define HSC_MODE_FRAME		2
     34 #define HSC_FLOW_SYNC		0
     35 #define HSC_ARB_RR		0
     36 #define HSC_ARB_PRIO		1
     37 
     38 struct hsc_rx_config {
     39 	__u32 mode;
     40 	__u32 flow;
     41 	__u32 channels;
     42 };
     43 
     44 struct hsc_tx_config {
     45 	__u32 mode;
     46 	__u32 channels;
     47 	__u32 speed;
     48 	__u32 arb_mode;
     49 };
     50 
     51 #endif /* __HSI_CHAR_H */