]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/touchscreen/corgi_ts.c
bus_remove_device: be more careful about incomplete initialization
[linux-2.6-omap-h63xx.git] / drivers / input / touchscreen / corgi_ts.c
index b1b2e07bf080b3cb348726e3c7a3aff935ad7725..a22576779acdc3c7e79c4148ca3cf89c358e0261 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/arch/sharpsl.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/pxa2xx-gpio.h>
 
 
 #define PWR_MODE_ACTIVE                0
@@ -74,10 +75,10 @@ extern unsigned int get_clk_frequency_khz(int info);
 
 static unsigned long calc_waittime(struct corgi_ts *corgi_ts)
 {
-       unsigned long hsync_len = corgi_ts->machinfo->get_hsync_len();
+       unsigned long hsync_invperiod = corgi_ts->machinfo->get_hsync_invperiod();
 
-       if (hsync_len)
-               return get_clk_frequency_khz(0)*1000/hsync_len;
+       if (hsync_invperiod)
+               return get_clk_frequency_khz(0)*1000/hsync_invperiod;
        else
                return 0;
 }
@@ -114,7 +115,7 @@ static int sync_receive_data_send_cmd(struct corgi_ts *corgi_ts, int doRecive, i
                        if (timer2-timer1 > wait_time) {
                                /* too slow - timeout, try again */
                                corgi_ts->machinfo->wait_hsync();
-                               /* get OSCR */
+                               /* get CCNT */
                                CCNT(timer1);
                                /* Wait after HSync */
                                CCNT(timer2);