mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
Merge "input: touchscreen: synaptics_dsx: Fix Propagation"
This commit is contained in:
commit
2395f4189c
12 changed files with 215 additions and 324 deletions
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
|
@ -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) {
|
||||
|
|
@ -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 (retval < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Failed to register fb notifier client\n",
|
||||
__func__);
|
||||
goto err_drm_reg;
|
||||
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) {
|
||||
|
|
@ -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);
|
||||
|
|
@ -4358,20 +4363,21 @@ 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.
|
||||
*/
|
||||
retval = pinctrl_select_state(rmi4_data->ts_pinctrl,
|
||||
rmi4_data->pinctrl_state_active);
|
||||
if (retval < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Failed to select %s pinstate %d\n",
|
||||
__func__, PINCTRL_STATE_ACTIVE, retval);
|
||||
}
|
||||
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.
|
||||
*/
|
||||
retval = pinctrl_select_state(rmi4_data->ts_pinctrl,
|
||||
rmi4_data->pinctrl_state_active);
|
||||
if (retval < 0) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Failed to select %s pinstate %d\n",
|
||||
__func__, PINCTRL_STATE_ACTIVE, retval);
|
||||
}
|
||||
}
|
||||
|
||||
if (hw_if->ui_hw_init) {
|
||||
retval = hw_if->ui_hw_init(rmi4_data);
|
||||
|
|
@ -4533,12 +4539,12 @@ err_enable_reg:
|
|||
|
||||
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)
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
|
|
@ -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.");
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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,
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -1287,8 +1260,6 @@ static void fwu_parse_image_header_10(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void fwu_parse_image_header_05_06(void)
|
||||
|
|
@ -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)
|
||||
|
|
@ -4983,8 +4952,6 @@ static void fwu_startup_fw_update_work(struct work_struct *work)
|
|||
#endif
|
||||
|
||||
synaptics_fw_updater(NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -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)
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -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,
|
||||
|
|
@ -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,
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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 = {
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -97,9 +97,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_on_state = value;
|
||||
}
|
||||
bdata->power_on_state = value;
|
||||
} else {
|
||||
bdata->power_gpio = -1;
|
||||
}
|
||||
|
|
@ -112,9 +111,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_delay_ms = value;
|
||||
}
|
||||
bdata->power_delay_ms = value;
|
||||
} else {
|
||||
bdata->power_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -129,18 +127,16 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_on_state = value;
|
||||
}
|
||||
bdata->reset_on_state = value;
|
||||
retval = of_property_read_u32(np, "synaptics,reset-active-ms",
|
||||
&value);
|
||||
if (retval < 0) {
|
||||
dev_err(dev, "%s: Unable to read synaptics,reset-active-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_active_ms = value;
|
||||
}
|
||||
bdata->reset_active_ms = value;
|
||||
} else {
|
||||
bdata->reset_gpio = -1;
|
||||
}
|
||||
|
|
@ -153,9 +149,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_delay_ms = value;
|
||||
}
|
||||
bdata->reset_delay_ms = value;
|
||||
} else {
|
||||
bdata->reset_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -168,9 +163,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,max-y-for-2d property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->max_y_for_2d = value;
|
||||
}
|
||||
bdata->max_y_for_2d = value;
|
||||
} else {
|
||||
bdata->max_y_for_2d = -1;
|
||||
}
|
||||
|
|
@ -187,9 +181,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,ub-i2c-addr property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
}
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = -1;
|
||||
}
|
||||
|
|
@ -273,8 +266,6 @@ static void synaptics_rmi4_i2c_check_addr(struct synaptics_rmi4_data *rmi4_data,
|
|||
hw_if.board_data->i2c_addr = hw_if.board_data->ub_i2c_addr;
|
||||
else
|
||||
hw_if.board_data->i2c_addr = i2c->addr;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int synaptics_rmi4_i2c_set_page(struct synaptics_rmi4_data *rmi4_data,
|
||||
|
|
@ -460,6 +451,59 @@ exit:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static int check_dt(struct device_node *np)
|
||||
{
|
||||
int i;
|
||||
int count;
|
||||
struct device_node *node;
|
||||
struct drm_panel *panel;
|
||||
|
||||
count = of_count_phandle_with_args(np, "panel", NULL);
|
||||
if (count <= 0)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
node = of_parse_phandle(np, "panel", i);
|
||||
panel = of_drm_find_panel(node);
|
||||
of_node_put(node);
|
||||
if (!IS_ERR(panel)) {
|
||||
active_panel = panel;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static int check_default_tp(struct device_node *dt, const char *prop)
|
||||
{
|
||||
const char *active_tp;
|
||||
const char *compatible;
|
||||
char *start;
|
||||
int ret;
|
||||
|
||||
ret = of_property_read_string(dt->parent, prop, &active_tp);
|
||||
if (ret) {
|
||||
pr_err(" %s:fail to read %s %d\n", __func__, prop, ret);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = of_property_read_string(dt, "compatible", &compatible);
|
||||
if (ret < 0) {
|
||||
pr_err(" %s:fail to read %s %d\n", __func__, "compatible", ret);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
start = strnstr(active_tp, compatible, strlen(active_tp));
|
||||
if (start == NULL) {
|
||||
pr_err(" %s:no match compatible, %s, %s\n",
|
||||
__func__, compatible, active_tp);
|
||||
ret = -ENODEV;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct synaptics_dsx_bus_access bus_access = {
|
||||
.type = BUS_I2C,
|
||||
.read = synaptics_rmi4_i2c_read,
|
||||
|
|
@ -469,14 +513,22 @@ static struct synaptics_dsx_bus_access bus_access = {
|
|||
static void synaptics_rmi4_i2c_dev_release(struct device *dev)
|
||||
{
|
||||
kfree(synaptics_dsx_i2c_device);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int synaptics_rmi4_i2c_probe(struct i2c_client *client,
|
||||
const struct i2c_device_id *dev_id)
|
||||
{
|
||||
int retval;
|
||||
struct device_node *dp = client->dev.of_node;
|
||||
|
||||
if (check_dt(dp)) {
|
||||
if (!check_default_tp(dp, "qcom,i2c-touch-active"))
|
||||
retval = -EPROBE_DEFER;
|
||||
else
|
||||
retval = -ENODEV;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (!i2c_check_functionality(client->adapter,
|
||||
I2C_FUNC_SMBUS_BYTE_DATA)) {
|
||||
|
|
@ -566,7 +618,7 @@ static const struct i2c_device_id synaptics_rmi4_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(i2c, synaptics_rmi4_id_table);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
static const struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
{
|
||||
.compatible = "synaptics,dsx-i2c",
|
||||
},
|
||||
|
|
@ -599,8 +651,6 @@ void synaptics_rmi4_bus_exit(void)
|
|||
kfree(wr_buf);
|
||||
|
||||
i2c_del_driver(&synaptics_rmi4_i2c_driver);
|
||||
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL(synaptics_rmi4_bus_exit);
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -157,8 +157,6 @@ static void prox_hover_finger_lift(void)
|
|||
input_report_key(prox->prox_dev, BTN_TOOL_FINGER, 0);
|
||||
input_sync(prox->prox_dev);
|
||||
prox->hover_finger_present = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void prox_hover_finger_report(void)
|
||||
|
|
@ -207,8 +205,6 @@ static void prox_hover_finger_report(void)
|
|||
__func__, x, y, z);
|
||||
|
||||
prox->hover_finger_present = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int prox_set_hover_finger_en(void)
|
||||
|
|
@ -255,8 +251,6 @@ static void prox_set_params(void)
|
|||
prox->rmi4_data->sensor_max_y, 0, 0);
|
||||
input_set_abs_params(prox->prox_dev, ABS_DISTANCE, 0,
|
||||
HOVER_Z_MAX, 0, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int prox_reg_init(void)
|
||||
|
|
@ -468,8 +462,6 @@ static void synaptics_rmi4_prox_attn(struct synaptics_rmi4_data *rmi4_data,
|
|||
|
||||
if (prox->intr_mask & intr_mask)
|
||||
prox_hover_finger_report();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int synaptics_rmi4_prox_init(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -604,8 +596,6 @@ static void synaptics_rmi4_prox_remove(struct synaptics_rmi4_data *rmi4_data)
|
|||
|
||||
exit:
|
||||
complete(&prox_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_prox_reset(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -620,8 +610,6 @@ static void synaptics_rmi4_prox_reset(struct synaptics_rmi4_data *rmi4_data)
|
|||
prox_scan_pdt();
|
||||
|
||||
prox_set_hover_finger_en();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_prox_reinit(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -632,8 +620,6 @@ static void synaptics_rmi4_prox_reinit(struct synaptics_rmi4_data *rmi4_data)
|
|||
prox_hover_finger_lift();
|
||||
|
||||
prox_set_hover_finger_en();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_prox_e_suspend(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -642,8 +628,6 @@ static void synaptics_rmi4_prox_e_suspend(struct synaptics_rmi4_data *rmi4_data)
|
|||
return;
|
||||
|
||||
prox_hover_finger_lift();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_prox_suspend(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -652,8 +636,6 @@ static void synaptics_rmi4_prox_suspend(struct synaptics_rmi4_data *rmi4_data)
|
|||
return;
|
||||
|
||||
prox_hover_finger_lift();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static struct synaptics_rmi4_exp_fn proximity_module = {
|
||||
|
|
@ -681,8 +663,6 @@ static void __exit rmi4_proximity_module_exit(void)
|
|||
synaptics_rmi4_new_function(&proximity_module, false);
|
||||
|
||||
wait_for_completion(&prox_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
module_init(rmi4_proximity_module_init);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
#include <linux/gpio.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/sched/signal.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/input/synaptics_dsx.h>
|
||||
#include "synaptics_dsx_core.h"
|
||||
|
|
@ -102,8 +103,8 @@ struct rmidev_handle {
|
|||
struct device dev;
|
||||
struct synaptics_rmi4_data *rmi4_data;
|
||||
struct kobject *sysfs_dir;
|
||||
struct siginfo interrupt_signal;
|
||||
struct siginfo terminate_signal;
|
||||
struct kernel_siginfo interrupt_signal;
|
||||
struct kernel_siginfo terminate_signal;
|
||||
struct task_struct *task;
|
||||
void *data;
|
||||
bool concurrent;
|
||||
|
|
@ -769,8 +770,6 @@ static void rmidev_device_cleanup(struct rmidev_data *dev_data)
|
|||
"%s: rmidev device removed\n",
|
||||
__func__);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static char *rmi_char_devnode(struct device *dev, umode_t *mode)
|
||||
|
|
@ -1039,8 +1038,6 @@ static void rmidev_remove_device(struct synaptics_rmi4_data *rmi4_data)
|
|||
|
||||
exit:
|
||||
complete(&rmidev_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static struct synaptics_rmi4_exp_fn rmidev_module = {
|
||||
|
|
@ -1068,8 +1065,6 @@ static void __exit rmidev_module_exit(void)
|
|||
synaptics_rmi4_new_function(&rmidev_module, false);
|
||||
|
||||
wait_for_completion(&rmidev_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
module_init(rmidev_module_init);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -162,9 +162,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_on_state = value;
|
||||
}
|
||||
bdata->power_on_state = value;
|
||||
} else {
|
||||
bdata->power_gpio = -1;
|
||||
}
|
||||
|
|
@ -177,9 +176,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_delay_ms = value;
|
||||
}
|
||||
bdata->power_delay_ms = value;
|
||||
} else {
|
||||
bdata->power_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -194,18 +192,16 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_on_state = value;
|
||||
}
|
||||
bdata->reset_on_state = value;
|
||||
retval = of_property_read_u32(np, "synaptics,reset-active-ms",
|
||||
&value);
|
||||
if (retval < 0) {
|
||||
dev_err(dev, "%s: Unable to read synaptics,reset-active-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_active_ms = value;
|
||||
}
|
||||
bdata->reset_active_ms = value;
|
||||
} else {
|
||||
bdata->reset_gpio = -1;
|
||||
}
|
||||
|
|
@ -218,9 +214,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_delay_ms = value;
|
||||
}
|
||||
bdata->reset_delay_ms = value;
|
||||
} else {
|
||||
bdata->reset_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -233,9 +228,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,dev-dscrptr-addr property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->device_descriptor_addr = (unsigned short)value;
|
||||
}
|
||||
bdata->device_descriptor_addr = (unsigned short)value;
|
||||
} else {
|
||||
bdata->device_descriptor_addr = 0;
|
||||
}
|
||||
|
|
@ -248,9 +242,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,max-y-for-2d property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->max_y_for_2d = value;
|
||||
}
|
||||
bdata->max_y_for_2d = value;
|
||||
} else {
|
||||
bdata->max_y_for_2d = -1;
|
||||
}
|
||||
|
|
@ -272,9 +265,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,ub-i2c-addr property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
}
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = -1;
|
||||
}
|
||||
|
|
@ -422,8 +414,6 @@ static void traverse_report_descriptor(unsigned int *index)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void find_blob_size(unsigned int index)
|
||||
|
|
@ -441,8 +431,6 @@ static void find_blob_size(unsigned int index)
|
|||
}
|
||||
traverse_report_descriptor(&ii);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void find_reports(unsigned int index)
|
||||
|
|
@ -489,8 +477,6 @@ static void find_reports(unsigned int index)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int parse_report_descriptor(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -862,8 +848,6 @@ static struct platform_device *synaptics_dsx_i2c_device;
|
|||
static void synaptics_rmi4_i2c_dev_release(struct device *dev)
|
||||
{
|
||||
kfree(synaptics_dsx_i2c_device);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int synaptics_rmi4_i2c_probe(struct i2c_client *client,
|
||||
|
|
@ -966,7 +950,7 @@ static const struct i2c_device_id synaptics_rmi4_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(i2c, synaptics_rmi4_id_table);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
static const struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
{
|
||||
.compatible = "synaptics,dsx-rmi-hid-i2c",
|
||||
},
|
||||
|
|
@ -997,8 +981,6 @@ EXPORT_SYMBOL(synaptics_rmi4_bus_init);
|
|||
void synaptics_rmi4_bus_exit(void)
|
||||
{
|
||||
i2c_del_driver(&synaptics_rmi4_i2c_driver);
|
||||
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL(synaptics_rmi4_bus_exit);
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -93,9 +93,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_on_state = value;
|
||||
}
|
||||
bdata->power_on_state = value;
|
||||
} else {
|
||||
bdata->power_gpio = -1;
|
||||
}
|
||||
|
|
@ -108,9 +107,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,power-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->power_delay_ms = value;
|
||||
}
|
||||
bdata->power_delay_ms = value;
|
||||
} else {
|
||||
bdata->power_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -125,18 +123,16 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-on-state property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_on_state = value;
|
||||
}
|
||||
bdata->reset_on_state = value;
|
||||
retval = of_property_read_u32(np, "synaptics,reset-active-ms",
|
||||
&value);
|
||||
if (retval < 0) {
|
||||
dev_err(dev, "%s: Unable to read synaptics,reset-active-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_active_ms = value;
|
||||
}
|
||||
bdata->reset_active_ms = value;
|
||||
} else {
|
||||
bdata->reset_gpio = -1;
|
||||
}
|
||||
|
|
@ -149,9 +145,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,reset-delay-ms property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->reset_delay_ms = value;
|
||||
}
|
||||
bdata->reset_delay_ms = value;
|
||||
} else {
|
||||
bdata->reset_delay_ms = 0;
|
||||
}
|
||||
|
|
@ -164,9 +159,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,byte-delay-us property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->byte_delay_us = value;
|
||||
}
|
||||
bdata->byte_delay_us = value;
|
||||
} else {
|
||||
bdata->byte_delay_us = 0;
|
||||
}
|
||||
|
|
@ -179,9 +173,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,block-delay-us property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->block_delay_us = value;
|
||||
}
|
||||
bdata->block_delay_us = value;
|
||||
} else {
|
||||
bdata->block_delay_us = 0;
|
||||
}
|
||||
|
|
@ -194,9 +187,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,address-delay-us property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->addr_delay_us = value;
|
||||
}
|
||||
bdata->addr_delay_us = value;
|
||||
} else {
|
||||
bdata->addr_delay_us = 0;
|
||||
}
|
||||
|
|
@ -209,9 +201,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,max-y-for-2d property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->max_y_for_2d = value;
|
||||
}
|
||||
bdata->max_y_for_2d = value;
|
||||
} else {
|
||||
bdata->max_y_for_2d = -1;
|
||||
}
|
||||
|
|
@ -233,9 +224,8 @@ static int parse_dt(struct device *dev, struct synaptics_dsx_board_data *bdata)
|
|||
dev_err(dev, "%s: Unable to read synaptics,ub-i2c-addr property\n",
|
||||
__func__);
|
||||
return retval;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
}
|
||||
bdata->ub_i2c_addr = (unsigned short)value;
|
||||
} else {
|
||||
bdata->ub_i2c_addr = -1;
|
||||
}
|
||||
|
|
@ -562,8 +552,6 @@ static struct platform_device *synaptics_dsx_spi_device;
|
|||
static void synaptics_rmi4_spi_dev_release(struct device *dev)
|
||||
{
|
||||
kfree(synaptics_dsx_spi_device);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int synaptics_rmi4_spi_probe(struct spi_device *spi)
|
||||
|
|
@ -667,7 +655,7 @@ static const struct spi_device_id synaptics_rmi4_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(spi, synaptics_rmi4_id_table);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
static const struct of_device_id synaptics_rmi4_of_match_table[] = {
|
||||
{
|
||||
.compatible = "synaptics,dsx-spi",
|
||||
},
|
||||
|
|
@ -689,7 +677,6 @@ static struct spi_driver synaptics_rmi4_spi_driver = {
|
|||
.id_table = synaptics_rmi4_id_table,
|
||||
};
|
||||
|
||||
|
||||
int synaptics_rmi4_bus_init(void)
|
||||
{
|
||||
return spi_register_driver(&synaptics_rmi4_spi_driver);
|
||||
|
|
@ -703,8 +690,6 @@ void synaptics_rmi4_bus_exit(void)
|
|||
kfree(xfer);
|
||||
|
||||
spi_unregister_driver(&synaptics_rmi4_spi_driver);
|
||||
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL(synaptics_rmi4_bus_exit);
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -214,47 +214,39 @@
|
|||
#define FULL_RAW_CAP_MIN_MAX_DATA_SIZE 4
|
||||
#define TRX_OPEN_SHORT_DATA_SIZE 7
|
||||
|
||||
#define concat(a, b) a##b
|
||||
|
||||
#define attrify(propname) (&dev_attr_##propname.attr)
|
||||
|
||||
#define show_prototype(propname)\
|
||||
static ssize_t concat(test_sysfs, _##propname##_show)(\
|
||||
static ssize_t propname##_show(\
|
||||
struct device *dev,\
|
||||
struct device_attribute *attr,\
|
||||
char *buf);\
|
||||
\
|
||||
static struct device_attribute dev_attr_##propname =\
|
||||
__ATTR(propname, 0444,\
|
||||
concat(test_sysfs, _##propname##_show),\
|
||||
synaptics_rmi4_store_error);
|
||||
__ATTR_RO(propname)
|
||||
|
||||
#define store_prototype(propname)\
|
||||
static ssize_t concat(test_sysfs, _##propname##_store)(\
|
||||
static ssize_t propname##_store(\
|
||||
struct device *dev,\
|
||||
struct device_attribute *attr,\
|
||||
const char *buf, size_t count);\
|
||||
\
|
||||
static struct device_attribute dev_attr_##propname =\
|
||||
__ATTR(propname, 0220,\
|
||||
synaptics_rmi4_show_error,\
|
||||
concat(test_sysfs, _##propname##_store));
|
||||
__ATTR_WO(propname)
|
||||
|
||||
#define show_store_prototype(propname)\
|
||||
static ssize_t concat(test_sysfs, _##propname##_show)(\
|
||||
static ssize_t propname##_show(\
|
||||
struct device *dev,\
|
||||
struct device_attribute *attr,\
|
||||
char *buf);\
|
||||
\
|
||||
static ssize_t concat(test_sysfs, _##propname##_store)(\
|
||||
static ssize_t propname##_store(\
|
||||
struct device *dev,\
|
||||
struct device_attribute *attr,\
|
||||
const char *buf, size_t count);\
|
||||
\
|
||||
static struct device_attribute dev_attr_##propname =\
|
||||
__ATTR(propname, 0664,\
|
||||
concat(test_sysfs, _##propname##_show),\
|
||||
concat(test_sysfs, _##propname##_store));
|
||||
__ATTR_RW(propname)
|
||||
|
||||
#define disable_cbc(ctrl_num)\
|
||||
do {\
|
||||
|
|
@ -1408,25 +1400,27 @@ struct synaptics_rmi4_f21_handle {
|
|||
unsigned short command_base_addr;
|
||||
};
|
||||
|
||||
show_prototype(num_of_mapped_tx)
|
||||
show_prototype(num_of_mapped_rx)
|
||||
show_prototype(tx_mapping)
|
||||
show_prototype(rx_mapping)
|
||||
show_prototype(num_of_mapped_force_tx)
|
||||
show_prototype(num_of_mapped_force_rx)
|
||||
show_prototype(force_tx_mapping)
|
||||
show_prototype(force_rx_mapping)
|
||||
show_prototype(report_size)
|
||||
show_prototype(status)
|
||||
store_prototype(do_preparation)
|
||||
store_prototype(force_cal)
|
||||
store_prototype(get_report)
|
||||
store_prototype(resume_touch)
|
||||
store_prototype(do_afe_calibration)
|
||||
show_store_prototype(report_type)
|
||||
show_store_prototype(fifoindex)
|
||||
show_store_prototype(no_auto_cal)
|
||||
show_store_prototype(read_report)
|
||||
show_prototype(num_of_mapped_tx);
|
||||
show_prototype(num_of_mapped_rx);
|
||||
show_prototype(tx_mapping);
|
||||
show_prototype(rx_mapping);
|
||||
show_prototype(num_of_mapped_force_tx);
|
||||
show_prototype(num_of_mapped_force_rx);
|
||||
show_prototype(force_tx_mapping);
|
||||
show_prototype(force_rx_mapping);
|
||||
show_prototype(report_size);
|
||||
show_prototype(status);
|
||||
|
||||
store_prototype(do_preparation);
|
||||
store_prototype(force_cal);
|
||||
store_prototype(get_report);
|
||||
store_prototype(resume_touch);
|
||||
store_prototype(do_afe_calibration);
|
||||
|
||||
show_store_prototype(report_type);
|
||||
show_store_prototype(fifoindex);
|
||||
show_store_prototype(no_auto_cal);
|
||||
show_store_prototype(read_report);
|
||||
|
||||
static struct attribute *attrs[] = {
|
||||
attrify(num_of_mapped_tx),
|
||||
|
|
@ -1505,7 +1499,6 @@ static bool test_report_type_valid(enum f54_report_types report_type)
|
|||
case F54_AMP_RAW_ADC:
|
||||
case F54_FULL_RAW_CAP_TDDI:
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
f54->report_type = INVALID_REPORT_TYPE;
|
||||
f54->report_size = 0;
|
||||
|
|
@ -1596,8 +1589,6 @@ static void test_set_report_size(void)
|
|||
default:
|
||||
f54->report_size = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int test_set_interrupt(bool set)
|
||||
|
|
@ -2017,8 +2008,6 @@ static void test_timeout_work(struct work_struct *work)
|
|||
|
||||
exit:
|
||||
mutex_unlock(&f54->status_mutex);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static enum hrtimer_restart test_get_report_timeout(struct hrtimer *timer)
|
||||
|
|
@ -2028,19 +2017,19 @@ static enum hrtimer_restart test_get_report_timeout(struct hrtimer *timer)
|
|||
return HRTIMER_NORESTART;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_num_of_mapped_tx_show(struct device *dev,
|
||||
static ssize_t num_of_mapped_tx_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->tx_assigned);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_num_of_mapped_rx_show(struct device *dev,
|
||||
static ssize_t num_of_mapped_rx_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->rx_assigned);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_tx_mapping_show(struct device *dev,
|
||||
static ssize_t tx_mapping_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int cnt;
|
||||
|
|
@ -2070,7 +2059,7 @@ static ssize_t test_sysfs_tx_mapping_show(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_rx_mapping_show(struct device *dev,
|
||||
static ssize_t rx_mapping_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int cnt;
|
||||
|
|
@ -2100,19 +2089,19 @@ static ssize_t test_sysfs_rx_mapping_show(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_num_of_mapped_force_tx_show(struct device *dev,
|
||||
static ssize_t num_of_mapped_force_tx_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f21->tx_assigned);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_num_of_mapped_force_rx_show(struct device *dev,
|
||||
static ssize_t num_of_mapped_force_rx_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f21->rx_assigned);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_force_tx_mapping_show(struct device *dev,
|
||||
static ssize_t force_tx_mapping_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int cnt;
|
||||
|
|
@ -2160,7 +2149,7 @@ static ssize_t test_sysfs_force_tx_mapping_show(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_force_rx_mapping_show(struct device *dev,
|
||||
static ssize_t force_rx_mapping_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int cnt;
|
||||
|
|
@ -2208,13 +2197,13 @@ static ssize_t test_sysfs_force_rx_mapping_show(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_report_size_show(struct device *dev,
|
||||
static ssize_t report_size_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->report_size);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_status_show(struct device *dev,
|
||||
static ssize_t status_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2228,7 +2217,7 @@ static ssize_t test_sysfs_status_show(struct device *dev,
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_do_preparation_store(struct device *dev,
|
||||
static ssize_t do_preparation_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2264,7 +2253,7 @@ exit:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_force_cal_store(struct device *dev,
|
||||
static ssize_t force_cal_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2300,7 +2289,7 @@ exit:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_get_report_store(struct device *dev,
|
||||
static ssize_t get_report_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2360,7 +2349,7 @@ exit:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_resume_touch_store(struct device *dev,
|
||||
static ssize_t resume_touch_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2448,7 +2437,7 @@ static ssize_t test_sysfs_resume_touch_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_do_afe_calibration_store(struct device *dev,
|
||||
static ssize_t do_afe_calibration_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2477,13 +2466,13 @@ static ssize_t test_sysfs_do_afe_calibration_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_report_type_show(struct device *dev,
|
||||
static ssize_t report_type_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->report_type);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_report_type_store(struct device *dev,
|
||||
static ssize_t report_type_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2530,7 +2519,7 @@ exit:
|
|||
return retval;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_fifoindex_show(struct device *dev,
|
||||
static ssize_t fifoindex_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2553,7 +2542,7 @@ static ssize_t test_sysfs_fifoindex_show(struct device *dev,
|
|||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->fifoindex);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_fifoindex_store(struct device *dev,
|
||||
static ssize_t fifoindex_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2583,13 +2572,13 @@ static ssize_t test_sysfs_fifoindex_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_no_auto_cal_show(struct device *dev,
|
||||
static ssize_t no_auto_cal_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", f54->no_auto_cal);
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_no_auto_cal_store(struct device *dev,
|
||||
static ssize_t no_auto_cal_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2636,7 +2625,7 @@ static ssize_t test_sysfs_no_auto_cal_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_read_report_show(struct device *dev,
|
||||
static ssize_t read_report_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
unsigned int ii;
|
||||
|
|
@ -2853,7 +2842,7 @@ static ssize_t test_sysfs_read_report_show(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t test_sysfs_read_report_store(struct device *dev,
|
||||
static ssize_t read_report_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int retval;
|
||||
|
|
@ -2862,15 +2851,15 @@ static ssize_t test_sysfs_read_report_store(struct device *dev,
|
|||
const char cmd[] = {'1', 0};
|
||||
struct synaptics_rmi4_data *rmi4_data = f54->rmi4_data;
|
||||
|
||||
retval = test_sysfs_report_type_store(dev, attr, buf, count);
|
||||
retval = report_type_store(dev, attr, buf, count);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
retval = test_sysfs_do_preparation_store(dev, attr, cmd, 1);
|
||||
retval = do_preparation_store(dev, attr, cmd, 1);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
retval = test_sysfs_get_report_store(dev, attr, cmd, 1);
|
||||
retval = get_report_store(dev, attr, cmd, 1);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
|
|
@ -2890,7 +2879,7 @@ static ssize_t test_sysfs_read_report_store(struct device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
retval = test_sysfs_resume_touch_store(dev, attr, cmd, 1);
|
||||
retval = resume_touch_store(dev, attr, cmd, 1);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
|
|
@ -3025,8 +3014,6 @@ exit:
|
|||
f54->report_size = 0;
|
||||
|
||||
f54->status = retval;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void test_remove_sysfs(void)
|
||||
|
|
@ -3034,8 +3021,6 @@ static void test_remove_sysfs(void)
|
|||
sysfs_remove_group(f54->sysfs_dir, &attr_group);
|
||||
sysfs_remove_bin_file(f54->sysfs_dir, &test_report_data);
|
||||
kobject_put(f54->sysfs_dir);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int test_set_sysfs(void)
|
||||
|
|
@ -3093,8 +3078,6 @@ static void test_free_control_mem(void)
|
|||
kfree(control.reg_110);
|
||||
kfree(control.reg_149);
|
||||
kfree(control.reg_188);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void test_set_data(void)
|
||||
|
|
@ -3212,14 +3195,12 @@ static void test_set_data(void)
|
|||
f54->data_31.address = reg_addr;
|
||||
reg_addr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int test_set_controls(void)
|
||||
{
|
||||
int retval;
|
||||
unsigned char length;
|
||||
unsigned char length = 0;
|
||||
unsigned char num_of_sensing_freqs;
|
||||
unsigned short reg_addr = f54->control_base_addr;
|
||||
struct f54_control *control = &f54->control;
|
||||
|
|
@ -4352,8 +4333,6 @@ static void test_f54_set_regs(struct synaptics_rmi4_data *rmi4_data,
|
|||
ii++) {
|
||||
f54->intr_mask |= 1 << ii;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int test_f55_set_controls(void)
|
||||
|
|
@ -4813,8 +4792,6 @@ static void test_f55_init(struct synaptics_rmi4_data *rmi4_data)
|
|||
f54->rx_assigned++;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void test_f55_set_regs(struct synaptics_rmi4_data *rmi4_data,
|
||||
|
|
@ -4833,8 +4810,6 @@ static void test_f55_set_regs(struct synaptics_rmi4_data *rmi4_data,
|
|||
f55->control_base_addr = fd->ctrl_base_addr | (page << 8);
|
||||
f55->data_base_addr = fd->data_base_addr | (page << 8);
|
||||
f55->command_base_addr = fd->cmd_base_addr | (page << 8);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void test_f21_init(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -4978,8 +4953,6 @@ exit:
|
|||
kfree(query_2);
|
||||
kfree(query_5);
|
||||
kfree(query_11);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void test_f21_set_regs(struct synaptics_rmi4_data *rmi4_data,
|
||||
|
|
@ -4998,8 +4971,6 @@ static void test_f21_set_regs(struct synaptics_rmi4_data *rmi4_data,
|
|||
f21->control_base_addr = fd->ctrl_base_addr | (page << 8);
|
||||
f21->data_base_addr = fd->data_base_addr | (page << 8);
|
||||
f21->command_base_addr = fd->cmd_base_addr | (page << 8);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int test_scan_pdt(void)
|
||||
|
|
@ -5224,8 +5195,6 @@ static void synaptics_rmi4_test_remove(struct synaptics_rmi4_data *rmi4_data)
|
|||
|
||||
exit:
|
||||
complete(&test_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_test_reset(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -5345,8 +5314,6 @@ static void __exit rmi4_test_module_exit(void)
|
|||
synaptics_rmi4_new_function(&test_module, false);
|
||||
|
||||
wait_for_completion(&test_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
module_init(rmi4_test_module_init);
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
*
|
||||
|
|
@ -43,10 +43,6 @@
|
|||
|
||||
#define SYSFS_FOLDER_NAME "video"
|
||||
|
||||
/*
|
||||
*#define RMI_DCS_SUSPEND_RESUME
|
||||
*/
|
||||
|
||||
static ssize_t video_sysfs_dcs_write_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count);
|
||||
|
||||
|
|
@ -315,16 +311,12 @@ static void synaptics_rmi4_video_remove(struct synaptics_rmi4_data *rmi4_data)
|
|||
|
||||
exit:
|
||||
complete(&video_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_video_reset(struct synaptics_rmi4_data *rmi4_data)
|
||||
{
|
||||
if (!video)
|
||||
synaptics_rmi4_video_init(rmi4_data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef RMI_DCS_SUSPEND_RESUME
|
||||
|
|
@ -347,8 +339,6 @@ static void synaptics_rmi4_video_suspend(struct synaptics_rmi4_data *rmi4_data)
|
|||
return;
|
||||
msleep(suspend_sequence[ii].wait_time);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void synaptics_rmi4_video_resume(struct synaptics_rmi4_data *rmi4_data)
|
||||
|
|
@ -370,8 +360,6 @@ static void synaptics_rmi4_video_resume(struct synaptics_rmi4_data *rmi4_data)
|
|||
return;
|
||||
msleep(resume_sequence[ii].wait_time);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -405,8 +393,6 @@ static void __exit rmi4_video_module_exit(void)
|
|||
synaptics_rmi4_new_function(&video_module, false);
|
||||
|
||||
wait_for_completion(&video_remove_complete);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
module_init(rmi4_video_module_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue