xref: /linux/include/drm/i2c/sil164.h (revision db5d28c0bfe566908719bec8e25443aabecbb802)
1e190bfe5SFrancisco Jerez /*
2e190bfe5SFrancisco Jerez  * Copyright (C) 2010 Francisco Jerez.
3e190bfe5SFrancisco Jerez  * All Rights Reserved.
4e190bfe5SFrancisco Jerez  *
5e190bfe5SFrancisco Jerez  * Permission is hereby granted, free of charge, to any person obtaining
6e190bfe5SFrancisco Jerez  * a copy of this software and associated documentation files (the
7e190bfe5SFrancisco Jerez  * "Software"), to deal in the Software without restriction, including
8e190bfe5SFrancisco Jerez  * without limitation the rights to use, copy, modify, merge, publish,
9e190bfe5SFrancisco Jerez  * distribute, sublicense, and/or sell copies of the Software, and to
10e190bfe5SFrancisco Jerez  * permit persons to whom the Software is furnished to do so, subject to
11e190bfe5SFrancisco Jerez  * the following conditions:
12e190bfe5SFrancisco Jerez  *
13e190bfe5SFrancisco Jerez  * The above copyright notice and this permission notice (including the
14e190bfe5SFrancisco Jerez  * next paragraph) shall be included in all copies or substantial
15e190bfe5SFrancisco Jerez  * portions of the Software.
16e190bfe5SFrancisco Jerez  *
17e190bfe5SFrancisco Jerez  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18e190bfe5SFrancisco Jerez  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19e190bfe5SFrancisco Jerez  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20e190bfe5SFrancisco Jerez  * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
21e190bfe5SFrancisco Jerez  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22e190bfe5SFrancisco Jerez  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23e190bfe5SFrancisco Jerez  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24e190bfe5SFrancisco Jerez  *
25e190bfe5SFrancisco Jerez  */
26e190bfe5SFrancisco Jerez 
27e190bfe5SFrancisco Jerez #ifndef __DRM_I2C_SIL164_H__
28e190bfe5SFrancisco Jerez #define __DRM_I2C_SIL164_H__
29e190bfe5SFrancisco Jerez 
30e190bfe5SFrancisco Jerez /**
31e190bfe5SFrancisco Jerez  * struct sil164_encoder_params
32e190bfe5SFrancisco Jerez  *
33e190bfe5SFrancisco Jerez  * Describes how the sil164 is connected to the GPU. It should be used
34e190bfe5SFrancisco Jerez  * as the @params parameter of its @set_config method.
35e190bfe5SFrancisco Jerez  *
36e190bfe5SFrancisco Jerez  * See "http://www.siliconimage.com/docs/SiI-DS-0021-E-164.pdf".
37e190bfe5SFrancisco Jerez  */
38e190bfe5SFrancisco Jerez struct sil164_encoder_params {
39*8e3ed544SJani Nikula 	/* private: FIXME: document the members */
40e190bfe5SFrancisco Jerez 	enum {
41e190bfe5SFrancisco Jerez 		SIL164_INPUT_EDGE_FALLING = 0,
42e190bfe5SFrancisco Jerez 		SIL164_INPUT_EDGE_RISING
43e190bfe5SFrancisco Jerez 	} input_edge;
44e190bfe5SFrancisco Jerez 
45e190bfe5SFrancisco Jerez 	enum {
46e190bfe5SFrancisco Jerez 		SIL164_INPUT_WIDTH_12BIT = 0,
47e190bfe5SFrancisco Jerez 		SIL164_INPUT_WIDTH_24BIT
48e190bfe5SFrancisco Jerez 	} input_width;
49e190bfe5SFrancisco Jerez 
50e190bfe5SFrancisco Jerez 	enum {
51e190bfe5SFrancisco Jerez 		SIL164_INPUT_SINGLE_EDGE = 0,
52e190bfe5SFrancisco Jerez 		SIL164_INPUT_DUAL_EDGE
53e190bfe5SFrancisco Jerez 	} input_dual;
54e190bfe5SFrancisco Jerez 
55e190bfe5SFrancisco Jerez 	enum {
56e190bfe5SFrancisco Jerez 		SIL164_PLL_FILTER_ON = 0,
57e190bfe5SFrancisco Jerez 		SIL164_PLL_FILTER_OFF,
58e190bfe5SFrancisco Jerez 	} pll_filter;
59e190bfe5SFrancisco Jerez 
60e190bfe5SFrancisco Jerez 	int input_skew; /** < Allowed range [-4, 3], use 0 for no de-skew. */
61e190bfe5SFrancisco Jerez 	int duallink_skew; /** < Allowed range [-4, 3]. */
62e190bfe5SFrancisco Jerez };
63e190bfe5SFrancisco Jerez 
64e190bfe5SFrancisco Jerez #endif
65