Merge branch 'afs-dh' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / ia_css_input_port.h
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 /* For MIPI_PORT0_ID to MIPI_PORT2_ID */
16 #include "system_global.h"
17
18 #ifndef __IA_CSS_INPUT_PORT_H
19 #define __IA_CSS_INPUT_PORT_H
20
21 /* @file
22  * This file contains information about the possible input ports for CSS
23  */
24
25 /* Backward compatible for CSS API 2.0 only
26  *  TO BE REMOVED when all drivers move to CSS  API 2.1
27  */
28 #define IA_CSS_CSI2_PORT_4LANE MIPI_PORT0_ID
29 #define IA_CSS_CSI2_PORT_1LANE MIPI_PORT1_ID
30 #define IA_CSS_CSI2_PORT_2LANE MIPI_PORT2_ID
31
32 /* The CSI2 interface supports 2 types of compression or can
33  *  be run without compression.
34  */
35 enum ia_css_csi2_compression_type {
36         IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */
37         IA_CSS_CSI2_COMPRESSION_TYPE_1,    /** Compression scheme 1 */
38         IA_CSS_CSI2_COMPRESSION_TYPE_2     /** Compression scheme 2 */
39 };
40
41 struct ia_css_csi2_compression {
42         enum ia_css_csi2_compression_type type;
43         /** Compression used */
44         unsigned int                      compressed_bits_per_pixel;
45         /** Compressed bits per pixel (only when compression is enabled) */
46         unsigned int                      uncompressed_bits_per_pixel;
47         /** Uncompressed bits per pixel (only when compression is enabled) */
48 };
49
50 /* Input port structure.
51  */
52 struct ia_css_input_port {
53         enum mipi_port_id port; /** Physical CSI-2 port */
54         unsigned int num_lanes; /** Number of lanes used (4-lane port only) */
55         unsigned int timeout;   /** Timeout value */
56         unsigned int rxcount;   /** Register value, should include all lanes */
57         struct ia_css_csi2_compression compression; /** Compression used */
58 };
59
60 #endif /* __IA_CSS_INPUT_PORT_H */