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