Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_active_pen.c +1 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -244,8 +244,6 @@ static void apen_set_params(void) apen->rmi4_data->sensor_max_y, 0, 0); input_set_abs_params(apen->apen_dev, ABS_PRESSURE, 0, apen->max_pressure, 0, 0); return; } static int apen_pressure(struct synaptics_rmi4_f12_query_8 *query_8) Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c +46 −38 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -46,7 +46,6 @@ #include <linux/input/mt.h> #endif #include <linux/msm_drm_notify.h> #include <linux/completion.h> #define INPUT_PHYS_NAME "synaptics_dsx/touch_input" Loading Loading @@ -129,7 +128,7 @@ static int synaptics_rmi4_reset_device(struct synaptics_rmi4_data *rmi4_data, bool rebuild); static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, unsigned long event, void *data); struct drm_panel *active_panel; #ifdef CONFIG_HAS_EARLYSUSPEND #ifndef CONFIG_FB #define USE_EARLYSUSPEND Loading Loading @@ -1013,9 +1012,11 @@ static int synaptics_rmi4_f12_wg(struct synaptics_rmi4_data *rmi4_data, } if (enable) reporting_control[rmi4_data->set_wakeup_gesture] = F12_WAKEUP_GESTURE_MODE; reporting_control[rmi4_data->set_wakeup_gesture] = F12_WAKEUP_GESTURE_MODE; else reporting_control[rmi4_data->set_wakeup_gesture] = F12_CONTINUOUS_MODE; reporting_control[rmi4_data->set_wakeup_gesture] = F12_CONTINUOUS_MODE; retval = synaptics_rmi4_reg_write(rmi4_data, fhandler->full_addr.ctrl_base + offset, Loading Loading @@ -3311,7 +3312,7 @@ static int synaptics_rmi4_gpio_setup(int gpio, bool config, int dir, int state) unsigned char buf[16]; if (config) { snprintf(buf, PAGE_SIZE, "dsx_gpio_%u\n", gpio); snprintf(buf, sizeof(buf), "dsx_gpio_%u\n", gpio); retval = gpio_request(gpio, buf); if (retval) { Loading Loading @@ -4280,14 +4281,16 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) rmi4_data->initialized = false; rmi4_data->fb_notifier.notifier_call = synaptics_rmi4_dsi_panel_notifier_cb; retval = msm_drm_register_client(&rmi4_data->fb_notifier); if (active_panel) { retval = drm_panel_notifier_register(active_panel, &rmi4_data->fb_notifier); if (retval < 0) { dev_err(&pdev->dev, "%s: Failed to register fb notifier client\n", __func__); goto err_drm_reg; } } rmi4_data->rmi4_probe_wq = create_singlethread_workqueue( "Synaptics_rmi4_probe_wq"); if (!rmi4_data->rmi4_probe_wq) { Loading @@ -4302,7 +4305,9 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) return retval; err_probe_wq: msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); err_drm_reg: kfree(rmi4_data); Loading Loading @@ -4360,9 +4365,10 @@ static void synaptics_rmi4_defer_probe(struct work_struct *work) retval = synaptics_dsx_pinctrl_init(rmi4_data); if (!retval && rmi4_data->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found * let pins to be configured in active state. If not * found continue further without error. * Pinctrl handle is optional. * If pinctrl handle is found let pins to be * configured in active state. If not found continue * further without error. */ retval = pinctrl_select_state(rmi4_data->ts_pinctrl, rmi4_data->pinctrl_state_active); Loading Loading @@ -4533,12 +4539,12 @@ static void synaptics_rmi4_defer_probe(struct work_struct *work) err_get_reg: err_drm_init_wait: msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); cancel_work_sync(&rmi4_data->rmi4_probe_work); destroy_workqueue(rmi4_data->rmi4_probe_wq); kfree(rmi4_data); return; } static int synaptics_rmi4_remove(struct platform_device *pdev) Loading Loading @@ -4575,7 +4581,9 @@ static int synaptics_rmi4_remove(struct platform_device *pdev) synaptics_rmi4_irq_enable(rmi4_data, false, false); msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); #ifdef USE_EARLYSUSPEND unregister_early_suspend(&rmi4_data->early_suspend); Loading Loading @@ -4623,18 +4631,18 @@ static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, unsigned long event, void *data) { int transition; struct msm_drm_notifier *evdata = data; struct drm_panel_notifier *evdata = data; struct synaptics_rmi4_data *rmi4_data = container_of(self, struct synaptics_rmi4_data, fb_notifier); if (!evdata || (evdata->id != 0)) if (!evdata) return 0; if (evdata && evdata->data && rmi4_data) { if (event == MSM_DRM_EARLY_EVENT_BLANK) { if (event == DRM_PANEL_EARLY_EVENT_BLANK) { transition = *(int *)evdata->data; if (transition == MSM_DRM_BLANK_POWERDOWN) { if (transition == DRM_PANEL_BLANK_POWERDOWN) { if (rmi4_data->initialized) synaptics_rmi4_suspend( &rmi4_data->pdev->dev); Loading @@ -4644,9 +4652,9 @@ static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, } if (evdata && evdata->data && rmi4_data) { if (event == MSM_DRM_EVENT_BLANK) { if (event == DRM_PANEL_EVENT_BLANK) { transition = *(int *)evdata->data; if (transition == MSM_DRM_BLANK_UNBLANK) { if (transition == DRM_PANEL_BLANK_UNBLANK) { if (rmi4_data->initialized) synaptics_rmi4_resume( &rmi4_data->pdev->dev); Loading Loading @@ -4935,7 +4943,7 @@ static void __exit synaptics_rmi4_exit(void) synaptics_rmi4_bus_exit(); } module_init(synaptics_rmi4_init); late_initcall(synaptics_rmi4_init); module_exit(synaptics_rmi4_exit); MODULE_AUTHOR("Synaptics, Inc."); Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.h +6 −10 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -49,6 +49,8 @@ #include <linux/earlysuspend.h> #endif #include <drm/drm_panel.h> #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)) #define KERNEL_ABOVE_2_6_38 #endif Loading @@ -62,15 +64,7 @@ #else #define sstrtoul(...) strict_strtoul(__VA_ARGS__) #endif /* *#define F51_DISCRETE_FORCE *#ifdef F51_DISCRETE_FORCE *#define FORCE_LEVEL_ADDR 0x0419 *#define FORCE_LEVEL_MAX 255 *#define CAL_DATA_SIZE 144 *#endif *#define SYNA_TDDI */ #define PDT_PROPS (0X00EF) #define PDT_START (0x00E9) #define PDT_END (0x00D0) Loading Loading @@ -141,6 +135,8 @@ enum exp_fn { RMI_LAST, }; extern struct drm_panel *active_panel; /* * struct synaptics_rmi4_fn_desc - function descriptor fields in PDT entry * @query_base_addr: base address for query registers Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_fw_update.c +2 −40 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -45,21 +45,6 @@ #define FW_IHEX_NAME "synaptics/startup_fw_update.bin" #define FW_IMAGE_NAME "synaptics/startup_fw_update.img" /* *#define DO_STARTUP_FW_UPDATE */ /* *#ifdef DO_STARTUP_FW_UPDATE *#ifdef CONFIG_FB *#define WAIT_FOR_FB_READY *#define FB_READY_WAIT_MS 100 *#define FB_READY_TIMEOUT_S 30 *#endif *#endif */ /* *#define MAX_WRITE_SIZE 4096 */ #define ENABLE_SYS_REFLASH false #define FORCE_UPDATE false Loading Loading @@ -858,8 +843,6 @@ static void calculate_checksum(unsigned short *data, unsigned long len, } *result = sum2 << 16 | sum1; return; } static void convert_to_little_endian(unsigned char *dest, unsigned long src) Loading @@ -868,8 +851,6 @@ static void convert_to_little_endian(unsigned char *dest, unsigned long src) dest[1] = (unsigned char)((src >> 8) & 0xff); dest[2] = (unsigned char)((src >> 16) & 0xff); dest[3] = (unsigned char)((src >> 24) & 0xff); return; } static unsigned int le_to_uint(const unsigned char *ptr) Loading Loading @@ -1007,8 +988,6 @@ static void fwu_compare_partition_tables(void) if (fwu->phyaddr.guest_code != fwu->img.phyaddr.guest_code) fwu->new_partition_table = true; } return; } static void fwu_parse_partition_table(const unsigned char *partition_table, Loading Loading @@ -1121,8 +1100,6 @@ static void fwu_parse_partition_table(const unsigned char *partition_table, break; }; } return; } static void fwu_parse_image_header_10_utility(const unsigned char *image) Loading Loading @@ -1156,8 +1133,6 @@ static void fwu_parse_image_header_10_utility(const unsigned char *image) break; }; } return; } static void fwu_parse_image_header_10_bootloader(const unsigned char *image) Loading Loading @@ -1198,8 +1173,6 @@ static void fwu_parse_image_header_10_bootloader(const unsigned char *image) break; }; } return; } static void fwu_parse_image_header_10(void) Loading Loading @@ -1287,8 +1260,6 @@ static void fwu_parse_image_header_10(void) break; } } return; } static void fwu_parse_image_header_05_06(void) Loading Loading @@ -1366,8 +1337,6 @@ static void fwu_parse_image_header_05_06(void) fwu->img.lockdown.size = LOCKDOWN_SIZE; fwu->img.lockdown.data = image + IMAGE_AREA_OFFSET - LOCKDOWN_SIZE; return; } static int fwu_parse_image_info(void) Loading Loading @@ -4983,8 +4952,6 @@ static void fwu_startup_fw_update_work(struct work_struct *work) #endif synaptics_fw_updater(NULL); return; } #endif Loading Loading @@ -5322,9 +5289,8 @@ static ssize_t fwu_sysfs_image_size_store(struct device *dev, "%s: Failed to alloc mem for image data\n", __func__); retval = -ENOMEM; } else { retval = count; } retval = count; mutex_unlock(&fwu_sysfs_mutex); Loading Loading @@ -5769,8 +5735,6 @@ static void synaptics_rmi4_fwu_remove(struct synaptics_rmi4_data *rmi4_data) exit: complete(&fwu_remove_complete); return; } static void synaptics_rmi4_fwu_reset(struct synaptics_rmi4_data *rmi4_data) Loading Loading @@ -5823,8 +5787,6 @@ static void __exit rmi4_fw_update_module_exit(void) synaptics_rmi4_new_function(&fwu_module, false); wait_for_completion(&fwu_remove_complete); return; } module_init(rmi4_fw_update_module_init); Loading drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_gesture.c +3 −21 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -906,9 +906,8 @@ static ssize_t udg_sysfs_trace_data_show(struct file *data_file, "%s: Failed to read trace X data\n", __func__); return retval; } else { index += udg->trace_size * 2; } index += udg->trace_size * 2; retval = synaptics_rmi4_reg_read(rmi4_data, udg->addr.trace_y, Loading @@ -919,9 +918,8 @@ static ssize_t udg_sysfs_trace_data_show(struct file *data_file, "%s: Failed to read trace Y data\n", __func__); return retval; } else { index += udg->trace_size * 2; } index += udg->trace_size * 2; retval = synaptics_rmi4_reg_read(rmi4_data, udg->addr.trace_segment, Loading Loading @@ -2185,8 +2183,6 @@ static void synaptics_rmi4_udg_remove(struct synaptics_rmi4_data *rmi4_data) exit: complete(&udg_remove_complete); return; } static void synaptics_rmi4_udg_reset(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2202,8 +2198,6 @@ static void synaptics_rmi4_udg_reset(struct synaptics_rmi4_data *rmi4_data) udg_write_template_data(); udg_write_valid_data(); #endif return; } static void synaptics_rmi4_udg_reinit(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2216,8 +2210,6 @@ static void synaptics_rmi4_udg_reinit(struct synaptics_rmi4_data *rmi4_data) udg_write_template_data(); udg_write_valid_data(); #endif return; } static void synaptics_rmi4_udg_e_suspend(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2231,8 +2223,6 @@ static void synaptics_rmi4_udg_e_suspend(struct synaptics_rmi4_data *rmi4_data) udg_engine_enable(true); udg_detection_enable(true); return; } static void synaptics_rmi4_udg_suspend(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2246,8 +2236,6 @@ static void synaptics_rmi4_udg_suspend(struct synaptics_rmi4_data *rmi4_data) udg_engine_enable(true); udg_detection_enable(true); return; } static void synaptics_rmi4_udg_resume(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2257,8 +2245,6 @@ static void synaptics_rmi4_udg_resume(struct synaptics_rmi4_data *rmi4_data) disable_irq_wake(rmi4_data->irq); udg_detection_enable(false); return; } static void synaptics_rmi4_udg_l_resume(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2268,8 +2254,6 @@ static void synaptics_rmi4_udg_l_resume(struct synaptics_rmi4_data *rmi4_data) disable_irq_wake(rmi4_data->irq); udg_detection_enable(false); return; } static struct synaptics_rmi4_exp_fn gesture_module = { Loading Loading @@ -2297,8 +2281,6 @@ static void __exit rmi4_gesture_module_exit(void) synaptics_rmi4_new_function(&gesture_module, false); wait_for_completion(&udg_remove_complete); return; } module_init(rmi4_gesture_module_init); Loading Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_active_pen.c +1 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -244,8 +244,6 @@ static void apen_set_params(void) apen->rmi4_data->sensor_max_y, 0, 0); input_set_abs_params(apen->apen_dev, ABS_PRESSURE, 0, apen->max_pressure, 0, 0); return; } static int apen_pressure(struct synaptics_rmi4_f12_query_8 *query_8) Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.c +46 −38 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -46,7 +46,6 @@ #include <linux/input/mt.h> #endif #include <linux/msm_drm_notify.h> #include <linux/completion.h> #define INPUT_PHYS_NAME "synaptics_dsx/touch_input" Loading Loading @@ -129,7 +128,7 @@ static int synaptics_rmi4_reset_device(struct synaptics_rmi4_data *rmi4_data, bool rebuild); static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, unsigned long event, void *data); struct drm_panel *active_panel; #ifdef CONFIG_HAS_EARLYSUSPEND #ifndef CONFIG_FB #define USE_EARLYSUSPEND Loading Loading @@ -1013,9 +1012,11 @@ static int synaptics_rmi4_f12_wg(struct synaptics_rmi4_data *rmi4_data, } if (enable) reporting_control[rmi4_data->set_wakeup_gesture] = F12_WAKEUP_GESTURE_MODE; reporting_control[rmi4_data->set_wakeup_gesture] = F12_WAKEUP_GESTURE_MODE; else reporting_control[rmi4_data->set_wakeup_gesture] = F12_CONTINUOUS_MODE; reporting_control[rmi4_data->set_wakeup_gesture] = F12_CONTINUOUS_MODE; retval = synaptics_rmi4_reg_write(rmi4_data, fhandler->full_addr.ctrl_base + offset, Loading Loading @@ -3311,7 +3312,7 @@ static int synaptics_rmi4_gpio_setup(int gpio, bool config, int dir, int state) unsigned char buf[16]; if (config) { snprintf(buf, PAGE_SIZE, "dsx_gpio_%u\n", gpio); snprintf(buf, sizeof(buf), "dsx_gpio_%u\n", gpio); retval = gpio_request(gpio, buf); if (retval) { Loading Loading @@ -4280,14 +4281,16 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) rmi4_data->initialized = false; rmi4_data->fb_notifier.notifier_call = synaptics_rmi4_dsi_panel_notifier_cb; retval = msm_drm_register_client(&rmi4_data->fb_notifier); if (active_panel) { retval = drm_panel_notifier_register(active_panel, &rmi4_data->fb_notifier); if (retval < 0) { dev_err(&pdev->dev, "%s: Failed to register fb notifier client\n", __func__); goto err_drm_reg; } } rmi4_data->rmi4_probe_wq = create_singlethread_workqueue( "Synaptics_rmi4_probe_wq"); if (!rmi4_data->rmi4_probe_wq) { Loading @@ -4302,7 +4305,9 @@ static int synaptics_rmi4_probe(struct platform_device *pdev) return retval; err_probe_wq: msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); err_drm_reg: kfree(rmi4_data); Loading Loading @@ -4360,9 +4365,10 @@ static void synaptics_rmi4_defer_probe(struct work_struct *work) retval = synaptics_dsx_pinctrl_init(rmi4_data); if (!retval && rmi4_data->ts_pinctrl) { /* * Pinctrl handle is optional. If pinctrl handle is found * let pins to be configured in active state. If not * found continue further without error. * Pinctrl handle is optional. * If pinctrl handle is found let pins to be * configured in active state. If not found continue * further without error. */ retval = pinctrl_select_state(rmi4_data->ts_pinctrl, rmi4_data->pinctrl_state_active); Loading Loading @@ -4533,12 +4539,12 @@ static void synaptics_rmi4_defer_probe(struct work_struct *work) err_get_reg: err_drm_init_wait: msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); cancel_work_sync(&rmi4_data->rmi4_probe_work); destroy_workqueue(rmi4_data->rmi4_probe_wq); kfree(rmi4_data); return; } static int synaptics_rmi4_remove(struct platform_device *pdev) Loading Loading @@ -4575,7 +4581,9 @@ static int synaptics_rmi4_remove(struct platform_device *pdev) synaptics_rmi4_irq_enable(rmi4_data, false, false); msm_drm_unregister_client(&rmi4_data->fb_notifier); if (active_panel) drm_panel_notifier_unregister(active_panel, &rmi4_data->fb_notifier); #ifdef USE_EARLYSUSPEND unregister_early_suspend(&rmi4_data->early_suspend); Loading Loading @@ -4623,18 +4631,18 @@ static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, unsigned long event, void *data) { int transition; struct msm_drm_notifier *evdata = data; struct drm_panel_notifier *evdata = data; struct synaptics_rmi4_data *rmi4_data = container_of(self, struct synaptics_rmi4_data, fb_notifier); if (!evdata || (evdata->id != 0)) if (!evdata) return 0; if (evdata && evdata->data && rmi4_data) { if (event == MSM_DRM_EARLY_EVENT_BLANK) { if (event == DRM_PANEL_EARLY_EVENT_BLANK) { transition = *(int *)evdata->data; if (transition == MSM_DRM_BLANK_POWERDOWN) { if (transition == DRM_PANEL_BLANK_POWERDOWN) { if (rmi4_data->initialized) synaptics_rmi4_suspend( &rmi4_data->pdev->dev); Loading @@ -4644,9 +4652,9 @@ static int synaptics_rmi4_dsi_panel_notifier_cb(struct notifier_block *self, } if (evdata && evdata->data && rmi4_data) { if (event == MSM_DRM_EVENT_BLANK) { if (event == DRM_PANEL_EVENT_BLANK) { transition = *(int *)evdata->data; if (transition == MSM_DRM_BLANK_UNBLANK) { if (transition == DRM_PANEL_BLANK_UNBLANK) { if (rmi4_data->initialized) synaptics_rmi4_resume( &rmi4_data->pdev->dev); Loading Loading @@ -4935,7 +4943,7 @@ static void __exit synaptics_rmi4_exit(void) synaptics_rmi4_bus_exit(); } module_init(synaptics_rmi4_init); late_initcall(synaptics_rmi4_init); module_exit(synaptics_rmi4_exit); MODULE_AUTHOR("Synaptics, Inc."); Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_core.h +6 −10 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -49,6 +49,8 @@ #include <linux/earlysuspend.h> #endif #include <drm/drm_panel.h> #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)) #define KERNEL_ABOVE_2_6_38 #endif Loading @@ -62,15 +64,7 @@ #else #define sstrtoul(...) strict_strtoul(__VA_ARGS__) #endif /* *#define F51_DISCRETE_FORCE *#ifdef F51_DISCRETE_FORCE *#define FORCE_LEVEL_ADDR 0x0419 *#define FORCE_LEVEL_MAX 255 *#define CAL_DATA_SIZE 144 *#endif *#define SYNA_TDDI */ #define PDT_PROPS (0X00EF) #define PDT_START (0x00E9) #define PDT_END (0x00D0) Loading Loading @@ -141,6 +135,8 @@ enum exp_fn { RMI_LAST, }; extern struct drm_panel *active_panel; /* * struct synaptics_rmi4_fn_desc - function descriptor fields in PDT entry * @query_base_addr: base address for query registers Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_fw_update.c +2 −40 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -45,21 +45,6 @@ #define FW_IHEX_NAME "synaptics/startup_fw_update.bin" #define FW_IMAGE_NAME "synaptics/startup_fw_update.img" /* *#define DO_STARTUP_FW_UPDATE */ /* *#ifdef DO_STARTUP_FW_UPDATE *#ifdef CONFIG_FB *#define WAIT_FOR_FB_READY *#define FB_READY_WAIT_MS 100 *#define FB_READY_TIMEOUT_S 30 *#endif *#endif */ /* *#define MAX_WRITE_SIZE 4096 */ #define ENABLE_SYS_REFLASH false #define FORCE_UPDATE false Loading Loading @@ -858,8 +843,6 @@ static void calculate_checksum(unsigned short *data, unsigned long len, } *result = sum2 << 16 | sum1; return; } static void convert_to_little_endian(unsigned char *dest, unsigned long src) Loading @@ -868,8 +851,6 @@ static void convert_to_little_endian(unsigned char *dest, unsigned long src) dest[1] = (unsigned char)((src >> 8) & 0xff); dest[2] = (unsigned char)((src >> 16) & 0xff); dest[3] = (unsigned char)((src >> 24) & 0xff); return; } static unsigned int le_to_uint(const unsigned char *ptr) Loading Loading @@ -1007,8 +988,6 @@ static void fwu_compare_partition_tables(void) if (fwu->phyaddr.guest_code != fwu->img.phyaddr.guest_code) fwu->new_partition_table = true; } return; } static void fwu_parse_partition_table(const unsigned char *partition_table, Loading Loading @@ -1121,8 +1100,6 @@ static void fwu_parse_partition_table(const unsigned char *partition_table, break; }; } return; } static void fwu_parse_image_header_10_utility(const unsigned char *image) Loading Loading @@ -1156,8 +1133,6 @@ static void fwu_parse_image_header_10_utility(const unsigned char *image) break; }; } return; } static void fwu_parse_image_header_10_bootloader(const unsigned char *image) Loading Loading @@ -1198,8 +1173,6 @@ static void fwu_parse_image_header_10_bootloader(const unsigned char *image) break; }; } return; } static void fwu_parse_image_header_10(void) Loading Loading @@ -1287,8 +1260,6 @@ static void fwu_parse_image_header_10(void) break; } } return; } static void fwu_parse_image_header_05_06(void) Loading Loading @@ -1366,8 +1337,6 @@ static void fwu_parse_image_header_05_06(void) fwu->img.lockdown.size = LOCKDOWN_SIZE; fwu->img.lockdown.data = image + IMAGE_AREA_OFFSET - LOCKDOWN_SIZE; return; } static int fwu_parse_image_info(void) Loading Loading @@ -4983,8 +4952,6 @@ static void fwu_startup_fw_update_work(struct work_struct *work) #endif synaptics_fw_updater(NULL); return; } #endif Loading Loading @@ -5322,9 +5289,8 @@ static ssize_t fwu_sysfs_image_size_store(struct device *dev, "%s: Failed to alloc mem for image data\n", __func__); retval = -ENOMEM; } else { retval = count; } retval = count; mutex_unlock(&fwu_sysfs_mutex); Loading Loading @@ -5769,8 +5735,6 @@ static void synaptics_rmi4_fwu_remove(struct synaptics_rmi4_data *rmi4_data) exit: complete(&fwu_remove_complete); return; } static void synaptics_rmi4_fwu_reset(struct synaptics_rmi4_data *rmi4_data) Loading Loading @@ -5823,8 +5787,6 @@ static void __exit rmi4_fw_update_module_exit(void) synaptics_rmi4_new_function(&fwu_module, false); wait_for_completion(&fwu_remove_complete); return; } module_init(rmi4_fw_update_module_init); Loading
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_gesture.c +3 −21 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ * * Copyright (C) 2012-2016 Synaptics Incorporated. All rights reserved. * * Copyright (c) 2018 The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. * Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com> * Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com> * Loading Loading @@ -906,9 +906,8 @@ static ssize_t udg_sysfs_trace_data_show(struct file *data_file, "%s: Failed to read trace X data\n", __func__); return retval; } else { index += udg->trace_size * 2; } index += udg->trace_size * 2; retval = synaptics_rmi4_reg_read(rmi4_data, udg->addr.trace_y, Loading @@ -919,9 +918,8 @@ static ssize_t udg_sysfs_trace_data_show(struct file *data_file, "%s: Failed to read trace Y data\n", __func__); return retval; } else { index += udg->trace_size * 2; } index += udg->trace_size * 2; retval = synaptics_rmi4_reg_read(rmi4_data, udg->addr.trace_segment, Loading Loading @@ -2185,8 +2183,6 @@ static void synaptics_rmi4_udg_remove(struct synaptics_rmi4_data *rmi4_data) exit: complete(&udg_remove_complete); return; } static void synaptics_rmi4_udg_reset(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2202,8 +2198,6 @@ static void synaptics_rmi4_udg_reset(struct synaptics_rmi4_data *rmi4_data) udg_write_template_data(); udg_write_valid_data(); #endif return; } static void synaptics_rmi4_udg_reinit(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2216,8 +2210,6 @@ static void synaptics_rmi4_udg_reinit(struct synaptics_rmi4_data *rmi4_data) udg_write_template_data(); udg_write_valid_data(); #endif return; } static void synaptics_rmi4_udg_e_suspend(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2231,8 +2223,6 @@ static void synaptics_rmi4_udg_e_suspend(struct synaptics_rmi4_data *rmi4_data) udg_engine_enable(true); udg_detection_enable(true); return; } static void synaptics_rmi4_udg_suspend(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2246,8 +2236,6 @@ static void synaptics_rmi4_udg_suspend(struct synaptics_rmi4_data *rmi4_data) udg_engine_enable(true); udg_detection_enable(true); return; } static void synaptics_rmi4_udg_resume(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2257,8 +2245,6 @@ static void synaptics_rmi4_udg_resume(struct synaptics_rmi4_data *rmi4_data) disable_irq_wake(rmi4_data->irq); udg_detection_enable(false); return; } static void synaptics_rmi4_udg_l_resume(struct synaptics_rmi4_data *rmi4_data) Loading @@ -2268,8 +2254,6 @@ static void synaptics_rmi4_udg_l_resume(struct synaptics_rmi4_data *rmi4_data) disable_irq_wake(rmi4_data->irq); udg_detection_enable(false); return; } static struct synaptics_rmi4_exp_fn gesture_module = { Loading Loading @@ -2297,8 +2281,6 @@ static void __exit rmi4_gesture_module_exit(void) synaptics_rmi4_new_function(&gesture_module, false); wait_for_completion(&udg_remove_complete); return; } module_init(rmi4_gesture_module_init); Loading