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
|
/*
* Copyright (C) 2012 Samsung Electronics
*
* Author: Dharam Kumar <dharam.kr@samsung.com>
*
* Date: 3:00 PM, 31st May,2012
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __SII8240_H__
#define __SII8240_H__
#include <linux/notifier.h>
/* 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_DETTACHED = 0,
MHL_ATTACHED,
};
struct sii8240_platform_data {
/* Called to setup board-specific power operations */
void (*power)(int 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 *hdmi_client;
struct i2c_client *disc_client;
struct i2c_client *tpi_client;
struct i2c_client *cbus_client;
/* to handle board-specific connector info & callback */
enum dongle_type dongle;
enum connector_type conn;
u8 power_state;
u32 swing_level;
int ddc_i2c_num;
void (*init)(void);
void (*mhl_sel)(bool enable);
void (*hw_onoff)(bool on);
void (*hw_reset)(void);
void (*enable_vbus)(bool enable);
#if defined(__MHL_NEW_CBUS_MSC_CMD__)
void (*vbus_present)(bool on, int value);
#else
void (*vbus_present)(bool on);
#endif
#ifdef CONFIG_SAMSUNG_MHL_UNPOWERED
int (*get_vbus_status)(void);
void (*sii9234_otg_control)(bool onoff);
#endif
void (*sii8240_muic_cb)(bool attached, int charger);
int charging_type;
#ifdef CONFIG_EXTCON
const char *extcon_name;
#endif
#ifdef CONFIG_OF
int mhl_scl;
int mhl_sda;
int mhl_en;
int mhl_reset;
int mhl_wakeup;
int ta_int;
char *charger_name;
#endif
};
#endif /* __SII8240_H__ */
|