Skip to content

Commit

Permalink
Fix touchscreen and compass orientation for Exynos 4210-based tablets
Browse files Browse the repository at this point in the history
Samsung's I9100 Jellybean source release introduced some strange
orientation issues for the Tab 7 Plus and Tab 7.7 tablets.  This
reverts the touchscreen and compass behavior to that of the ICS
kernels.

Thanks to @daniel_hk on XDA for finding this.

Change-Id: I99dfa2869c24f73cc3d7008f346af2b549221b68
  • Loading branch information
alanorth committed Apr 24, 2013
1 parent fd46d49 commit a034655
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions arch/arm/mach-exynos/mach-px.c
Expand Up @@ -3055,8 +3055,8 @@ static struct mpu3050_platform_data mpu3050_pdata = {
1, 0, 0,
0, 0, 1},
#elif defined(CONFIG_MACH_P2)
.orientation = {1, 0, 0,
0, -1, 0,
.orientation = {0, 1, 0,
1, 0, 0,
0, 0, -1},
#elif defined(CONFIG_MACH_P4)
.orientation = {1 , 0, 0,
Expand Down Expand Up @@ -3087,8 +3087,8 @@ static struct mpu3050_platform_data mpu3050_pdata = {
-1, 0, 0,
0, 0, 1},
#elif defined(CONFIG_MACH_P2)
.orientation = {1, 0, 0,
0, -1, 0,
.orientation = {0, 1, 0,
1, 0, 0,
0, 0, -1},
#elif defined(CONFIG_MACH_P4)
.orientation = {0, -1, 0,
Expand All @@ -3111,8 +3111,8 @@ static struct mpu3050_platform_data mpu3050_pdata = {
* 90 degrees clockwise from natural orientation.
* So X & Y are swapped and Y & Z are negated.
*/
.orientation = {1, 0, 0,
0, 1, 0,
.orientation = {0, -1, 0,
1, 0, 0,
0, 0, 1},
},

Expand Down
9 changes: 4 additions & 5 deletions drivers/input/touchscreen/mms152.c
Expand Up @@ -75,8 +75,8 @@

#define MELFAS_MAX_TOUCH 10

#define TS_MAX_X_COORD 600
#define TS_MAX_Y_COORD 1024
#define TS_MAX_X_COORD 1024
#define TS_MAX_Y_COORD 600
#define TS_MAX_Z_TOUCH 255
#define TS_MAX_W_TOUCH 30

Expand Down Expand Up @@ -1004,9 +1004,8 @@ static void melfas_ts_read_input(struct melfas_ts_data *ts)

for (i = 0; i < read_num; i = i+6) {
id = (buf[i] & 0x0F)-1;
posX = TS_MAX_X_COORD -
((u16)(buf[i+1] & 0xF0) << 4 | buf[i+3]);
posY = (u16)(buf[i+1] & 0x0F) << 8 | buf[i+2];
posX = (u16)(buf[i+1] & 0x0F) << 8 | buf[i+2];
posY = (u16)(buf[i+1] & 0xF0) << 4 | buf[i+3];
str = buf[i + 4];
width = buf[i+5];

Expand Down

0 comments on commit a034655

Please sign in to comment.