13 #include <linux/device.h>
22 #define COMMON_INT_MASK_1 (0)
23 #define COMMON_INT_MASK_2 (0)
24 #define COMMON_INT_MASK_3 (0)
25 #define COMMON_INT_MASK_4 (0)
26 #define INT_STA_MASK (0)
295 int timeout_loop = 0;
313 dev_err(dp->
dev,
"failed to get pll lock status\n");
401 int timeout_loop = 0;
413 dev_err(dp->
dev,
"AUX CH command reply failed!\n");
433 dev_err(dp->
dev,
"AUX CH error happens: %d\n\n",
434 reg & AUX_STATUS_MASK);
449 for (i = 0; i < 3; i++) {
463 reg = (
unsigned int)data;
479 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n",
494 for (i = 0; i < 10; i++) {
520 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n",
526 *data = (
unsigned char)(reg & 0xff);
534 unsigned char data[])
538 unsigned int cur_data_count;
539 unsigned int cur_data_idx;
548 while (start_offset < count) {
550 if ((count - start_offset) > 16)
555 for (i = 0; i < 10; i++) {
564 for (cur_data_idx = 0; cur_data_idx < cur_data_count;
566 reg = data[start_offset + cur_data_idx];
585 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n",
589 start_offset += cur_data_count;
598 unsigned char data[])
602 unsigned int cur_data_count;
603 unsigned int cur_data_idx;
612 while (start_offset < count) {
614 if ((count - start_offset) > 16)
620 for (i = 0; i < 10; i++) {
643 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n",
647 for (cur_data_idx = 0; cur_data_idx < cur_data_count;
651 data[start_offset + cur_data_idx] =
655 start_offset += cur_data_count;
662 unsigned int device_addr,
689 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n", __func__);
695 unsigned int device_addr,
703 for (i = 0; i < 10; i++) {
711 dev_err(dp->
dev,
"Select EDID device fail!\n");
729 dev_dbg(dp->
dev,
"%s: Aux Transaction fail!\n",
741 unsigned int device_addr,
744 unsigned char edid[])
748 unsigned int cur_data_idx;
749 unsigned int defer = 0;
752 for (i = 0; i <
count; i += 16) {
753 for (j = 0; j < 100; j++) {
769 device_addr, reg_addr + i);
791 "%s: Aux Transaction fail!\n",
803 for (cur_data_idx = 0; cur_data_idx < 16; cur_data_idx++) {
806 edid[i + cur_data_idx] = (
unsigned char)reg;
1071 dev_dbg(dp->
dev,
"Input stream clock not detected.\n");
1082 dev_dbg(dp->
dev,
"Input stream clk is changing\n");
1100 reg = m_value & 0xff;
1102 reg = (m_value >> 8) & 0xff;
1104 reg = (m_value >> 16) & 0xff;
1107 reg = n_value & 0xff;
1109 reg = (n_value >> 8) & 0xff;
1111 reg = (n_value >> 16) & 0xff;
1174 dev_dbg(dp->
dev,
"Input video stream is not detected.\n");