1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
/*
* Copyright (C) 2013 Samsung Electronics, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _SII8620_H_
#define _SII8620_H_
#ifdef __KERNEL__
/* Different MHL Dongle/bridge which are used; may be
* these enums are Samsung-Specific,but they do represent various
* versions of dongles.
*/
enum dongle_type {
DONGLE_NONE = 0,
DONGLE_9290,
DONGLE_9292,
};
enum connector_type {
CONN_NONE = 0,
CONN_5_PIN, /* USB-type */
CONN_11_PIN, /* Galaxy-S3? */
CONN_30_PIN, /* Galaxy Tabs */
};
enum mhl_attached_type {
MHL_UNHANDLED = 0,
MHL_MUIC_DEV,
MHL_SMART_DOCK,
MHL_MM_DOCK,
};
enum mhl_sleep_state {
MHL_SUSPEND_STATE = 0,
MHL_RESUME_STATE = 1,
};
enum mhl_gpio_type {
MHL_GPIO_UNKNOWN_TYPE = 0,
MHL_GPIO_AP_GPIO = 1,
MHL_GPIO_PM_GPIO = 2,
MHL_GPIO_PM_MPP = 3,
};
#define MAX_ELEC_TUNING_CNT 150
struct sii8620_platform_data {
/* Called to setup board-specific power operations */
void (*power)(bool on);
/* In case,when connectors are not able to automatically switch the
* D+/D- Path to SII8240,do the switching manually.
*/
void (*enable_path)(bool enable);
struct i2c_client *tmds_client;
struct i2c_client *usbt_client;
struct i2c_client *hdmi_client;
struct i2c_client *disc_client;
struct i2c_client *tpi_client;
struct i2c_client *cbus_client;
struct clk *mhl_clk;
/* to handle board-specific connector info & callback */
enum dongle_type dongle;
enum connector_type conn;
int (*reg_notifier)(struct notifier_block *nb);
int (*unreg_notifier)(struct notifier_block *nb);
u8 power_state;
u32 swing_level_v2;
u32 swing_level_v3;
#ifdef CONFIG_TESTONLY_SYSFS_SW_REG_TUNING
u32 m_offset[MAX_ELEC_TUNING_CNT];
u32 m_page[MAX_ELEC_TUNING_CNT];
u32 m_value[MAX_ELEC_TUNING_CNT];
int m_cnt;
u16 m_reg_addr;
#endif
bool drm_workaround;
int ddc_i2c_num;
void (*mhl_sel)(bool enable);
int (*get_irq)(void);
int gpio;
void (*hw_reset)(void);
void (*gpio_cfg)(enum mhl_sleep_state sleep_status);
void (*charger_mhl_cb)(bool on, int mhl_charger);
int (*muic_otg_set)(int on);
int charging_type;
/* void (*vbus_present)(bool on); */
#ifdef CONFIG_SAMSUNG_MHL_UNPOWERED
int (*get_vbus_status)(void);
void (*sii9234_otg_control)(bool onoff);
#endif
#if defined(CONFIG_OF)
int gpio_mhl_scl;
int gpio_mhl_sda;
int gpio_mhl_irq;
int gpio_mhl_power_en;
int gpio_mhl_en;
int gpio_mhl_reset;
int gpio_mhl_wakeup;
int gpio_ta_int;
enum mhl_gpio_type gpio_mhl_reset_type;
enum mhl_gpio_type gpio_mhl_en_type;
char *charger_name;
#endif
#ifdef CONFIG_SII8620_CHECK_MONITOR
uint32_t monitor_cmd;
void (*link_monitor)(u8 cmd_value);
#endif
bool mhl3_dvi_set;
bool dvi_ver_ck;
};
extern int system_rev;
int acc_register_notifier(struct notifier_block *nb);
#endif /* __SII8620_H__ */
#endif
|