update for xpt2046
author沈睿汀 <srt@rock-chips.com>
Thu, 3 Jun 2010 02:34:04 +0000 (02:34 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:35:22 +0000 (13:35 +0800)
arch/arm/mach-rk2818/board-midsdk.c
drivers/input/touchscreen/xpt2046_ts.c

index d33e7f2a9c720dc6f54d52f8377a11abc2c93c22..2ea8b427e34a10d95c6c677bcb0c1008c6b50eb4 100644 (file)
@@ -361,7 +361,7 @@ static struct spi_board_info board_spi_devices[] = {
        {
                .modalias       = "xpt2046_ts",
                .chip_select    = 0,
-               .max_speed_hz   = 1000000,/* (max sample rate @ 3V) * (cmd + data + overhead) */
+               .max_speed_hz   = 125 * 1000 * 26,/* (max sample rate @ 3V) * (cmd + data + overhead) */
                .bus_num        = 0,
                .irq            = RK2818_PIN_PE3,
        },
index 5af31de69cf5512467ae6f4b589fcee0fe7eaa93..4af936103a6a205a8d39d0a91c9d7d596a46da35 100644 (file)
@@ -61,8 +61,8 @@
 #define AD_TO_X(adx)   (LCD_MAX_WIDTH * (adx - PT2046_TOUCH_AD_TOP) / ( PT2046_TOUCH_AD_BOTTOM  - PT2046_TOUCH_AD_TOP ))
 #define AD_TO_Y(ady)   (LCD_MAX_LENGTH * (PT2046_TOUCH_AD_LEFT - ady) / (PT2046_TOUCH_AD_LEFT - PT2046_TOUCH_AD_RIGHT))
 
-#define TS_POLL_DELAY  (1 * 1000000)   /* ns delay before the first sample */
-#define TS_POLL_PERIOD (5 * 1000000)   /* ns delay between samples */
+#define TS_POLL_DELAY  (3 * 1000000)   /* ns delay before the first sample */
+#define TS_POLL_PERIOD (15 * 1000000)  /* ns delay between samples */
 
 #define DEBOUNCE_REPTIME  3
 /* this driver doesn't aim at the peak continuous sample rate */