mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
touchscreen: [W400][BDS]change to GT911 touch panel [1/1]
PD#SWPL-32704
Problem:
Unable to touch operation on panel
Solution:
change to GT911 touch panel
Verify:
W400
Signed-off-by: chunlong.cao <chunlong.cao@amlogic.com>
Change-Id: Id49d5c93e7576f59926006d5cb993880c2badc8c
This commit is contained in:
@@ -885,10 +885,11 @@
|
||||
|
||||
touchscreen@5d {
|
||||
compatible = "goodix,gt9xx";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x5d>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
rotation = <2>;
|
||||
goodix,cfg-group0 = [
|
||||
41 00 04 58 02 05 0C 00 02 54 07
|
||||
0F 50 2D 03 05 00 00 00 00 40 00
|
||||
@@ -911,7 +912,7 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -859,10 +859,11 @@
|
||||
|
||||
touchscreen@5d {
|
||||
compatible = "goodix,gt9xx";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x5d>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
rotation = <2>;
|
||||
goodix,cfg-group0 = [
|
||||
41 00 04 58 02 05 0C 00 02 54 07
|
||||
0F 50 2D 03 05 00 00 00 00 40 00
|
||||
@@ -885,7 +886,7 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -887,10 +887,11 @@
|
||||
|
||||
touchscreen@5d {
|
||||
compatible = "goodix,gt9xx";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x5d>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
rotation = <2>;
|
||||
goodix,cfg-group0 = [
|
||||
41 00 04 58 02 05 0C 00 02 54 07
|
||||
0F 50 2D 03 05 00 00 00 00 40 00
|
||||
@@ -913,7 +914,7 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -861,10 +861,11 @@
|
||||
|
||||
touchscreen@5d {
|
||||
compatible = "goodix,gt9xx";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x5d>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
rotation = <2>;
|
||||
goodix,cfg-group0 = [
|
||||
41 00 04 58 02 05 0C 00 02 54 07
|
||||
0F 50 2D 03 05 00 00 00 00 40 00
|
||||
@@ -887,7 +888,7 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
@@ -31,6 +31,7 @@ static struct workqueue_struct *goodix_wq;
|
||||
struct i2c_client * i2c_connect_client = NULL;
|
||||
int gtp_rst_gpio;
|
||||
int gtp_int_gpio;
|
||||
static u32 rotation;
|
||||
u8 config[GTP_CONFIG_MAX_LENGTH + GTP_ADDR_LENGTH]
|
||||
= {GTP_REG_CONFIG_DATA >> 8, GTP_REG_CONFIG_DATA & 0xff};
|
||||
|
||||
@@ -391,8 +392,14 @@ static void gtp_touch_down(struct goodix_ts_data* ts,s32 id,s32 x,s32 y,s32 w)
|
||||
input_mt_report_slot_state(ts->input_dev,MT_TOOL_FINGER,true);
|
||||
}
|
||||
input_report_abs(ts->input_dev, ABS_MT_PRESSURE, w);
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);
|
||||
|
||||
if (2 == rotation) {
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, ts->abs_x_max-x);
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, ts->abs_y_max-y);
|
||||
}else{
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, x);
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, y);
|
||||
}
|
||||
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, w);
|
||||
input_report_abs(ts->input_dev, ABS_MT_WIDTH_MAJOR, w);
|
||||
#else
|
||||
@@ -2311,10 +2318,19 @@ void gtp_get_chip_type(struct goodix_ts_data *ts)
|
||||
static void gtp_parse_dt(struct device *dev)
|
||||
{
|
||||
struct device_node *np = dev->of_node;
|
||||
|
||||
u32 temp_val;
|
||||
int ret = 0;
|
||||
|
||||
gtp_int_gpio = of_get_named_gpio(np, "irq-gpio", 0);
|
||||
gtp_rst_gpio = of_get_named_gpio(np, "reset-gpio", 0);
|
||||
|
||||
ret = of_property_read_u32(np, "rotation", &temp_val);
|
||||
if (!ret) {
|
||||
rotation = temp_val;
|
||||
} else {
|
||||
rotation = 0;
|
||||
GTP_ERROR("cannot get rotation value of touchscreen");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user