fix(touchscreen) fixed the problem of gt9xx touch abnormality
Signed-off-by: lin <lin@kickpi.com>
.. | .. |
---|
19 | 19 | dtbo_type = <1>; |
---|
20 | 20 | }; |
---|
21 | 21 | }; |
---|
22 | | -&twi0 { |
---|
23 | | - ctp { |
---|
24 | | - ctp_screen_max_x = <1280>; |
---|
25 | | - ctp_screen_max_y = <800>; |
---|
26 | | - ctp_revert_x_flag = <0>; |
---|
27 | | - ctp_revert_y_flag = <1>; |
---|
28 | | - ctp_exchange_x_y_flag = <0>; |
---|
29 | | - }; |
---|
30 | | -}; |
---|
.. | .. |
---|
206 | 206 | reg = <0x5D>; |
---|
207 | 207 | ctp_screen_max_x = <1024>; |
---|
208 | 208 | ctp_screen_max_y = <600>; |
---|
209 | | - ctp_revert_x_flag = <0x1>; |
---|
210 | | - ctp_revert_y_flag = <0x1>; |
---|
| 209 | + ctp_revert_x_flag = <0x0>; |
---|
| 210 | + ctp_revert_y_flag = <0x0>; |
---|
211 | 211 | ctp_exchange_x_y_flag = <0x0>; |
---|
212 | 212 | ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>; |
---|
213 | 213 | ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>; |
---|
.. | .. |
---|
228 | 228 | reg = <0x5D>; |
---|
229 | 229 | ctp_screen_max_x = <800>; |
---|
230 | 230 | ctp_screen_max_y = <1280>; |
---|
231 | | - ctp_revert_x_flag = <0x1>; |
---|
232 | | - ctp_revert_y_flag = <0x1>; |
---|
| 231 | + ctp_revert_x_flag = <0x0>; |
---|
| 232 | + ctp_revert_y_flag = <0x0>; |
---|
233 | 233 | ctp_exchange_x_y_flag = <0x0>; |
---|
234 | 234 | ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>; |
---|
235 | 235 | ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>; |
---|
.. | .. |
---|
226 | 226 | ctp_twi_id = <0x0>; |
---|
227 | 227 | ctp_name = "gt9xx"; |
---|
228 | 228 | reg = <0x5D>; |
---|
229 | | - ctp_screen_max_x = <800>; |
---|
230 | | - ctp_screen_max_y = <1280>; |
---|
231 | | - ctp_revert_x_flag = <0x1>; |
---|
232 | | - ctp_revert_y_flag = <0x1>; |
---|
| 229 | + ctp_screen_max_x = <0x320>; |
---|
| 230 | + ctp_screen_max_y = <0x500>; |
---|
| 231 | + ctp_revert_x_flag = <0x0>; |
---|
| 232 | + ctp_revert_y_flag = <0x0>; |
---|
233 | 233 | ctp_exchange_x_y_flag = <0x0>; |
---|
234 | 234 | ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>; |
---|
235 | 235 | ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>; |
---|
.. | .. |
---|
1583 | 1583 | return ret; |
---|
1584 | 1584 | } |
---|
1585 | 1585 | #else |
---|
1586 | | - //ret = of_property_read_u32(np, "ctp_screen_max_x", &screen_max_x); |
---|
1587 | | - //of_property_read_u32(np, "ctp_screen_max_y", &screen_max_y); |
---|
1588 | | - //of_property_read_u32(np, "ctp_revert_x_flag", &revert_x_flag); |
---|
1589 | | - //of_property_read_u32(np, "ctp_revert_y_flag", &revert_y_flag); |
---|
1590 | | - //of_property_read_u32(np, "ctp_exchange_x_y_flag", &exchange_x_y_flag); |
---|
| 1586 | + ret = of_property_read_u32(np, "ctp_screen_max_x", &screen_max_x); |
---|
| 1587 | + of_property_read_u32(np, "ctp_screen_max_y", &screen_max_y); |
---|
| 1588 | + of_property_read_u32(np, "ctp_revert_x_flag", &revert_x_flag); |
---|
| 1589 | + of_property_read_u32(np, "ctp_revert_y_flag", &revert_y_flag); |
---|
| 1590 | + of_property_read_u32(np, "ctp_exchange_x_y_flag", &exchange_x_y_flag); |
---|
1591 | 1591 | #endif |
---|
1592 | 1592 | sunxi_gpio_to_name(CTP_IRQ_NUMBER,irq_pin_name); |
---|
1593 | 1593 | pr_err("gt %s, line:%d irq_pin_name = %s \n",__FUNCTION__, __LINE__, irq_pin_name); |
---|