exynos_hdmi.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. *
  3. * Copyright (c) 2011 Samsung Electronics Co., Ltd.
  4. * Authors:
  5. * Inki Dae <inki.dae@samsung.com>
  6. * Seung-Woo Kim <sw0312.kim@samsung.com>
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a
  9. * copy of this software and associated documentation files (the "Software"),
  10. * to deal in the Software without restriction, including without limitation
  11. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  12. * and/or sell copies of the Software, and to permit persons to whom the
  13. * Software is furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice (including the next
  16. * paragraph) shall be included in all copies or substantial portions of the
  17. * Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  22. * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  23. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  24. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  25. * OTHER DEALINGS IN THE SOFTWARE.
  26. */
  27. #ifndef _EXYNOS_HDMI_H_
  28. #define _EXYNOS_HDMI_H_
  29. struct hdmi_conf {
  30. int width;
  31. int height;
  32. int vrefresh;
  33. bool interlace;
  34. const u8 *hdmiphy_data;
  35. const struct hdmi_preset_conf *conf;
  36. };
  37. struct hdmi_resources {
  38. struct clk *hdmi;
  39. struct clk *sclk_hdmi;
  40. struct clk *sclk_pixel;
  41. struct clk *sclk_hdmiphy;
  42. struct clk *hdmiphy;
  43. struct regulator_bulk_data *regul_bulk;
  44. int regul_count;
  45. };
  46. struct hdmi_context {
  47. struct device *dev;
  48. struct drm_device *drm_dev;
  49. struct fb_videomode *default_timing;
  50. unsigned int default_win;
  51. unsigned int default_bpp;
  52. bool hpd_handle;
  53. bool enabled;
  54. struct resource *regs_res;
  55. /** base address of HDMI registers */
  56. void __iomem *regs;
  57. /** HDMI hotplug interrupt */
  58. unsigned int irq;
  59. /** workqueue for delayed work */
  60. struct workqueue_struct *wq;
  61. /** hotplug handling work */
  62. struct work_struct hotplug_work;
  63. struct i2c_client *ddc_port;
  64. struct i2c_client *hdmiphy_port;
  65. /** current hdmiphy conf index */
  66. int cur_conf;
  67. /** other resources */
  68. struct hdmi_resources res;
  69. void *parent_ctx;
  70. };
  71. void hdmi_attach_ddc_client(struct i2c_client *ddc);
  72. void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy);
  73. extern struct i2c_driver hdmiphy_driver;
  74. extern struct i2c_driver ddc_driver;
  75. #endif