Loading drivers/input/touchscreen/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -995,6 +995,16 @@ config TOUCHSCREEN_FT5X06_GESTURE If unsure, say N. config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS bool "Synaptics DSX firmware update extra sysfs attributes" depends on TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE help Say Y here to enable support for extra sysfs attributes supporting firmware update in a development environment. This does not affect the core or other subsystem attributes. If unsure, say N. config SECURE_TOUCH bool "Secure Touch" depends on (TOUCHSCREEN_SYNAPTICS_I2C_RMI4 || \ Loading drivers/input/touchscreen/synaptics_fw_update.c +16 −0 Original line number Diff line number Diff line Loading @@ -1305,6 +1305,7 @@ write_config: return retval; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static int fwu_start_write_config(void) { int retval; Loading Loading @@ -1357,6 +1358,7 @@ static int fwu_start_write_config(void) return retval; } #endif static int fwu_do_write_lockdown(bool reset) { Loading Loading @@ -1404,6 +1406,7 @@ exit: return retval; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static int fwu_start_write_lockdown(void) { if (parse_header()) Loading Loading @@ -1505,6 +1508,7 @@ static int fwu_do_read_config(void) exit: return retval; } #endif static int fwu_do_reflash(void) { Loading Loading @@ -1730,6 +1734,7 @@ int synaptics_fw_updater(void) } EXPORT_SYMBOL(synaptics_fw_updater); #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static ssize_t fwu_sysfs_show_image(struct file *data_file, struct kobject *kobj, struct bin_attribute *attributes, char *buf, loff_t pos, size_t count) Loading Loading @@ -2154,6 +2159,7 @@ static ssize_t fwu_sysfs_package_id_show(struct device *dev, (pkg_id[1] << 8) | pkg_id[0], (pkg_id[3] << 8) | pkg_id[2]); } #endif static int synaptics_rmi4_debug_dump_info(struct seq_file *m, void *v) { Loading Loading @@ -2187,6 +2193,7 @@ static void synaptics_rmi4_fwu_attn(struct synaptics_rmi4_data *rmi4_data, return; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static struct bin_attribute dev_attr_data = { .attr = { .name = "data", Loading @@ -2196,8 +2203,10 @@ static struct bin_attribute dev_attr_data = { .read = fwu_sysfs_show_image, .write = fwu_sysfs_store_image, }; #endif static struct device_attribute attrs[] = { #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS __ATTR(fw_name, S_IRUGO | S_IWUSR | S_IWGRP, fwu_sysfs_image_name_show, fwu_sysfs_image_name_store), Loading Loading @@ -2246,6 +2255,7 @@ static struct device_attribute attrs[] = { __ATTR(package_id, S_IRUGO, fwu_sysfs_package_id_show, synaptics_rmi4_store_error), #endif }; Loading Loading @@ -2325,6 +2335,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data) fwu->initialized = true; fwu->polling_mode = false; #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS retval = sysfs_create_bin_file(&rmi4_data->i2c_client->dev.kobj, &dev_attr_data); if (retval < 0) { Loading @@ -2333,6 +2344,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data) __func__); goto exit_free_mem; } #endif for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++) { retval = sysfs_create_file(&rmi4_data->i2c_client->dev.kobj, Loading Loading @@ -2380,7 +2392,9 @@ exit_remove_attrs: &attrs[attr_count].attr); } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS sysfs_remove_bin_file(&rmi4_data->input_dev->dev.kobj, &dev_attr_data); #endif exit_free_mem: kfree(fwu->fn_ptr); Loading @@ -2397,7 +2411,9 @@ static void synaptics_rmi4_fwu_remove(struct synaptics_rmi4_data *rmi4_data) { unsigned char attr_count; #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS sysfs_remove_bin_file(&rmi4_data->input_dev->dev.kobj, &dev_attr_data); #endif for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++) { sysfs_remove_file(&rmi4_data->input_dev->dev.kobj, Loading Loading
drivers/input/touchscreen/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -995,6 +995,16 @@ config TOUCHSCREEN_FT5X06_GESTURE If unsure, say N. config TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS bool "Synaptics DSX firmware update extra sysfs attributes" depends on TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE help Say Y here to enable support for extra sysfs attributes supporting firmware update in a development environment. This does not affect the core or other subsystem attributes. If unsure, say N. config SECURE_TOUCH bool "Secure Touch" depends on (TOUCHSCREEN_SYNAPTICS_I2C_RMI4 || \ Loading
drivers/input/touchscreen/synaptics_fw_update.c +16 −0 Original line number Diff line number Diff line Loading @@ -1305,6 +1305,7 @@ write_config: return retval; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static int fwu_start_write_config(void) { int retval; Loading Loading @@ -1357,6 +1358,7 @@ static int fwu_start_write_config(void) return retval; } #endif static int fwu_do_write_lockdown(bool reset) { Loading Loading @@ -1404,6 +1406,7 @@ exit: return retval; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static int fwu_start_write_lockdown(void) { if (parse_header()) Loading Loading @@ -1505,6 +1508,7 @@ static int fwu_do_read_config(void) exit: return retval; } #endif static int fwu_do_reflash(void) { Loading Loading @@ -1730,6 +1734,7 @@ int synaptics_fw_updater(void) } EXPORT_SYMBOL(synaptics_fw_updater); #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static ssize_t fwu_sysfs_show_image(struct file *data_file, struct kobject *kobj, struct bin_attribute *attributes, char *buf, loff_t pos, size_t count) Loading Loading @@ -2154,6 +2159,7 @@ static ssize_t fwu_sysfs_package_id_show(struct device *dev, (pkg_id[1] << 8) | pkg_id[0], (pkg_id[3] << 8) | pkg_id[2]); } #endif static int synaptics_rmi4_debug_dump_info(struct seq_file *m, void *v) { Loading Loading @@ -2187,6 +2193,7 @@ static void synaptics_rmi4_fwu_attn(struct synaptics_rmi4_data *rmi4_data, return; } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS static struct bin_attribute dev_attr_data = { .attr = { .name = "data", Loading @@ -2196,8 +2203,10 @@ static struct bin_attribute dev_attr_data = { .read = fwu_sysfs_show_image, .write = fwu_sysfs_store_image, }; #endif static struct device_attribute attrs[] = { #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS __ATTR(fw_name, S_IRUGO | S_IWUSR | S_IWGRP, fwu_sysfs_image_name_show, fwu_sysfs_image_name_store), Loading Loading @@ -2246,6 +2255,7 @@ static struct device_attribute attrs[] = { __ATTR(package_id, S_IRUGO, fwu_sysfs_package_id_show, synaptics_rmi4_store_error), #endif }; Loading Loading @@ -2325,6 +2335,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data) fwu->initialized = true; fwu->polling_mode = false; #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS retval = sysfs_create_bin_file(&rmi4_data->i2c_client->dev.kobj, &dev_attr_data); if (retval < 0) { Loading @@ -2333,6 +2344,7 @@ static int synaptics_rmi4_fwu_init(struct synaptics_rmi4_data *rmi4_data) __func__); goto exit_free_mem; } #endif for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++) { retval = sysfs_create_file(&rmi4_data->i2c_client->dev.kobj, Loading Loading @@ -2380,7 +2392,9 @@ exit_remove_attrs: &attrs[attr_count].attr); } #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS sysfs_remove_bin_file(&rmi4_data->input_dev->dev.kobj, &dev_attr_data); #endif exit_free_mem: kfree(fwu->fn_ptr); Loading @@ -2397,7 +2411,9 @@ static void synaptics_rmi4_fwu_remove(struct synaptics_rmi4_data *rmi4_data) { unsigned char attr_count; #ifdef CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_EXTRA_SYSFS sysfs_remove_bin_file(&rmi4_data->input_dev->dev.kobj, &dev_attr_data); #endif for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++) { sysfs_remove_file(&rmi4_data->input_dev->dev.kobj, Loading