sii9234_driver.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. /*
  2. * opyright (C) 2011 Samsung Electronics
  3. *
  4. * Authors: Adam Hampson <ahampson@sta.samsung.com>
  5. * Erik Gilling <konkers@android.com>
  6. *
  7. * Additional contributions by : Shankar Bandal <shankar.b@samsung.com>
  8. * Dharam Kumar <dharam.kr@samsung.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. */
  25. #ifndef _SII9234_DRIVER_H_
  26. #define _SII9234_DRIVER_H_
  27. #ifndef CONFIG_SII9234_RCP
  28. #define CONFIG_SII9234_RCP 1
  29. #include <linux/input.h>
  30. #endif
  31. /*Flag for MHL Factory test*/
  32. #define MHL_SS_FACTORY 1
  33. #define T_WAIT_TIMEOUT_RGND_INT 2000
  34. #define T_WAIT_TIMEOUT_DISC_INT 1000
  35. #define T_WAIT_TIMEOUT_RSEN_INT 200
  36. #define T_SRC_VBUS_CBUS_TO_STABLE 200
  37. #define T_SRC_WAKE_PULSE_WIDTH_1 18
  38. #define T_SRC_WAKE_PULSE_WIDTH_2 60
  39. #define T_SRC_WAKE_TO_DISCOVER 500
  40. #define T_SRC_VBUS_CBUS_T0_STABLE 500
  41. #define T_SRC_CBUS_FLOAT 100
  42. #define T_HPD_WIDTH 100
  43. #define T_SRC_RXSENSE_DEGLITCH 110
  44. #define T_SRC_CBUS_DEGLITCH 2
  45. /* MHL TX Addr 0x72 Registers */
  46. #define MHL_TX_IDL_REG 0x02
  47. #define MHL_TX_IDH_REG 0x03
  48. #define MHL_TX_REV_REG 0x04
  49. #define MHL_TX_SRST 0x05
  50. #define MHL_TX_INTR1_REG 0x71
  51. #define MHL_TX_INTR2_REG 0x72 /* Not Documented */
  52. #define MHL_TX_INTR3_REG 0x73 /* Not Documented */
  53. #define MHL_TX_INTR4_REG 0x74
  54. #define MHL_TX_INTR1_ENABLE_REG 0x75
  55. #define MHL_TX_INTR2_ENABLE_REG 0x76 /* Not Documented */
  56. #define MHL_TX_INTR3_ENABLE_REG 0x77 /* Not Documented */
  57. #define MHL_TX_INTR4_ENABLE_REG 0x78
  58. #define MHL_TX_INT_CTRL_REG 0x79
  59. #define MHL_TX_TMDS_CCTRL 0x80
  60. #define MHL_TX_DISC_CTRL1_REG 0x90
  61. #define MHL_TX_DISC_CTRL2_REG 0x91
  62. #define MHL_TX_DISC_CTRL3_REG 0x92
  63. #define MHL_TX_DISC_CTRL4_REG 0x93
  64. #define MHL_TX_DISC_CTRL5_REG 0x94
  65. #define MHL_TX_DISC_CTRL6_REG 0x95
  66. #define MHL_TX_DISC_CTRL7_REG 0x96
  67. #define MHL_TX_DISC_CTRL8_REG 0x97
  68. #define MHL_TX_STAT1_REG 0x98
  69. #define MHL_TX_STAT2_REG 0x99
  70. #define MHL_TX_MHLTX_CTL1_REG 0xA0
  71. #define MHL_TX_MHLTX_CTL2_REG 0xA1
  72. #define MHL_TX_MHLTX_CTL4_REG 0xA3
  73. #define MHL_TX_MHLTX_CTL6_REG 0xA5
  74. #define MHL_TX_MHLTX_CTL7_REG 0xA6
  75. /* MHL TX SYS STAT Registers */
  76. #define MHL_TX_SYSSTAT_REG 0x09
  77. /* MHL TX SYS STAT Register Bits */
  78. #define RSEN_STATUS (1<<2)
  79. /* MHL TX INTR4 Register Bits */
  80. #define RGND_READY_INT (1<<6)
  81. #define VBUS_LOW_INT (1<<5)
  82. #define CBUS_LKOUT_INT (1<<4)
  83. #define MHL_DISC_FAIL_INT (1<<3)
  84. #define MHL_EST_INT (1<<2)
  85. /* MHL TX INTR4_ENABLE 0x78 Register Bits */
  86. #define RGND_READY_MASK (1<<6)
  87. #define CBUS_LKOUT_MASK (1<<4)
  88. #define MHL_DISC_FAIL_MASK (1<<3)
  89. #define MHL_EST_MASK (1<<2)
  90. /* MHL TX INTR1 Register Bits*/
  91. #define HPD_CHANGE_INT (1<<6)
  92. #define RSEN_CHANGE_INT (1<<5)
  93. /* MHL TX INTR1_ENABLE 0x75 Register Bits*/
  94. #define HPD_CHANGE_INT_MASK (1<<6)
  95. #define RSEN_CHANGE_INT_MASK (1<<5)
  96. /* CBUS_INT_1_ENABLE: CBUS Transaction Interrupt #1 Mask */
  97. #define CBUS_INTR1_ENABLE_REG 0x09
  98. #define CBUS_INTR2_ENABLE_REG 0x1F
  99. /* CBUS Interrupt Status Registers*/
  100. #define CBUS_INT_STATUS_1_REG 0x08
  101. #define CBUS_INT_STATUS_2_REG 0x1E
  102. /* CBUS INTR1 STATUS Register bits */
  103. #define MSC_RESP_ABORT (1<<6)
  104. #define MSC_REQ_ABORT (1<<5)
  105. #define MSC_REQ_DONE (1<<4)
  106. #define MSC_MSG_RECD (1<<3)
  107. #define CBUS_DDC_ABORT (1<<2)
  108. /* CBUS INTR1 STATUS 0x09 Enable Mask*/
  109. #define MSC_RESP_ABORT_MASK (1<<6)
  110. #define MSC_REQ_ABORT_MASK (1<<5)
  111. #define MSC_REQ_DONE_MASK (1<<4)
  112. #define MSC_MSG_RECD_MASK (1<<3)
  113. #define CBUS_DDC_ABORT_MASK (1<<2)
  114. /* CBUS INTR2 STATUS Register bits */
  115. #define WRT_STAT_RECD (1<<3)
  116. #define SET_INT_RECD (1<<2)
  117. #define WRT_BURST_RECD (1<<0)
  118. /* CBUS INTR2 STATUS 0x1F Enable Mask*/
  119. #define WRT_STAT_RECD_MASK (1<<3)
  120. #define SET_INT_RECD_MASK (1<<2)
  121. #define WRT_BURST_RECD_MASK (1<<0)
  122. #define MHL_INT_EDID_CHG (1<<1)
  123. #define MHL_RCHANGE_INT 0x20
  124. #define MHL_DCHANGE_INT 0x21
  125. #define MHL_INT_DCAP_CHG (1<<0)
  126. #define MHL_INT_DSCR_CHG (1<<1)
  127. #define MHL_INT_REQ_WRT (1<<2)
  128. #define MHL_INT_GRT_WRT (1<<3)
  129. /* CBUS Control Registers*/
  130. /* Retry count for all MSC commands*/
  131. #define MSC_RETRY_FAIL_LIM_REG 0x1D
  132. #define MSC_REQ_ABORT_REASON_REG 0x0D
  133. #define MSC_RESP_ABORT_REASON_REG 0x0E
  134. /* MSC Requestor/Responder Abort Reason Register bits*/
  135. #define ABORT_BY_PEER (1<<7)
  136. #define UNDEF_CMD (1<<3)
  137. #define TIMEOUT (1<<2)
  138. #define PROTO_ERROR (1<<1)
  139. #define MAX_FAIL (1<<0)
  140. #define REG_CBUS_INTR_STATUS 0x08
  141. /* Responder aborted DDC command at translation layer */
  142. #define BIT_DDC_ABORT (1<<2)
  143. /* Responder sent a VS_MSG packet (response data or command.) */
  144. #define BIT_MSC_MSG_RCV (1<<3)
  145. /* Responder sent ACK packet (not VS_MSG) */
  146. #define BIT_MSC_XFR_DONE (1<<4)
  147. /* Command send aborted on TX side */
  148. #define BIT_MSC_XFR_ABORT (1<<5)
  149. #define BIT_MSC_ABORT (1<<6)
  150. /* Set HPD came from Downstream, */
  151. #define SET_HPD_DOWNSTREAM (1<<6)
  152. /* MHL TX DISC1 Register Bits */
  153. #define DISC_EN (1<<0)
  154. /* MHL TX DISC2 Register Bits */
  155. #define SKIP_GND (1<<6)
  156. #define ATT_THRESH_SHIFT 0x04
  157. #define ATT_THRESH_MASK (0x03 << ATT_THRESH_SHIFT)
  158. #define USB_D_OEN (1<<3)
  159. #define DEGLITCH_TIME_MASK 0x07
  160. #define DEGLITCH_TIME_2MS 0
  161. #define DEGLITCH_TIME_4MS 1
  162. #define DEGLITCH_TIME_8MS 2
  163. #define DEGLITCH_TIME_16MS 3
  164. #define DEGLITCH_TIME_40MS 4
  165. #define DEGLITCH_TIME_50MS 5
  166. #define DEGLITCH_TIME_60MS 6
  167. #define DEGLITCH_TIME_128MS 7
  168. #define DISC_CTRL3_COMM_IMME (1<<7)
  169. #define DISC_CTRL3_FORCE_MHL (1<<6)
  170. #define DISC_CTRL3_FORCE_USB (1<<4)
  171. #define DISC_CTRL3_USB_EN (1<<3)
  172. /* MHL TX DISC4 0x93 Register Bits*/
  173. #define CBUS_DISC_PUP_SEL_SHIFT 6
  174. #define CBUS_DISC_PUP_SEL_MASK (3<<CBUS_DISC_PUP_SEL_SHIFT)
  175. #define CBUS_DISC_PUP_SEL_10K (2<<CBUS_DISC_PUP_SEL_SHIFT)
  176. #define CBUS_DISC_PUP_SEL_OPEN (0<<CBUS_DISC_PUP_SEL_SHIFT)
  177. #define CBUS_IDLE_PUP_SEL_SHIFT 4
  178. #define CBUS_IDLE_PUP_SEL_MASK (3<<CBUS_IDLE_PUP_SEL_SHIFT)
  179. #define CBUS_IDLE_PUP_SEL_OPEN (0<<CBUS_IDLE_PUP_SEL_SHIFT)
  180. /* MHL TX DISC5 0x94 Register Bits */
  181. #define CBUS_MHL_PUP_SEL_MASK 0x03
  182. #define CBUS_MHL_PUP_SEL_5K 0x01
  183. #define CBUS_MHL_PUP_SEL_OPEN 0x00
  184. /* MHL Interrupt Registers */
  185. #define CBUS_MHL_INTR_REG_0 0xA0
  186. #define CBUS_MHL_INTR_REG_1 0xA1
  187. #define CBUS_MHL_INTR_REG_2 0xA2
  188. #define CBUS_MHL_INTR_REG_3 0xA3
  189. /* MHL Status Registers */
  190. #define CBUS_MHL_STATUS_REG_0 0xB0
  191. #define CBUS_MHL_STATUS_REG_1 0xB1
  192. #define CBUS_MHL_STATUS_REG_2 0xB2
  193. #define CBUS_MHL_STATUS_REG_3 0xB3
  194. /* MHL TX DISC6 0x95 Register Bits */
  195. #define USB_D_OVR (1<<7)
  196. #define USB_ID_OVR (1<<6)
  197. #define DVRFLT_SEL (1<<5)
  198. #define BLOCK_RGND_INT (1<<4)
  199. #define SKIP_DEG (1<<3)
  200. #define CI2CA_POL (1<<2)
  201. #define CI2CA_WKUP (1<<1)
  202. #define SINGLE_ATT (1<<0)
  203. /* MHL TX DISC7 0x96 Register Bits
  204. *
  205. * Bits 7 and 6 are labeled as reserved but seem to be related to toggling
  206. * the CBUS signal when generating the wake pulse sequence.
  207. */
  208. #define USB_D_ODN (1<<5)
  209. #define VBUS_CHECK (1<<2)
  210. #define RGND_INTP_MASK 0x03
  211. #define RGND_INTP_OPEN 0
  212. #define RGND_INTP_2K 1
  213. #define RGND_INTP_1K 2
  214. #define RGND_INTP_SHORT 3
  215. /* TPI Addr 0x7A Registers */
  216. #define TPI_DPD_REG 0x3D
  217. #define TPI_PD_TMDS (1<<5)
  218. #define TPI_PD_OSC_EN (1<<4)
  219. #define TPI_TCLK_PHASE (1<<3)
  220. #define TPI_PD_IDCK (1<<2)
  221. #define TPI_PD_OSC (1<<1)
  222. #define TPI_PD (1<<0)
  223. #define CBUS_CONFIG_REG 0x07
  224. #define CBUS_LINK_CONTROL_2_REG 0x31
  225. /* HDMI RX Registers */
  226. #define HDMI_RX_TMDS0_CCTRL1_REG 0x10
  227. #define HDMI_RX_TMDS_CLK_EN_REG 0x11
  228. #define HDMI_RX_TMDS_CH_EN_REG 0x12
  229. #define HDMI_RX_PLL_CALREFSEL_REG 0x17
  230. #define HDMI_RX_PLL_VCOCAL_REG 0x1A
  231. #define HDMI_RX_EQ_DATA0_REG 0x22
  232. #define HDMI_RX_EQ_DATA1_REG 0x23
  233. #define HDMI_RX_EQ_DATA2_REG 0x24
  234. #define HDMI_RX_EQ_DATA3_REG 0x25
  235. #define HDMI_RX_EQ_DATA4_REG 0x26
  236. #define HDMI_RX_TMDS_ZONE_CTRL_REG 0x4C
  237. #define HDMI_RX_TMDS_MODE_CTRL_REG 0x4D
  238. /* MHL SideBand Channel(MSC) Registers */
  239. #define CBUS_MSC_COMMAND_START_REG 0x12
  240. #define CBUS_MSC_OFFSET_REG 0x13
  241. #define CBUS_MSC_FIRST_DATA_OUT_REG 0x14
  242. #define CBUS_MSC_SECOND_DATA_OUT_REG 0x15
  243. #define CBUS_MSC_FIRST_DATA_IN_REG 0x16
  244. #define CBUS_MSC_SECOND_DATA_IN_REG 0x17
  245. #define CBUS_MSC_MSG_CMD_IN_REG 0x18
  246. #define CBUS_MSC_MSG_DATA_IN_REG 0x19
  247. #define CBUS_MSC_WRITE_BURST_LEN 0x20
  248. #define CBUS_MSC_RAP_CONTENT_ON 0x10
  249. #define CBUS_MSC_RAP_CONTENT_OFF 0x11
  250. /* Register Bits for CBUS_MSC_COMMAND_START_REG */
  251. #define START_BIT_MSC_RESERVED (1<<0)
  252. #define START_BIT_MSC_MSG (1<<1)
  253. #define START_BIT_READ_DEVCAP (1<<2)
  254. #define START_BIT_WRITE_STAT_INT (1<<3)
  255. #define START_BIT_WRITE_BURST (1<<4)
  256. /* MHL Device Capability Register offsets */
  257. #define DEVCAP_DEV_STATE 0x00
  258. #define DEVCAP_MHL_VERSION 0x01
  259. #define DEVCAP_DEV_CAT 0x02
  260. #define DEVCAP_ADOPTER_ID_H 0x03
  261. #define DEVCAP_ADOPTER_ID_L 0x04
  262. #define DEVCAP_VID_LINK_MODE 0x05
  263. #define DEVCAP_AUD_LINK_MODE 0x06
  264. #define DEVCAP_VIDEO_TYPE 0x07
  265. #define DEVCAP_LOG_DEV_MAP 0x08
  266. #define DEVCAP_BANDWIDTH 0x09
  267. #define DEVCAP_DEV_FEATURE_FLAG 0x0A
  268. #define DEVCAP_DEVICE_ID_H 0x0B
  269. #define DEVCAP_DEVICE_ID_L 0x0C
  270. #define DEVCAP_SCRATCHPAD_SIZE 0x0D
  271. #define DEVCAP_INT_STAT_SIZE 0x0E
  272. #define DEVCAP_RESERVED 0x0F
  273. #define BIT0 0x01
  274. #define BIT1 0x02
  275. #define BIT2 0x04
  276. #define BIT3 0x08
  277. #define BIT4 0x10
  278. #define BIT5 0x20
  279. #define BIT6 0x40
  280. #define BIT7 0x80
  281. #define MHL_DEV_CATEGORY_POW_BIT (1<<4)
  282. /* Device Capability Ready Bit */
  283. #define MHL_STATUS_DCAP_READY (1<<0)
  284. #define MHL_FEATURE_RCP_SUPPORT (1<<0)
  285. #define MHL_FEATURE_RAP_SUPPORT (1<<1)
  286. #define MHL_FEATURE_SP_SUPPORT (1<<2)
  287. #define MHL_STATUS_CLK_MODE_PACKED_PIXEL 0x02
  288. #define MHL_STATUS_CLK_MODE_NORMAL 0x03
  289. #define MHL_STATUS_PATH_ENABLED 0x08
  290. #define MHL_STATUS_PATH_DISABLED 0x00
  291. #define MHL_STATUS_REG_CONNECTED_RDY 0x30
  292. #define CBUS_PKT_BUF_COUNT 18
  293. #define VBUS_NONE 0
  294. #define VBUS_USB 1
  295. #define SS_MHL_DONGLE_DEV_ID 0x1134
  296. #define SS_MHL_DOCK_DEV_ID 0x1234
  297. enum rgnd_state {
  298. RGND_UNKNOWN = 0,
  299. RGND_OPEN,
  300. RGND_1K,
  301. RGND_2K,
  302. RGND_SHORT
  303. };
  304. enum mhl_state {
  305. STATE_DISCONNECTED = 0,
  306. STATE_DISCOVERY_FAILED,
  307. STATE_CBUS_LOCKOUT,
  308. STATE_ESTABLISHED,
  309. };
  310. enum msc_subcommand {
  311. /* MSC_MSG Sub-Command codes */
  312. MSG_RCP = 0x10,
  313. MSG_RCPK = 0x11,
  314. MSG_RCPE = 0x12,
  315. MSG_RAP = 0x20,
  316. MSG_RAPK = 0x21,
  317. };
  318. enum cbus_command {
  319. CBUS_IDLE = 0x00,
  320. CBUS_ACK = 0x33,
  321. CBUS_NACK = 0x35,
  322. CBUS_WRITE_STAT = 0x60 | 0x80,
  323. CBUS_SET_INT = 0x60,
  324. CBUS_READ_DEVCAP = 0x61,
  325. CBUS_GET_STATE = 0x62,
  326. CBUS_GET_VENDOR_ID = 0x63,
  327. CBUS_SET_HPD = 0x64,
  328. CBUS_CLR_HPD = 0x65,
  329. CBUS_SET_CAP_ID = 0x66,
  330. CBUS_GET_CAP_ID = 0x67,
  331. CBUS_MSC_MSG = 0x68,
  332. CBUS_GET_SC1_ERR_CODE = 0x69,
  333. CBUS_GET_DDC_ERR_CODE = 0x6A,
  334. CBUS_GET_MSC_ERR_CODE = 0x6B,
  335. CBUS_WRITE_BURST = 0x6C,
  336. CBUS_GET_SC3_ERR_CODE = 0x6D,
  337. };
  338. enum mhl_status_enum_type {
  339. NO_MHL_STATUS = 0x00,
  340. MHL_INIT_DONE,
  341. MHL_WAITING_RGND_DETECT,
  342. MHL_CABLE_CONNECT,
  343. MHL_DISCOVERY_START,
  344. MHL_DISCOVERY_END,
  345. MHL_DISCOVERY_SUCCESS,
  346. MHL_DISCOVERY_FAIL,
  347. MHL_RSEN_GLITCH,
  348. MHL_RSEN_LOW,
  349. };
  350. struct mhl_tx_status_type {
  351. u8 intr4_mask_value;
  352. u8 intr1_mask_value;
  353. u8 intr_cbus1_mask_value;
  354. u8 intr_cbus2_mask_value;
  355. enum mhl_status_enum_type mhl_status;
  356. u8 linkmode;
  357. u8 connected_ready;
  358. bool cbus_connected;
  359. bool sink_hpd;
  360. bool rgnd_1k;
  361. u8 rsen_check_available;
  362. };
  363. static inline bool mhl_state_is_error(enum mhl_state state)
  364. {
  365. return state == STATE_DISCOVERY_FAILED ||
  366. state == STATE_CBUS_LOCKOUT;
  367. }
  368. struct sii9234_data;
  369. #define CBUS_DATA_LENGTH 2
  370. /* Structure for holding MSC command data */
  371. struct cbus_packet {
  372. enum cbus_command command;
  373. u8 offset;
  374. u8 data[CBUS_DATA_LENGTH];
  375. u8 status;
  376. };
  377. struct device_cap {
  378. u8 mhl_ver;
  379. u8 dev_type;
  380. u16 adopter_id;
  381. u8 vid_link_mode;
  382. u8 aud_link_mode;
  383. u8 video_type;
  384. u8 log_dev_map;
  385. u8 bandwidth;
  386. u16 device_id;
  387. u8 scratchpad_size;
  388. u8 int_stat_size;
  389. u8 reserved_data; /*Only SAMSUNG use this offset */
  390. /*as a method to distinguish TA and USB*/
  391. bool rcp_support;
  392. bool rap_support;
  393. bool sp_support;
  394. };
  395. struct sii9234_data {
  396. struct sii9234_platform_data *pdata;
  397. wait_queue_head_t wq;
  398. wait_queue_head_t dev_wq;
  399. bool claimed;
  400. enum mhl_state state;
  401. enum rgnd_state rgnd;
  402. bool rsen;
  403. atomic_t is_irq_enabled;
  404. struct mutex lock;
  405. struct mutex cbus_lock;
  406. struct cbus_packet cbus_pkt;
  407. struct cbus_packet cbus_pkt_buf[CBUS_PKT_BUF_COUNT];
  408. struct device_cap devcap;
  409. struct mhl_tx_status_type mhl_status_value;
  410. #ifdef CONFIG_SII9234_RCP
  411. u8 error_key;
  412. struct input_dev *input_dev;
  413. #endif
  414. struct completion msc_complete;
  415. struct work_struct msc_work;
  416. int vbus_owner;
  417. int dcap_ready_status;
  418. struct timer_list cbus_command_timer;
  419. struct work_struct redetect_work;
  420. struct work_struct rgnd_work;
  421. struct work_struct mhl_cbus_write_stat_work;
  422. };
  423. struct msc_packet {
  424. enum cbus_command command;
  425. u8 offset;
  426. u8 data_1;
  427. u8 data_2;
  428. struct list_head p_msc_packet_list;
  429. };
  430. static int sii9234_msc_req_locked(struct sii9234_data *sii9234,
  431. struct msc_packet *msc_pkt);
  432. static int sii9234_enqueue_msc_work(struct sii9234_data *sii9234, u8 command,
  433. u8 offset, u8 data_1, u8 data_2);
  434. static struct device *sii9244_mhldev;
  435. extern void mhl_hpd_handler(bool state);
  436. extern int detached_status;
  437. #ifndef CONFIG_MHL_D3_SUPPORT
  438. static void sii9234_detection_callback(struct work_struct *work);
  439. #endif
  440. static void sii9234_cancel_callback(void);
  441. static u8 sii9234_tmds_control(struct sii9234_data *sii9234, bool enable);
  442. static bool cbus_command_request(struct sii9234_data *sii9234,
  443. enum cbus_command command,
  444. u8 offset, u8 data);
  445. #ifndef CONFIG_MHL_NEW_CBUS_MSC_CMD
  446. static void cbus_command_response(struct sii9234_data *sii9234);
  447. #endif
  448. static irqreturn_t sii9234_irq_thread(int irq, void *data);
  449. #endif