android_kernel_oneplus_msm8998/include/linux/mfd
Sebastian Andrzej Siewior 8c896308fe input: ti_am335x_adc: use only FIFO0 and clean up a little
The driver programs a threshold of "coordinate_readouts" say 5. The
REG_FIFO0THR registers says it should it be programmed to "threshold
minus one". The driver does not expect just 5 coordinates but 5 * 2 + 2.
Multiplied by two because 5 for X and 5 for Y and plus 2 because we have
two Z.
The whole thing kind of works because It reads the 5 coordinates for X
and Y from FIFO0 and FIFO1 and the last element in each FIFO is ignored
within the loop and read later.
Nothing guaranties that FIFO1 is ready by the time it is read. In fact I
could see that that FIFO1 reaturns for Y channels 8,9, 10, 12, 6 and for
Y channel 7 for Z. The problem is that channel 7 and channel 12 got
somehow mixed up.
The other Problem is that FIFO1 is also used by the IIO part leading to
wrong results if both (tsc & adc) are used.

The patch tries to clean up the whole thing a little:
- Remove the +1 and -1 in REG_STEPCONFIG, REG_STEPDELAY and its counter
  part in the for loop. This is just confusing.

- Use only FIFO0 in TSC. The fifo has space for 64 entries so should be
  fine.

- Read the whole FIFO in one function and check the channel.

- in case we dawdle around, make sure we only read a multiple of our
  coordinate set. On the second interrupt we will cleanup the remaining
  enties.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12 18:50:22 +02:00
..
abx500 mfd: ab8500-sysctrl: Always enable pm_power_off handler 2013-05-17 00:42:33 +02:00
arizona For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
da9052
da9055
pcf50633
pm8xxx
samsung
syscon
wm831x mfd: wm831x: Don't forward declare enum wm831x_auxadc 2013-03-12 09:29:20 +01:00
wm8350
wm8994 ASoC: wm8994: Support constraining the maximum number of channels clocked 2013-03-21 17:27:32 +01:00
88pm80x.h mfd: 88pm80x: Remove redundant devm_* calls 2013-02-14 00:22:54 +01:00
88pm860x.h
aat2870.h
ab3100.h
abx500.h ab8500_{bmdata,fg}: Add const attributes to some data arrays 2013-04-16 17:34:36 -07:00
adp5520.h
as3711.h
asic3.h
core.h
cros_ec.h mfd: Add ChromeOS EC implementation 2013-04-05 11:20:13 +02:00
cros_ec_commands.h mfd: Add ChromeOS EC messages header 2013-04-05 11:20:13 +02:00
da903x.h
davinci_voicecodec.h
db8500-prcmu.h ARM: ux500: move PM-related PRCMU functions to machine 2013-04-08 13:57:53 +02:00
dbx500-prcmu.h ARM: ux500: split out prcmu initialization 2013-04-08 13:58:15 +02:00
ds1wm.h
ezx-pcap.h
htc-egpio.h
htc-pasic3.h
intel_msic.h
janz.h
lm3533.h
lp8788-isink.h
lp8788.h backlight: add new lp8788 backlight driver 2013-02-27 19:10:09 -08:00
lpc_ich.h
max8907.h
max8925.h mfd: max8925: Add irqdomain for dt 2013-02-14 00:23:00 +01:00
max8997-private.h extcon: max8997: Consolidate duplicate code for checking ADC/CHG cable type 2013-02-14 07:54:22 +09:00
max8997.h extcon: max8997: Use workqueue to check cable state after completing boot of platform 2013-02-14 07:54:49 +09:00
max8998-private.h
max8998.h
max77686-private.h
max77686.h
max77693-private.h extcon: max77693: Initialize register of MUIC device to bring up it without platform data 2013-03-13 17:38:57 +09:00
max77693.h
mc13xxx.h
mc13783.h
mc13892.h
mcp.h
menelaus.h
palmas.h For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
rc5t583.h
rdc321x.h
retu.h mfd: retu: Add Tahvo support 2013-04-19 00:45:20 +02:00
rtsx_common.h
rtsx_pci.h mfd: rtsx: Support RTS5249 2013-04-19 18:29:18 +02:00
si476x-core.h mfd: si476x: Don't use 0bNNN 2013-04-26 17:23:30 +02:00
si476x-platform.h mfd: si476x: Add header files and Kbuild plumbing 2013-04-19 18:38:13 +02:00
si476x-reports.h mfd: si476x: Add header files and Kbuild plumbing 2013-04-19 18:38:13 +02:00
smsc.h
sta2x11-mfd.h
stmpe.h mfd: support stmpe1801 18 bits enhanced port expander 2013-04-09 14:15:58 +02:00
syscon.h mfd: syscon: Add missing struct device_node declaration 2013-04-09 11:52:32 +02:00
t7l66xb.h
tc3589x.h
tc6387xb.h
tc6393xb.h
ti_am335x_tscadc.h input: ti_am335x_adc: use only FIFO0 and clean up a little 2013-06-12 18:50:22 +02:00
ti_ssp.h
tmio.h mmc: tmio: remove unused and deprecated symbols 2013-02-24 14:37:24 -05:00
tps6105x.h
tps6507x.h
tps6586x.h
tps65090.h For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
tps65217.h drivers/video/backlight/tps65217_bl.c add default brightness value option 2013-04-29 18:28:19 -07:00
tps65910.h
tps65912.h mfd: tps65912: Declare and use tps65912_irq_exit() 2013-03-12 09:25:50 +01:00
tps80031.h
twl4030-audio.h
twl6040.h
ucb1x00.h
viperboard.h
wl1273-core.h
wm8400-audio.h
wm8400-private.h
wm8400.h