stmpe-ts.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) stmpe-ts.c (564a68de8e82b84697007e034a1b7d691effb60a)
1/*
2 * STMicroelectronics STMPE811 Touchscreen Driver
3 *
4 * (C) 2010 Luotao Fu <l.fu@pengutronix.de>
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 49 unchanged lines hidden (view full) ---

58#define SETTLING(x) (x & 0x7)
59#define FRACTION_Z(x) (x & 0x7)
60#define I_DRIVE(x) (x & 0x1)
61#define OP_MODE(x) ((x & 0x7) << 1)
62
63#define STMPE_TS_NAME "stmpe-ts"
64#define XY_MASK 0xfff
65
1/*
2 * STMicroelectronics STMPE811 Touchscreen Driver
3 *
4 * (C) 2010 Luotao Fu <l.fu@pengutronix.de>
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 49 unchanged lines hidden (view full) ---

58#define SETTLING(x) (x & 0x7)
59#define FRACTION_Z(x) (x & 0x7)
60#define I_DRIVE(x) (x & 0x1)
61#define OP_MODE(x) ((x & 0x7) << 1)
62
63#define STMPE_TS_NAME "stmpe-ts"
64#define XY_MASK 0xfff
65
66/**
67 * struct stmpe_touch - stmpe811 touch screen controller state
68 * @stmpe: pointer back to STMPE MFD container
69 * @idev: registered input device
70 * @work: a work item used to scan the device
71 * @dev: a pointer back to the MFD cell struct device*
72 * @sample_time: ADC converstion time in number of clock.
73 * (0 -> 36 clocks, 1 -> 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks,
74 * 4 -> 80 clocks, 5 -> 96 clocks, 6 -> 144 clocks),
75 * recommended is 4.
76 * @mod_12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
77 * @ref_sel: ADC reference source
78 * (0 -> internal reference, 1 -> external reference)
79 * @adc_freq: ADC Clock speed
80 * (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 -> 6.5 MHz)
81 * @ave_ctrl: Sample average control
82 * (0 -> 1 sample, 1 -> 2 samples, 2 -> 4 samples, 3 -> 8 samples)
83 * @touch_det_delay: Touch detect interrupt delay
84 * (0 -> 10 us, 1 -> 50 us, 2 -> 100 us, 3 -> 500 us,
85 * 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms)
86 * recommended is 3
87 * @settling: Panel driver settling time
88 * (0 -> 10 us, 1 -> 100 us, 2 -> 500 us, 3 -> 1 ms,
89 * 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms)
90 * recommended is 2
91 * @fraction_z: Length of the fractional part in z
92 * (fraction_z ([0..7]) = Count of the fractional part)
93 * recommended is 7
94 * @i_drive: current limit value of the touchscreen drivers
95 * (0 -> 20 mA typical 35 mA max, 1 -> 50 mA typical 80 mA max)
96 */
66struct stmpe_touch {
67 struct stmpe *stmpe;
68 struct input_dev *idev;
69 struct delayed_work work;
70 struct device *dev;
71 u8 sample_time;
72 u8 mod_12b;
73 u8 ref_sel;

--- 312 unchanged lines hidden ---
97struct stmpe_touch {
98 struct stmpe *stmpe;
99 struct input_dev *idev;
100 struct delayed_work work;
101 struct device *dev;
102 u8 sample_time;
103 u8 mod_12b;
104 u8 ref_sel;

--- 312 unchanged lines hidden ---