mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
67 lines
2.1 KiB
Diff
67 lines
2.1 KiB
Diff
commit 83ee92e168bc5d744f96961254ffac95a6260220
|
|
Author: wolfgar <stephan.rafin@laposte.net>
|
|
Date: Sat Sep 13 01:58:08 2014 +0200
|
|
|
|
No longer try to get link status directly in this driver
|
|
Only consume the event sent by mxc-hdmi driver
|
|
|
|
diff --git a/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c
|
|
index f8b3f7a..c30237e 100644
|
|
--- a/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c
|
|
+++ b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c
|
|
@@ -67,7 +67,6 @@ struct hdmi_cec_priv {
|
|
u8 msg_len;
|
|
int tx_answer;
|
|
u16 latest_cec_stat;
|
|
- u8 link_status;
|
|
spinlock_t irq_lock;
|
|
struct delayed_work hdmi_cec_work;
|
|
struct mutex lock;
|
|
@@ -96,7 +95,6 @@ static irqreturn_t mxc_hdmi_cec_isr(int irq, void *data)
|
|
struct hdmi_cec_priv *hdmi_cec = data;
|
|
u16 cec_stat = 0;
|
|
unsigned long flags;
|
|
- u8 phy_stat0;
|
|
irqreturn_t ret = IRQ_HANDLED;
|
|
|
|
spin_lock_irqsave(&hdmi_cec->irq_lock, flags);
|
|
@@ -105,7 +103,6 @@ static irqreturn_t mxc_hdmi_cec_isr(int irq, void *data)
|
|
|
|
cec_stat = hdmi_readb(HDMI_IH_CEC_STAT0);
|
|
hdmi_writeb(cec_stat, HDMI_IH_CEC_STAT0);
|
|
- phy_stat0 = hdmi_readb(HDMI_PHY_STAT0) & 0x02;
|
|
|
|
if ((cec_stat & (HDMI_IH_CEC_STAT0_ERROR_INIT | \
|
|
HDMI_IH_CEC_STAT0_NACK | HDMI_IH_CEC_STAT0_EOM | \
|
|
@@ -113,14 +110,7 @@ static irqreturn_t mxc_hdmi_cec_isr(int irq, void *data)
|
|
ret = IRQ_NONE;
|
|
cec_stat = 0;
|
|
}
|
|
- if (hdmi_cec->link_status ^ phy_stat0) {
|
|
- /* HPD value changed */
|
|
- hdmi_cec->link_status = phy_stat0;
|
|
- if (hdmi_cec->link_status)
|
|
- cec_stat |= 0x80; /* Connected */
|
|
- else
|
|
- cec_stat |= 0x100; /* Disconnected */
|
|
- }
|
|
+
|
|
pr_debug("HDMI CEC interrupt received\n");
|
|
hdmi_cec->latest_cec_stat = cec_stat ;
|
|
|
|
@@ -357,7 +347,6 @@ static ssize_t hdmi_cec_write(struct file *file, const char __user *buf,
|
|
return ret;
|
|
}
|
|
|
|
-
|
|
void hdmi_cec_start_device(void)
|
|
{
|
|
u8 val;
|
|
@@ -373,7 +362,6 @@ void hdmi_cec_start_device(void)
|
|
val = HDMI_IH_CEC_STAT0_WAKEUP | HDMI_IH_CEC_STAT0_ERROR_FOLL | HDMI_IH_CEC_STAT0_ARB_LOST;
|
|
hdmi_writeb(val, HDMI_CEC_MASK);
|
|
hdmi_writeb(val, HDMI_IH_MUTE_CEC_STAT0);
|
|
- hdmi_cec_data.link_status = hdmi_readb(HDMI_PHY_STAT0) & 0x02;
|
|
hdmi_cec_data.cec_state = true;
|
|
}
|
|
EXPORT_SYMBOL(hdmi_cec_start_device);
|