rk3066b: rk610: support irq mode.
authorZheng Yang <zhengyang@rock-chips.com>
Mon, 10 Sep 2012 11:22:37 +0000 (19:22 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Mon, 10 Sep 2012 11:22:37 +0000 (19:22 +0800)
arch/arm/mach-rk30/board-rk3066b-m701.c
drivers/video/rockchip/hdmi/chips/rk610/Makefile
drivers/video/rockchip/hdmi/chips/rk610/rk610_hdcp.h
drivers/video/rockchip/hdmi/chips/rk610/rk610_hdmi.c
drivers/video/rockchip/hdmi/chips/rk610/rk610_hdmi.h
drivers/video/rockchip/hdmi/rk_hdmi_sysfs.c

index 2b490cb408a7992cf1654b23e3e019d1358f6e6b..401cf4829502cb58cfaba19d0ba425c8f19bf016 100755 (executable)
@@ -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
index 68750e29d820b0a0b73a1cfbbbd3d6f05271b540..683fb21bec4b57e8f17438b4f5e621c8e92d142e 100755 (executable)
@@ -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
index a33d1bcaa4e18f82c250438db1e1e45ce50a9552..d7459a2c9b92e2dd44acc57b973e8e27d30915d5 100755 (executable)
@@ -175,7 +175,9 @@ struct hdcp {
 
 extern struct hdcp *hdcp;
 
-#define HDCP_DEBUG
+#ifdef DBG
+#undef DBG
+#endif
 
 #ifdef HDCP_DEBUG
 #define DBG(format, ...) \
index 97fbb0734172016fa6d5e4460f99c1125294d867..7c072e4a66ba41911d6d1b4ce569ad11b6f2fbcb 100755 (executable)
@@ -165,6 +165,7 @@ static int rk610_hdmi_i2c_probe(struct i2c_client *client,const struct i2c_devic
 #ifdef HDMI_USE_IRQ\r
        if(client->irq != INVALID_GPIO) {\r
                INIT_WORK(&rk610_hdmi->irq_work, rk610_irq_work_func);\r
+               schedule_work(&rk610_hdmi->irq_work);\r
                if((rc = gpio_request(client->irq, "hdmi gpio")) < 0)\r
            {\r
                dev_err(&client->dev, "fail to request gpio %d\n", client->irq);\r
@@ -174,7 +175,7 @@ static int rk610_hdmi_i2c_probe(struct i2c_client *client,const struct i2c_devic
                rk610_hdmi->gpio = client->irq;\r
            gpio_pull_updown(client->irq, GPIOPullUp);\r
            gpio_direction_input(client->irq);\r
-           if((rc = request_irq(rk610_hdmi->irq, rk610_irq, IRQF_TRIGGER_RISING, NULL, hdmi)) < 0)\r
+           if((rc = request_irq(hdmi->irq, rk610_irq, IRQF_TRIGGER_RISING, NULL, hdmi)) < 0)\r
            {\r
                dev_err(&client->dev, "fail to request hdmi irq\n");\r
                goto err_request_irq;\r
index 5ddd8aeb2da0c877a7ab619e1d90a7666ab532ea..746283e7a8ee3085734901be012828ea6ce03900 100755 (executable)
@@ -3,12 +3,15 @@
 #include "../../rk_hdmi.h"\r
 \r
 #define HDMI_SOURCE_DEFAULT HDMI_SOURCE_LCDC0\r
+//#define HDMI_USE_IRQ\r
 \r
 struct rk610_hdmi_pdata {\r
        int gpio;\r
        struct i2c_client *client;\r
        struct delayed_work delay_work;\r
-       #ifndef HDMI_USE_IRQ\r
+       #ifdef HDMI_USE_IRQ\r
+       struct work_struct      irq_work;\r
+       #else\r
        struct workqueue_struct *workqueue;\r
        #endif\r
 };\r
index 14f7924d041c805ce92274d5113b6f5dbf79f920..a93c3211083918d7daa02c8668fc66cafc96b2f3 100755 (executable)
@@ -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;