diff --git a/drivers/input/touchscreen/himax/himax_83102E/himax_common.c b/drivers/input/touchscreen/himax/himax_83102E/himax_common.c index 514de7944b8a..09009ed75ff4 100644 --- a/drivers/input/touchscreen/himax/himax_83102E/himax_common.c +++ b/drivers/input/touchscreen/himax/himax_83102E/himax_common.c @@ -239,6 +239,9 @@ bool FAKE_POWER_KEY_SEND = true; struct proc_dir_entry *himax_proc_HSEN_file = NULL; #endif +bool himax_epen_mode = false; +EXPORT_SYMBOL(himax_epen_mode); + #if defined(HX_PALM_REPORT) static int himax_palm_detect(uint8_t *buf) { @@ -2384,6 +2387,8 @@ static void himax_finger_report(struct himax_ts_data *ts) int i = 0; bool valid = false; + if (himax_epen_mode) + return; if (g_ts_dbg != 0) { I("%s:start\n", __func__); diff --git a/drivers/input/wacom/wacom.h b/drivers/input/wacom/wacom.h index 47a36b084ccd..6acd7f525994 100644 --- a/drivers/input/wacom/wacom.h +++ b/drivers/input/wacom/wacom.h @@ -397,4 +397,9 @@ extern int set_spen_mode(int mode); #ifdef CONFIG_SEC_FACTORY bool wacom_check_ub(struct wacom_i2c *wac_i2c); #endif + +#ifdef CONFIG_TOUCHSCREEN_HIMAX_SPI +extern bool himax_epen_mode; +#endif + #endif /* _LINUX_WACOM_H_ */ diff --git a/drivers/input/wacom/wacom_i2c.c b/drivers/input/wacom/wacom_i2c.c index 7fa71e84afa8..0a03800e1c3a 100644 --- a/drivers/input/wacom/wacom_i2c.c +++ b/drivers/input/wacom/wacom_i2c.c @@ -1271,6 +1271,10 @@ int wacom_i2c_coord(struct wacom_i2c *wac_i2c) wac_i2c->localscan_mode = false; } +#ifdef CONFIG_TOUCHSCREEN_HIMAX_SPI + himax_epen_mode = wac_i2c->pen_prox || wac_i2c->pen_pressed; +#endif + return 0; }