rk3188 tp: ct365

This commit is contained in:
zyk
2014-03-06 16:13:08 +08:00
parent b0478573cf
commit 154cd6f739
5 changed files with 2064 additions and 2 deletions

View File

@@ -196,6 +196,16 @@
max-x = <1280>;
max-y = <800>;
};
ts@01 {
compatible = "ct,ct36x";
reg = <0x01>;
ct-model = <363>;
touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_HIGH>;
max-x = <1280>;
max-y = <800>;
orientation=<1 0 0 1>;
};
};
&i2c3 {

File diff suppressed because it is too large Load Diff

4
drivers/input/touchscreen/ct36x/core.c Normal file → Executable file
View File

@@ -8,7 +8,11 @@
#define CT36X_CHIP_FLASH_SOURCE_SIZE 8
static unsigned char binary_data[] = {
#ifdef CONFIG_CT365_TS
#include "RK_DPT101_CT365_01_V02_099E_140107.dat"
#else
#include "wgj97112tsm01_CT363_01_V01_EA50_140224.dat"
#endif
};
int ct36x_chip_set_idle(struct ct36x_data *ts)

2
drivers/input/touchscreen/ct36x/ct363.c Normal file → Executable file
View File

@@ -204,7 +204,7 @@ static void ct363_report(struct ct36x_data *ts)
if( (ct363->x > ts->x_max) || (ct363->y > ts->y_max) || (ct363->x < 0) || (ct363->y < 0) ){
continue ;
}
ct363->x=2048-ct363->x;
input_mt_slot(ts->input, ct363->pts[i].id - 1);
input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, true);
input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, 1);

2
drivers/input/touchscreen/ct36x/ct36x_priv.h Normal file → Executable file
View File

@@ -77,7 +77,7 @@ struct ct36x_data{
void *priv;
};
int i2c_master_normal_send(const struct i2c_client *client, const char *buf, int count, int scl_rate)
static int i2c_master_normal_send(const struct i2c_client *client, const char *buf, int count, int scl_rate)
{
int ret;
struct i2c_adapter *adap=client->adapter;