ch7006.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2009 Francisco Jerez.
  3. * All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining
  6. * a copy of this software and associated documentation files (the
  7. * "Software"), to deal in the Software without restriction, including
  8. * without limitation the rights to use, copy, modify, merge, publish,
  9. * distribute, sublicense, and/or sell copies of the Software, and to
  10. * permit persons to whom the Software is furnished to do so, subject to
  11. * the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the
  14. * next paragraph) shall be included in all copies or substantial
  15. * portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  20. * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
  21. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  22. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  23. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. *
  25. */
  26. #ifndef __DRM_I2C_CH7006_H__
  27. #define __DRM_I2C_CH7006_H__
  28. /**
  29. * struct ch7006_encoder_params
  30. *
  31. * Describes how the ch7006 is wired up with the GPU. It should be
  32. * used as the @params parameter of its @set_config method.
  33. *
  34. * See "http://www.chrontel.com/pdf/7006.pdf" for their precise
  35. * meaning.
  36. */
  37. struct ch7006_encoder_params {
  38. /* private: FIXME: document the members */
  39. enum {
  40. CH7006_FORMAT_RGB16 = 0,
  41. CH7006_FORMAT_YCrCb24m16,
  42. CH7006_FORMAT_RGB24m16,
  43. CH7006_FORMAT_RGB15,
  44. CH7006_FORMAT_RGB24m12C,
  45. CH7006_FORMAT_RGB24m12I,
  46. CH7006_FORMAT_RGB24m8,
  47. CH7006_FORMAT_RGB16m8,
  48. CH7006_FORMAT_RGB15m8,
  49. CH7006_FORMAT_YCrCb24m8,
  50. } input_format;
  51. enum {
  52. CH7006_CLOCK_SLAVE = 0,
  53. CH7006_CLOCK_MASTER,
  54. } clock_mode;
  55. enum {
  56. CH7006_CLOCK_EDGE_NEG = 0,
  57. CH7006_CLOCK_EDGE_POS,
  58. } clock_edge;
  59. int xcm, pcm;
  60. enum {
  61. CH7006_SYNC_SLAVE = 0,
  62. CH7006_SYNC_MASTER,
  63. } sync_direction;
  64. enum {
  65. CH7006_SYNC_SEPARATED = 0,
  66. CH7006_SYNC_EMBEDDED,
  67. } sync_encoding;
  68. enum {
  69. CH7006_POUT_1_8V = 0,
  70. CH7006_POUT_3_3V,
  71. } pout_level;
  72. enum {
  73. CH7006_ACTIVE_HSYNC = 0,
  74. CH7006_ACTIVE_DSTART,
  75. } active_detect;
  76. };
  77. #endif