mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
tp: enble tp in w400 dts [2/2]
PD#SWPL-15292 Problem: W400 is not touch panel Solution: add touch panel in w400 Verify: verify by w400 Change-Id: Ibb4323458a2e84ba9fa84177fe6c747611277c55 Signed-off-by: GongWei Chen <gongwei.chen@amlogic.com>
This commit is contained in:
@@ -901,12 +901,13 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
x_max = <720>;
|
||||
y_max = <1280>;
|
||||
x_max = <1280>;
|
||||
y_max = <720>;
|
||||
rotation = <1>;
|
||||
max-touch-number = <10>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -902,12 +902,13 @@
|
||||
|
||||
touchscreen@38 {
|
||||
compatible = "focaltech,fts";
|
||||
status = "disabled";
|
||||
status = "okay";
|
||||
reg = <0x38>;
|
||||
reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
|
||||
irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
|
||||
x_max = <720>;
|
||||
y_max = <1280>;
|
||||
x_max = <1280>;
|
||||
y_max = <720>;
|
||||
rotation = <1>;
|
||||
max-touch-number = <10>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -492,8 +492,19 @@ static int fts_input_dev_report_b(struct ts_event *event, struct fts_ts_data *da
|
||||
}
|
||||
input_report_abs(data->input_dev, ABS_MT_TOUCH_MAJOR, event->area[i]);
|
||||
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_X, event->au16_x[i]);
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_Y, event->au16_y[i]);
|
||||
if (data->pdata->rotation) {
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_X,
|
||||
data->pdata->x_max - event->au16_y[i]);
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_Y,
|
||||
event->au16_x[i]);
|
||||
|
||||
} else {
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_X,
|
||||
event->au16_x[i]);
|
||||
input_report_abs(data->input_dev, ABS_MT_POSITION_Y,
|
||||
event->au16_y[i]);
|
||||
}
|
||||
|
||||
touchs |= BIT(event->au8_finger_id[i]);
|
||||
data->touchs |= BIT(event->au8_finger_id[i]);
|
||||
|
||||
@@ -994,10 +1005,15 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata)
|
||||
rc = of_property_read_u32(np, "y_max", &temp_val);
|
||||
if (!rc)
|
||||
{
|
||||
pdata->x_max = temp_val;
|
||||
FTS_DEBUG("y_max=%d", pdata->x_max);
|
||||
pdata->y_max = temp_val;
|
||||
FTS_DEBUG("y_max=%d", pdata->y_max);
|
||||
}
|
||||
|
||||
rc = of_property_read_u32(np, "rotation", &temp_val);
|
||||
if (!rc) {
|
||||
pdata->rotation = temp_val;
|
||||
FTS_DEBUG("rotation = %d", pdata->rotation);
|
||||
}
|
||||
|
||||
FTS_FUNC_EXIT();
|
||||
return 0;
|
||||
|
||||
@@ -109,20 +109,21 @@
|
||||
|
||||
struct fts_ts_platform_data
|
||||
{
|
||||
s32 irq_gpio;
|
||||
u32 irq_gpio_flags;
|
||||
s32 reset_gpio;
|
||||
u32 reset_gpio_flags;
|
||||
bool have_key;
|
||||
u32 key_number;
|
||||
u32 keys[4];
|
||||
u32 key_y_coord;
|
||||
u32 key_x_coords[4];
|
||||
u32 x_max;
|
||||
u32 y_max;
|
||||
u32 x_min;
|
||||
u32 y_min;
|
||||
u32 max_touch_number;
|
||||
s32 irq_gpio;
|
||||
u32 irq_gpio_flags;
|
||||
s32 reset_gpio;
|
||||
u32 reset_gpio_flags;
|
||||
bool have_key;
|
||||
u32 key_number;
|
||||
u32 keys[4];
|
||||
u32 key_y_coord;
|
||||
u32 key_x_coords[4];
|
||||
u32 x_max;
|
||||
u32 y_max;
|
||||
u32 x_min;
|
||||
u32 y_min;
|
||||
u32 max_touch_number;
|
||||
u32 rotation;
|
||||
};
|
||||
|
||||
struct ts_event
|
||||
|
||||
Reference in New Issue
Block a user