Home | History | Annotate | Line # | Download | only in i2c
      1  1.2  riastrad /*	$NetBSD: ch7006.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) 2009 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_CH7006_H__
     30  1.1  riastrad #define __DRM_I2C_CH7006_H__
     31  1.1  riastrad 
     32  1.1  riastrad /**
     33  1.1  riastrad  * struct ch7006_encoder_params
     34  1.1  riastrad  *
     35  1.1  riastrad  * Describes how the ch7006 is wired up with the GPU. It should be
     36  1.1  riastrad  * used as the @params parameter of its @set_config method.
     37  1.1  riastrad  *
     38  1.1  riastrad  * See "http://www.chrontel.com/pdf/7006.pdf" for their precise
     39  1.1  riastrad  * meaning.
     40  1.1  riastrad  */
     41  1.1  riastrad struct ch7006_encoder_params {
     42  1.1  riastrad 	enum {
     43  1.1  riastrad 		CH7006_FORMAT_RGB16 = 0,
     44  1.1  riastrad 		CH7006_FORMAT_YCrCb24m16,
     45  1.1  riastrad 		CH7006_FORMAT_RGB24m16,
     46  1.1  riastrad 		CH7006_FORMAT_RGB15,
     47  1.1  riastrad 		CH7006_FORMAT_RGB24m12C,
     48  1.1  riastrad 		CH7006_FORMAT_RGB24m12I,
     49  1.1  riastrad 		CH7006_FORMAT_RGB24m8,
     50  1.1  riastrad 		CH7006_FORMAT_RGB16m8,
     51  1.1  riastrad 		CH7006_FORMAT_RGB15m8,
     52  1.1  riastrad 		CH7006_FORMAT_YCrCb24m8,
     53  1.1  riastrad 	} input_format;
     54  1.1  riastrad 
     55  1.1  riastrad 	enum {
     56  1.1  riastrad 		CH7006_CLOCK_SLAVE = 0,
     57  1.1  riastrad 		CH7006_CLOCK_MASTER,
     58  1.1  riastrad 	} clock_mode;
     59  1.1  riastrad 
     60  1.1  riastrad 	enum {
     61  1.1  riastrad 		CH7006_CLOCK_EDGE_NEG = 0,
     62  1.1  riastrad 		CH7006_CLOCK_EDGE_POS,
     63  1.1  riastrad 	} clock_edge;
     64  1.1  riastrad 
     65  1.1  riastrad 	int xcm, pcm;
     66  1.1  riastrad 
     67  1.1  riastrad 	enum {
     68  1.1  riastrad 		CH7006_SYNC_SLAVE = 0,
     69  1.1  riastrad 		CH7006_SYNC_MASTER,
     70  1.1  riastrad 	} sync_direction;
     71  1.1  riastrad 
     72  1.1  riastrad 	enum {
     73  1.1  riastrad 		CH7006_SYNC_SEPARATED = 0,
     74  1.1  riastrad 		CH7006_SYNC_EMBEDDED,
     75  1.1  riastrad 	} sync_encoding;
     76  1.1  riastrad 
     77  1.1  riastrad 	enum {
     78  1.1  riastrad 		CH7006_POUT_1_8V = 0,
     79  1.1  riastrad 		CH7006_POUT_3_3V,
     80  1.1  riastrad 	} pout_level;
     81  1.1  riastrad 
     82  1.1  riastrad 	enum {
     83  1.1  riastrad 		CH7006_ACTIVE_HSYNC = 0,
     84  1.1  riastrad 		CH7006_ACTIVE_DSTART,
     85  1.1  riastrad 	} active_detect;
     86  1.1  riastrad };
     87  1.1  riastrad 
     88  1.1  riastrad #endif
     89