@@ -133,7 +133,7 @@ static irqreturn_t mxc_hdmi_cec_isr(int irq, void *data)
133
133
134
134
void mxc_hdmi_cec_handle (u16 cec_stat )
135
135
{
136
- u8 val = 0 , i = 0 ;
136
+ u8 i = 0 ;
137
137
struct hdmi_cec_event * event = NULL ;
138
138
139
139
/* The current transmission is successful (for initiator only). */
@@ -172,29 +172,16 @@ void mxc_hdmi_cec_handle(u16 cec_stat)
172
172
173
173
/* An error is detected on cec line (for initiator only). */
174
174
if (cec_stat & HDMI_IH_CEC_STAT0_ERROR_INIT ) {
175
- mutex_lock (& hdmi_cec_data .lock );
176
- hdmi_cec_data .send_error ++ ;
177
- if (hdmi_cec_data .send_error > 2 ) {
178
- pr_err ("%s:Re-transmission is attempted more than 2 times!\n" , __func__ );
179
- hdmi_cec_data .send_error = 0 ;
180
- mutex_unlock (& hdmi_cec_data .lock );
181
- hdmi_cec_data .tx_answer = cec_stat ;
182
- wake_up (& tx_cec_queue );
183
- return ;
184
- }
185
- for (i = 0 ; i < hdmi_cec_data .msg_len ; i ++ )
186
- hdmi_writeb (hdmi_cec_data .last_msg [i ], HDMI_CEC_TX_DATA0 + i );
187
- hdmi_writeb (hdmi_cec_data .msg_len , HDMI_CEC_TX_CNT );
188
- val = hdmi_readb (HDMI_CEC_CTRL );
189
- val |= 0x01 ;
190
- hdmi_writeb (val , HDMI_CEC_CTRL );
191
- mutex_unlock (& hdmi_cec_data .lock );
175
+ hdmi_cec_data .tx_answer = cec_stat ;
176
+ wake_up (& tx_cec_queue );
177
+ return ;
192
178
}
193
179
/* A frame is not acknowledged in a directly addressed message.
194
180
* Or a frame is negatively acknowledged in
195
181
* a broadcast message (for initiator only).
196
182
*/
197
183
if (cec_stat & HDMI_IH_CEC_STAT0_NACK ) {
184
+ hdmi_cec_data .send_error ++ ;
198
185
hdmi_cec_data .tx_answer = cec_stat ;
199
186
wake_up (& tx_cec_queue );
200
187
}
@@ -395,7 +382,7 @@ static long hdmi_cec_ioctl(struct file *filp, u_int cmd,
395
382
u_long arg )
396
383
{
397
384
int ret = 0 , status = 0 ;
398
- u8 val = 0 , msg = 0 ;
385
+ u8 val = 0 ;
399
386
struct mxc_edid_cfg hdmi_edid_cfg ;
400
387
pr_debug ("function : %s\n" , __func__ );
401
388
if (!open_count )
@@ -419,15 +406,6 @@ static long hdmi_cec_ioctl(struct file *filp, u_int cmd,
419
406
hdmi_writeb (0 , HDMI_CEC_ADDR_L );
420
407
} else
421
408
ret = - EINVAL ;
422
- /*Send Polling message with same source and destination address*/
423
- if (0 == ret && 15 != hdmi_cec_data .Logical_address ) {
424
- msg = (hdmi_cec_data .Logical_address << 4 )|hdmi_cec_data .Logical_address ;
425
- hdmi_writeb (1 , HDMI_CEC_TX_CNT );
426
- hdmi_writeb (msg , HDMI_CEC_TX_DATA0 );
427
- val = hdmi_readb (HDMI_CEC_CTRL );
428
- val |= 0x01 ;
429
- hdmi_writeb (val , HDMI_CEC_CTRL );
430
- }
431
409
mutex_unlock (& hdmi_cec_data .lock );
432
410
break ;
433
411
case HDMICEC_IOC_STARTDEVICE :
0 commit comments