Skip to content

Commit

Permalink
touchscreen: gt9xx: swap xy
Browse files Browse the repository at this point in the history
Correct input rotation.

Code from drivers/input/touchscreen/GT9110/*

Change-Id: I0603bba2bec5b2b61f242f6ca02c53f419cff85a
  • Loading branch information
bbelos committed Feb 14, 2017
1 parent 4b6a5e3 commit 7c63847
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/input/touchscreen/gt9xx/gt9xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
#if GTP_CHANGE_X2Y
GTP_SWAP(x, y);
#endif
#if GTP_CHANGE_X
x=ts->abs_x_max-x-1;
#endif

#if GTP_ICS_SLOT_REPORT
input_mt_slot(ts->input_dev, id);
input_report_abs(ts->input_dev, ABS_MT_TRACKING_ID, id);
Expand Down
3 changes: 2 additions & 1 deletion drivers/input/touchscreen/gt9xx/gt9xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@

/***************************PART1:ON/OFF define*******************************/
#define GTP_CUSTOM_CFG 0
#define GTP_CHANGE_X2Y 0
#define GTP_CHANGE_X2Y 1
#define GTP_CHANGE_X 1
#define GTP_DRIVER_SEND_CFG 1
//#define GTP_HAVE_TOUCH_KEY 0 /*del for dtsi vkey by zengguang 2014.6.24*/
#define GTP_POWER_CTRL_SLEEP 0
Expand Down

0 comments on commit 7c63847

Please sign in to comment.