Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 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 | |
| 28 | #ifndef _EXYNOS_HDMI_H_ |
| 29 | #define _EXYNOS_HDMI_H_ |
| 30 | |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 31 | struct hdmi_resources { |
| 32 | struct clk *hdmi; |
| 33 | struct clk *sclk_hdmi; |
| 34 | struct clk *sclk_pixel; |
| 35 | struct clk *sclk_hdmiphy; |
| 36 | struct clk *hdmiphy; |
| 37 | struct regulator_bulk_data *regul_bulk; |
| 38 | int regul_count; |
| 39 | }; |
| 40 | |
| 41 | struct hdmi_context { |
| 42 | struct device *dev; |
| 43 | struct drm_device *drm_dev; |
| 44 | struct fb_videomode *default_timing; |
Joonyoung Shim | 3ecd70b | 2012-03-16 18:47:03 +0900 | [diff] [blame^] | 45 | unsigned int is_v13:1; |
Seung-Woo Kim | d840832 | 2011-12-21 17:39:39 +0900 | [diff] [blame] | 46 | unsigned int default_win; |
| 47 | unsigned int default_bpp; |
| 48 | bool hpd_handle; |
| 49 | bool enabled; |
| 50 | |
| 51 | struct resource *regs_res; |
| 52 | /** base address of HDMI registers */ |
| 53 | void __iomem *regs; |
| 54 | /** HDMI hotplug interrupt */ |
| 55 | unsigned int irq; |
| 56 | /** workqueue for delayed work */ |
| 57 | struct workqueue_struct *wq; |
| 58 | /** hotplug handling work */ |
| 59 | struct work_struct hotplug_work; |
| 60 | |
| 61 | struct i2c_client *ddc_port; |
| 62 | struct i2c_client *hdmiphy_port; |
| 63 | |
| 64 | /** current hdmiphy conf index */ |
| 65 | int cur_conf; |
| 66 | /** other resources */ |
| 67 | struct hdmi_resources res; |
| 68 | |
| 69 | void *parent_ctx; |
| 70 | }; |
| 71 | |
| 72 | |
| 73 | void hdmi_attach_ddc_client(struct i2c_client *ddc); |
| 74 | void hdmi_attach_hdmiphy_client(struct i2c_client *hdmiphy); |
| 75 | |
| 76 | extern struct i2c_driver hdmiphy_driver; |
| 77 | extern struct i2c_driver ddc_driver; |
| 78 | |
| 79 | #endif |