rk3066b: rk610: support irq mode.

This commit is contained in:
Zheng Yang 2012-09-10 19:22:37 +08:00
parent 0ccc95847b
commit 2c040105a5
6 changed files with 13 additions and 6 deletions

View File

@ -1311,7 +1311,7 @@ static struct i2c_board_info __initdata i2c0_info[] = {
.type = "rk610_hdmi",
.addr = 0x46,
.flags = 0,
.irq = INVALID_GPIO,
.irq = RK30_PIN0_PB6,
},
#endif
#ifdef CONFIG_SND_SOC_RK610

View File

@ -1,5 +1,5 @@
ccflags-$(CONFIG_RK_HDMI_DEBUG) = -DDEBUG -DHDMI_DEBUG
ccflags-$(CONFIG_HDCP_RK2928_DEBUG) = -DHDCP_DEBUG
ccflags-$(CONFIG_HDCP_RK610_DEBUG) = -DHDCP_DEBUG
obj-$(CONFIG_HDMI_RK610) += rk610_hdmi_hw.o rk610_hdmi.o
obj-$(CONFIG_HDCP_RK610) += rk610_hdmi_hdcp.o rk610_hdcp.o

View File

@ -175,7 +175,9 @@ struct hdcp {
extern struct hdcp *hdcp;
#define HDCP_DEBUG
#ifdef DBG
#undef DBG
#endif
#ifdef HDCP_DEBUG
#define DBG(format, ...) \

View File

@ -165,6 +165,7 @@ static int rk610_hdmi_i2c_probe(struct i2c_client *client,const struct i2c_devic
#ifdef HDMI_USE_IRQ
if(client->irq != INVALID_GPIO) {
INIT_WORK(&rk610_hdmi->irq_work, rk610_irq_work_func);
schedule_work(&rk610_hdmi->irq_work);
if((rc = gpio_request(client->irq, "hdmi gpio")) < 0)
{
dev_err(&client->dev, "fail to request gpio %d\n", client->irq);
@ -174,7 +175,7 @@ static int rk610_hdmi_i2c_probe(struct i2c_client *client,const struct i2c_devic
rk610_hdmi->gpio = client->irq;
gpio_pull_updown(client->irq, GPIOPullUp);
gpio_direction_input(client->irq);
if((rc = request_irq(rk610_hdmi->irq, rk610_irq, IRQF_TRIGGER_RISING, NULL, hdmi)) < 0)
if((rc = request_irq(hdmi->irq, rk610_irq, IRQF_TRIGGER_RISING, NULL, hdmi)) < 0)
{
dev_err(&client->dev, "fail to request hdmi irq\n");
goto err_request_irq;

View File

@ -3,12 +3,15 @@
#include "../../rk_hdmi.h"
#define HDMI_SOURCE_DEFAULT HDMI_SOURCE_LCDC0
//#define HDMI_USE_IRQ
struct rk610_hdmi_pdata {
int gpio;
struct i2c_client *client;
struct delayed_work delay_work;
#ifndef HDMI_USE_IRQ
#ifdef HDMI_USE_IRQ
struct work_struct irq_work;
#else
struct workqueue_struct *workqueue;
#endif
};

View File

@ -42,8 +42,9 @@ static int hdmi_set_enable(struct rk_display_device *device, int enable)
else {
if(hdmi->irq)
enable_irq(hdmi->irq);
else
#ifdef CONFIG_HDMI_RK610
queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, 0);
#endif
mutex_unlock(&hdmi->enable_mutex);
}
return 0;