Loading drivers/input/touchscreen/st/fts.c +22 −15 Original line number Diff line number Diff line Loading @@ -3526,14 +3526,12 @@ static int fts_interrupt_install(struct fts_ts_info *info) hrtimer_start(&info->timer, ktime_set(1, 0), HRTIMER_MODE_REL); #else logError(0, "%s Interrupt Mode\n", tag); if (request_irq(info->client->irq, fts_interrupt_handler, IRQF_TRIGGER_LOW, info->client->name, info)) { if (request_threaded_irq(info->client->irq, NULL, fts_interrupt_handler, IRQF_TRIGGER_LOW | IRQF_ONESHOT, info->client->name, info)) { logError(1, "%s Request irq failed\n", tag); kfree(info->event_dispatch_table); error = -EBUSY; } /*else {*/ /*error = fts_enableInterrupt();*/ /*}*/ } #endif return error; } Loading @@ -3558,6 +3556,21 @@ static void fts_interrupt_enable(struct fts_ts_info *info) #else enable_irq(info->client->irq); #endif /* enable the touch IC irq */ fts_enableInterrupt(); } static void fts_interrupt_disable(struct fts_ts_info *info) { /* disable the touch IC irq */ fts_disableInterrupt(); #ifdef FTS_USE_POLLING_MODE hrtimer_cancel(&info->timer); #else disable_irq(info->client->irq); #endif } static int fts_init(struct fts_ts_info *info) Loading Loading @@ -4041,11 +4054,6 @@ static void fts_resume_work(struct work_struct *work) __pm_wakeup_event(&info->wakeup_source, HZ); if (fts_enable_reg(info, true) < 0) { logError(1, "%s %s: ERROR Failed to enable regulators\n", tag, __func__); } if (info->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found Loading @@ -4060,10 +4068,11 @@ static void fts_resume_work(struct work_struct *work) } info->resume_bit = 1; fts_system_reset(); #ifdef USE_NOISE_PARAM readNoiseParameters(noise_params); #endif fts_system_reset(); #ifdef USE_NOISE_PARAM writeNoiseParameters(noise_params); Loading @@ -4075,7 +4084,7 @@ static void fts_resume_work(struct work_struct *work) info->sensor_sleep = false; fts_enableInterrupt(); fts_interrupt_enable(info); } Loading @@ -4091,11 +4100,10 @@ static void fts_suspend_work(struct work_struct *work) fts_mode_handler(info, 0); fts_interrupt_disable(info); release_all_touches(info); info->sensor_sleep = true; fts_enableInterrupt(); if (info->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found Loading @@ -4109,7 +4117,6 @@ static void fts_suspend_work(struct work_struct *work) } } fts_enable_reg(info, false); } Loading drivers/input/touchscreen/st/fts.h +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ /**** FEATURES USED IN THE IC ***/ #define PHONE_KEY /*enable the keys*/ /* #define PHONE_KEY enable the keys */ #define PHONE_GESTURE /*allow to use the gestures*/ #ifdef PHONE_GESTURE Loading drivers/input/touchscreen/st/fts_gui.c +2 −4 Original line number Diff line number Diff line Loading @@ -122,8 +122,7 @@ ssize_t fts_i2c_wr_store(struct device *dev, struct device_attribute *attr, ret = sscanf(buf, "%x %x %x %x %x %x %x %x %x ", (data + 8), (data), (data + 1), (data + 2), (data + 3), (data + 4), (data + 5), (data + 6), (data + 7)); if (ret != 9) return -EINVAL; byte_count = data[8]; /** Loading Loading @@ -251,8 +250,7 @@ ssize_t fts_i2c_read_store(struct device *dev, struct device_attribute *attr, ret = sscanf(buf, "%x %x %x %x %x %x %x %x %x ", (data + 8), (data), (data + 1), (data + 2), (data + 3), (data + 4), (data + 5), (data + 6), (data + 7)); if (ret != 9) return -EINVAL; byte_count = data[8]; if (byte_count > 8) { Loading Loading
drivers/input/touchscreen/st/fts.c +22 −15 Original line number Diff line number Diff line Loading @@ -3526,14 +3526,12 @@ static int fts_interrupt_install(struct fts_ts_info *info) hrtimer_start(&info->timer, ktime_set(1, 0), HRTIMER_MODE_REL); #else logError(0, "%s Interrupt Mode\n", tag); if (request_irq(info->client->irq, fts_interrupt_handler, IRQF_TRIGGER_LOW, info->client->name, info)) { if (request_threaded_irq(info->client->irq, NULL, fts_interrupt_handler, IRQF_TRIGGER_LOW | IRQF_ONESHOT, info->client->name, info)) { logError(1, "%s Request irq failed\n", tag); kfree(info->event_dispatch_table); error = -EBUSY; } /*else {*/ /*error = fts_enableInterrupt();*/ /*}*/ } #endif return error; } Loading @@ -3558,6 +3556,21 @@ static void fts_interrupt_enable(struct fts_ts_info *info) #else enable_irq(info->client->irq); #endif /* enable the touch IC irq */ fts_enableInterrupt(); } static void fts_interrupt_disable(struct fts_ts_info *info) { /* disable the touch IC irq */ fts_disableInterrupt(); #ifdef FTS_USE_POLLING_MODE hrtimer_cancel(&info->timer); #else disable_irq(info->client->irq); #endif } static int fts_init(struct fts_ts_info *info) Loading Loading @@ -4041,11 +4054,6 @@ static void fts_resume_work(struct work_struct *work) __pm_wakeup_event(&info->wakeup_source, HZ); if (fts_enable_reg(info, true) < 0) { logError(1, "%s %s: ERROR Failed to enable regulators\n", tag, __func__); } if (info->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found Loading @@ -4060,10 +4068,11 @@ static void fts_resume_work(struct work_struct *work) } info->resume_bit = 1; fts_system_reset(); #ifdef USE_NOISE_PARAM readNoiseParameters(noise_params); #endif fts_system_reset(); #ifdef USE_NOISE_PARAM writeNoiseParameters(noise_params); Loading @@ -4075,7 +4084,7 @@ static void fts_resume_work(struct work_struct *work) info->sensor_sleep = false; fts_enableInterrupt(); fts_interrupt_enable(info); } Loading @@ -4091,11 +4100,10 @@ static void fts_suspend_work(struct work_struct *work) fts_mode_handler(info, 0); fts_interrupt_disable(info); release_all_touches(info); info->sensor_sleep = true; fts_enableInterrupt(); if (info->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found Loading @@ -4109,7 +4117,6 @@ static void fts_suspend_work(struct work_struct *work) } } fts_enable_reg(info, false); } Loading
drivers/input/touchscreen/st/fts.h +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ /**** FEATURES USED IN THE IC ***/ #define PHONE_KEY /*enable the keys*/ /* #define PHONE_KEY enable the keys */ #define PHONE_GESTURE /*allow to use the gestures*/ #ifdef PHONE_GESTURE Loading
drivers/input/touchscreen/st/fts_gui.c +2 −4 Original line number Diff line number Diff line Loading @@ -122,8 +122,7 @@ ssize_t fts_i2c_wr_store(struct device *dev, struct device_attribute *attr, ret = sscanf(buf, "%x %x %x %x %x %x %x %x %x ", (data + 8), (data), (data + 1), (data + 2), (data + 3), (data + 4), (data + 5), (data + 6), (data + 7)); if (ret != 9) return -EINVAL; byte_count = data[8]; /** Loading Loading @@ -251,8 +250,7 @@ ssize_t fts_i2c_read_store(struct device *dev, struct device_attribute *attr, ret = sscanf(buf, "%x %x %x %x %x %x %x %x %x ", (data + 8), (data), (data + 1), (data + 2), (data + 3), (data + 4), (data + 5), (data + 6), (data + 7)); if (ret != 9) return -EINVAL; byte_count = data[8]; if (byte_count > 8) { Loading