Skip to content
Browse files

Add single touch support for LCD8000-97C using on ubuntu & emmc fix t…

…o mmcblk0.
  • Loading branch information...
1 parent ee85aaa commit 4006c19c6beda96a0bd5855a1ab27a7b2e380cb5 luofuchong committed Oct 24, 2013
View
1 arch/arm/configs/imx6_defconfig
@@ -1096,6 +1096,7 @@ CONFIG_TOUCHSCREEN_GENERIC_TS_CHIP_CT365=y
CONFIG_TOUCHSCREEN_GENERIC_TS_MISC=y
CONFIG_TOUCHSCREEN_GENERIC_TS_MISC_AUTO_FW_UPDATE=y
# CONFIG_TOUCHSCREEN_GENERIC_TS_MISC_AUTO_CHIP_SELECT is not set
+CONFIG_TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH=y
# CONFIG_TOUCHSCREEN_GENERIC_TS_ENHANCE is not set
# CONFIG_TOUCHSCREEN_GENERIC_TS_DEBUG is not set
CONFIG_INPUT_MISC=y
View
1 arch/arm/configs/imx6_updater_defconfig
@@ -1005,6 +1005,7 @@ CONFIG_TOUCHSCREEN_GENERIC_TS_CHIP_CT360=y
CONFIG_TOUCHSCREEN_GENERIC_TS_MISC=y
# CONFIG_TOUCHSCREEN_GENERIC_TS_MISC_AUTO_FW_UPDATE is not set
# CONFIG_TOUCHSCREEN_GENERIC_TS_MISC_AUTO_CHIP_SELECT is not set
+# CONFIG_TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH is not set
# CONFIG_TOUCHSCREEN_GENERIC_TS_ENHANCE is not set
# CONFIG_TOUCHSCREEN_GENERIC_TS_DEBUG is not set
CONFIG_INPUT_MISC=y
View
11 arch/arm/mach-mx6/board-mx6q_marsboard.c
@@ -548,9 +548,9 @@ static struct mtd_partition imx6_marsboard_spi_nor_partitions[] = {
.size = 0x00040000,
},
{
- .name = "kernel",
- .offset = MTDPART_OFS_APPEND,
- .size = MTDPART_SIZ_FULL,
+ .name = "params",
+ .offset = 0x000c0000,
+ .size = 0x2000,
},
};
@@ -1270,8 +1270,11 @@ static void __init mx6_marsboard_board_init(void)
imx6q_add_anatop_thermal_imx(1, &mx6q_marsboard_anatop_thermal_data);
imx6_init_fec(fec_data);
imx6q_add_pm_imx(0, &mx6q_marsboard_pm_data);
- imx6q_add_sdhci_usdhc_imx(1, &mx6q_marsboard_sd2_data);
+ /* Move sd3 to first because sd3 connect to emmc.
+ Mfgtools want emmc is mmcblk0 and other sd card is mmcblk1.
+ */
imx6q_add_sdhci_usdhc_imx(2, &mx6q_marsboard_sd3_data);
+ imx6q_add_sdhci_usdhc_imx(1, &mx6q_marsboard_sd2_data);
imx_add_viv_gpu(&imx6_gpu_data, &imx6q_gpu_pdata);
imx6q_marsboard_init_usb();
imx6q_add_ahci(0, &mx6q_marsboard_sata_data);
View
8 drivers/input/touchscreen/generic_ts_rel/Kconfig
@@ -65,6 +65,14 @@ config TOUCHSCREEN_GENERIC_TS_MISC
default n
depends on TOUCHSCREEN_GENERIC_TS_MISC
+config TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH
+ bool "generic touchscreen as single-touch"
+ default N
+ depends on TOUCHSCREEN_GENERIC_TS
+ help
+ If you say yes here you get single-touch touchscreen support.
+ If you say "no", you'll get the normal multi-touch.
+
config TOUCHSCREEN_GENERIC_TS_ENHANCE
bool "Device driver enhancement support"
default n
View
23 drivers/input/touchscreen/generic_ts_rel/touch.c
@@ -101,6 +101,12 @@ void touch_report_pts(struct struct_touch_var *touch)
PRINT_TOUCH_MSG("X: %d\n", touch->pts[iter].x);
PRINT_TOUCH_MSG("Y: %d\n", touch->pts[iter].y);
+#ifdef CONFIG_TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH
+ input_report_abs(touch->input, ABS_X, touch->pts[iter].x);
+ input_report_abs(touch->input, ABS_Y, touch->pts[iter].y);
+ input_event(touch->input, EV_KEY, BTN_TOUCH, 1);
+ input_report_abs(touch->input, ABS_PRESSURE, 1);
+#else
#if 1 // android 4.x
input_mt_slot(touch->input, touch->pts[iter].id);
input_mt_report_slot_state(touch->input, MT_TOOL_FINGER, true);
@@ -117,7 +123,7 @@ void touch_report_pts(struct struct_touch_var *touch)
input_mt_sync(ts->input);
#endif
-
+#endif
touch->sync = 1;
touch->press |= (0x01 << touch->pts[iter].id);
}
@@ -127,6 +133,10 @@ void touch_report_pts(struct struct_touch_var *touch)
touch->release &= touch->release ^ touch->press;
for ( iter = 0; iter < touch->valid_max_pts_num; iter++ ) {
if ( touch->release & (0x01<<iter) ) {
+#ifdef CONFIG_TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH
+ input_event(touch->input, EV_KEY, BTN_TOUCH, 0);
+ input_report_abs(touch->input, ABS_PRESSURE, 0);
+#else
#if 1 // android 4.x
input_mt_slot(touch->input, iter);
input_mt_report_slot_state(touch->input, MT_TOOL_FINGER, false);
@@ -139,6 +149,7 @@ void touch_report_pts(struct struct_touch_var *touch)
input_mt_sync(core_data->input);
#endif
+#endif
touch->sync = 1;
}
}
@@ -184,7 +195,13 @@ struct struct_touch_var* touch_var_init(struct struct_touch_param *param)
//__set_bit(EV_SYN, touch->input->evbit);
__set_bit(EV_KEY, touch->input->evbit);
__set_bit(EV_ABS, touch->input->evbit);
-
+
+#ifdef CONFIG_TOUCHSCREEN_GENERIC_TS_SINGLE_TOUCH
+ __set_bit(BTN_TOUCH, touch->input->keybit);
+ input_set_abs_params(touch->input, ABS_X, 0, 1024, 0, 0);
+ input_set_abs_params(touch->input, ABS_Y, 0, 768, 0, 0);
+ input_set_abs_params(touch->input, ABS_PRESSURE, 0, 1, 0, 0);
+#else
// For android 4.x only
__set_bit(INPUT_PROP_DIRECT, touch->input->propbit);
@@ -194,7 +211,7 @@ struct struct_touch_var* touch_var_init(struct struct_touch_param *param)
input_set_abs_params(touch->input, ABS_MT_POSITION_Y, 0, param->y_max, 0, 0);
input_set_abs_params(touch->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
input_set_abs_params(touch->input, ABS_MT_WIDTH_MAJOR, 0, 255, 0, 0);
-
+#endif
touch->input->name = DRIVER_NAME;
touch->input->id.bustype = BUS_I2C;

0 comments on commit 4006c19

Please sign in to comment.
Something went wrong with that request. Please try again.