input: touch: atmel_mxt_ts: Add SysFS interface to slow down scanning.
authorRobert Collins <rcollins@nvidia.com>
Thu, 20 Oct 2011 00:07:52 +0000 (17:07 -0700)
committerSimone Willett <swillett@nvidia.com>
Tue, 23 Oct 2012 01:50:20 +0000 (18:50 -0700)
commita106efc4dc18ce3294ab8b8046341ab8b7270032
tree72b6d4e4b436290afeedcb1a8b5af93992036bb5
parent896aae3ec416b2e18166af76b8da7afff0729434
input: touch: atmel_mxt_ts: Add SysFS interface to slow down scanning.

Video playback would like to save power by slowing touchscreen
scanning.  This change adds a SysFS interface to allow the
scan rate to be programmed by the video display interface.

SysFS location:
/sys/devices/platform/tegra-i2c.1/i2c-1/1-005a/slowscan_enable

Read functions:
cat slowscan_enable (returns current register status)

Write functions:
0 - Disable slowscan
1 - Enable slowscan
2 N - Program actv_cycle_time with value of N
3 N - Program idle_cycle_time with value of N
4 N - Program actv2idle timeout with value of N (seconds * 10)

Bug 891993

Change-Id: I35f3b83797e3216545d164f6096aeac4d06302b5
Rebase-Id: Re4398871d4964d366f0dbdd856a7953600577dea
Reviewed-on: http://git-master/r/65006
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/131493
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Xiaohui Tao <xtao@nvidia.com>
Tested-by: Xiaohui Tao <xtao@nvidia.com>
drivers/input/touchscreen/atmel_mxt_ts.c