From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuauA-0003AV-K2 for qemu-devel@nongnu.org; Fri, 09 May 2008 18:17:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Juau9-0003AJ-Qs for qemu-devel@nongnu.org; Fri, 09 May 2008 18:17:30 -0400 Received: from [199.232.76.173] (port=36415 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Juau9-0003AG-Jx for qemu-devel@nongnu.org; Fri, 09 May 2008 18:17:29 -0400 Received: from savannah.gnu.org ([199.232.41.3]:59837 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Juau7-0008Jb-VN for qemu-devel@nongnu.org; Fri, 09 May 2008 18:17:29 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Juau0-0005lr-Js for qemu-devel@nongnu.org; Fri, 09 May 2008 22:17:21 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Juatz-0005ll-Sm for qemu-devel@nongnu.org; Fri, 09 May 2008 22:17:20 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Fri, 09 May 2008 22:17:19 +0000 Subject: [Qemu-devel] [4401] Improve tsc2005 touchscreen usability. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4401 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4401 Author: balrog Date: 2008-05-09 22:17:18 +0000 (Fri, 09 May 2008) Log Message: ----------- Improve tsc2005 touchscreen usability. Modified Paths: -------------- trunk/hw/max7310.c trunk/hw/tsc2005.c trunk/hw/tsc210x.c Modified: trunk/hw/max7310.c =================================================================== --- trunk/hw/max7310.c 2008-05-09 22:16:11 UTC (rev 4400) +++ trunk/hw/max7310.c 2008-05-09 22:17:18 UTC (rev 4401) @@ -134,8 +134,8 @@ s->i2c_command_byte = 1; break; case I2C_FINISH: +#ifdef VERBOSE if (s->len == 1) -#ifdef VERBOSE printf("%s: message too short (%i bytes)\n", __FUNCTION__, s->len); #endif break; Modified: trunk/hw/tsc2005.c =================================================================== --- trunk/hw/tsc2005.c 2008-05-09 22:16:11 UTC (rev 4400) +++ trunk/hw/tsc2005.c 2008-05-09 22:17:18 UTC (rev 4401) @@ -23,14 +23,7 @@ #include "hw.h" #include "qemu-timer.h" #include "console.h" -#include "omap.h" -#define TSC_DATA_REGISTERS_PAGE 0x0 -#define TSC_CONTROL_REGISTERS_PAGE 0x1 -#define TSC_AUDIO_REGISTERS_PAGE 0x2 - -#define TSC_VERBOSE - #define TSC_CUT_RESOLUTION(value, p) ((value) >> (16 - (p ? 12 : 10))) struct tsc2005_state_s { @@ -115,9 +108,6 @@ #define TEMP1_VAL (1264 << 4) /* +/- 5 at 12-bit */ #define TEMP2_VAL (1531 << 4) /* +/- 5 at 12-bit */ -#define TSC_POWEROFF_DELAY 50 -#define TSC_SOFTSTEP_DELAY 50 - static uint16_t tsc2005_read(struct tsc2005_state_s *s, int reg) { uint16_t ret; @@ -250,9 +240,6 @@ pin_state = !s->pressure; } - if (!s->enabled) - pin_state = 0; - if (pin_state != s->irq) { s->irq = pin_state; qemu_set_irq(s->pint, s->irq); @@ -261,6 +248,8 @@ switch (s->nextfunction) { case TSC_MODE_XYZ_SCAN: case TSC_MODE_XY_SCAN: + if (!s->host_mode && s->dav) + s->enabled = 0; if (!s->pressure) return; /* Fall through */ @@ -344,6 +333,9 @@ s->enabled = !(value & 1); fprintf(stderr, "%s: touchscreen sense %sabled\n", __FUNCTION__, s->enabled ? "en" : "dis"); + if (s->busy && !s->enabled) + qemu_del_timer(s->timer); + s->busy &= s->enabled; } tsc2005_pin_update(s); } Modified: trunk/hw/tsc210x.c =================================================================== --- trunk/hw/tsc210x.c 2008-05-09 22:16:11 UTC (rev 4400) +++ trunk/hw/tsc210x.c 2008-05-09 22:17:18 UTC (rev 4401) @@ -25,7 +25,7 @@ #include "audio/audio.h" #include "qemu-timer.h" #include "console.h" -#include "omap.h" +#include "omap.h" /* For struct i2s_codec_s and struct uwire_slave_s */ #define TSC_DATA_REGISTERS_PAGE 0x0 #define TSC_CONTROL_REGISTERS_PAGE 0x1