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