diff options
author | Zhang Jiejing <jiejing.zhang@freescale.com> | 2011-04-11 16:02:43 +0800 |
---|---|---|
committer | Zhang Jiejing <jiejing.zhang@freescale.com> | 2011-04-11 17:50:44 +0800 |
commit | 40628357ca01b3bccb42d293885a6e915a530277 (patch) | |
tree | 73413e5e4e9817c0b655c35673b82f86152249d5 /drivers/input | |
parent | aef822284cd3639f07950880e318b6e0583e7886 (diff) |
ENGR00138130-2 input: max11801: add calibrat function for mx53_ard RevA board
Add calibration for MX53 ARD Rev A board.
Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/max11801_ts.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/max11801_ts.c b/drivers/input/touchscreen/max11801_ts.c index 556a8f56b1da..00ae21f26952 100644 --- a/drivers/input/touchscreen/max11801_ts.c +++ b/drivers/input/touchscreen/max11801_ts.c @@ -96,6 +96,13 @@ static int max11801_write_reg(struct i2c_client *client, int addr, int data) return i2c_smbus_write_byte_data(client, addr << 1, data); } +static void calibration_pointer(int *x_orig, int *y_orig) +{ + int y; + y = MAX11801_MAX_Y - *y_orig; + *y_orig = y; +} + static irqreturn_t max11801_ts_interrupt(int irq, void *dev_id) { struct max11801_data *data = dev_id; @@ -131,6 +138,7 @@ static irqreturn_t max11801_ts_interrupt(int irq, void *dev_id) case EVENT_INIT: /* go through */ case EVENT_MIDDLE: + calibration_pointer(&x, &y); input_report_abs(data->input_dev, ABS_X, x); input_report_abs(data->input_dev, ABS_Y, y); input_event(data->input_dev, EV_KEY, BTN_TOUCH, 1); |