Commit 611d7189e7dc58cdd8e770924677161f72149922

Authored by balrog
1 parent 610c3c8a

Make touchscreen calibration values better match the HW. Invert WM8750 GPIO.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3014 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 9 additions and 8 deletions
hw/ads7846.c
... ... @@ -30,10 +30,10 @@ struct ads7846_state_s {
30 30 #define CB_A2 (1 << 6)
31 31 #define CB_START (1 << 7)
32 32  
33   -#define X_AXIS_DMAX 3680
34   -#define X_AXIS_MIN 150
35   -#define Y_AXIS_DMAX 3640
36   -#define Y_AXIS_MIN 190
  33 +#define X_AXIS_DMAX 3470
  34 +#define X_AXIS_MIN 290
  35 +#define Y_AXIS_DMAX 3450
  36 +#define Y_AXIS_MIN 200
37 37  
38 38 #define ADS_VBAT 2000
39 39 #define ADS_VAUX 2000
... ... @@ -95,10 +95,11 @@ static void ads7846_ts_event(void *opaque,
95 95 struct ads7846_state_s *s = opaque;
96 96  
97 97 if (buttons_state) {
98   - s->input[1] = ADS_YPOS(x, y);
  98 + x = 0x7fff - x;
  99 + s->input[1] = ADS_XPOS(x, y);
99 100 s->input[3] = ADS_Z1POS(x, y);
100 101 s->input[4] = ADS_Z2POS(x, y);
101   - s->input[5] = ADS_XPOS(x, y);
  102 + s->input[5] = ADS_YPOS(x, y);
102 103 }
103 104  
104 105 if (s->pressure == !buttons_state) {
... ...
hw/spitz.c
... ... @@ -919,8 +919,8 @@ static void spitz_microdrive_attach(struct pxa2xx_state_s *cpu)
919 919 /* Wm8750 and Max7310 on I2C */
920 920  
921 921 #define AKITA_MAX_ADDR 0x18
922   -#define SPITZ_WM_ADDRL 0x1a
923   -#define SPITZ_WM_ADDRH 0x1b
  922 +#define SPITZ_WM_ADDRL 0x1b
  923 +#define SPITZ_WM_ADDRH 0x1a
924 924  
925 925 #define SPITZ_GPIO_WM 5
926 926  
... ...