diff options
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/ad7879.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c index e2482b40da51..e60709261951 100644 --- a/drivers/input/touchscreen/ad7879.c +++ b/drivers/input/touchscreen/ad7879.c | |||
@@ -118,6 +118,7 @@ struct ad7879 { | |||
118 | unsigned int irq; | 118 | unsigned int irq; |
119 | bool disabled; /* P: input->mutex */ | 119 | bool disabled; /* P: input->mutex */ |
120 | bool suspended; /* P: input->mutex */ | 120 | bool suspended; /* P: input->mutex */ |
121 | bool swap_xy; | ||
121 | u16 conversion_data[AD7879_NR_SENSE]; | 122 | u16 conversion_data[AD7879_NR_SENSE]; |
122 | char phys[32]; | 123 | char phys[32]; |
123 | u8 first_conversion_delay; | 124 | u8 first_conversion_delay; |
@@ -161,6 +162,9 @@ static int ad7879_report(struct ad7879 *ts) | |||
161 | z1 = ts->conversion_data[AD7879_SEQ_Z1] & MAX_12BIT; | 162 | z1 = ts->conversion_data[AD7879_SEQ_Z1] & MAX_12BIT; |
162 | z2 = ts->conversion_data[AD7879_SEQ_Z2] & MAX_12BIT; | 163 | z2 = ts->conversion_data[AD7879_SEQ_Z2] & MAX_12BIT; |
163 | 164 | ||
165 | if (ts->swap_xy) | ||
166 | swap(x, y); | ||
167 | |||
164 | /* | 168 | /* |
165 | * The samples processed here are already preprocessed by the AD7879. | 169 | * The samples processed here are already preprocessed by the AD7879. |
166 | * The preprocessing function consists of a median and an averaging | 170 | * The preprocessing function consists of a median and an averaging |
@@ -520,6 +524,7 @@ struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq, | |||
520 | ts->dev = dev; | 524 | ts->dev = dev; |
521 | ts->input = input_dev; | 525 | ts->input = input_dev; |
522 | ts->irq = irq; | 526 | ts->irq = irq; |
527 | ts->swap_xy = pdata->swap_xy; | ||
523 | 528 | ||
524 | setup_timer(&ts->timer, ad7879_timer, (unsigned long) ts); | 529 | setup_timer(&ts->timer, ad7879_timer, (unsigned long) ts); |
525 | 530 | ||