msm_serial_hs: Fix Tx path issues during uart shutdown

UART queues tx transfer request to ADM and upon getting completion
callback from ADM, schedules tx tasklet in which it enables the
Tx Ready Interrupt and waits for it. On Tx ready interrupt tx
dma_in_flight is set to zero indicating no more tx data is pending.

This would cause corner case where if uart shutdown function checks
dma_in_flight flag between dmov callback and Tx Ready interrupt,
then this may cause uart shutdown function queuing dmov flush for
the completed Tx command and with this dmov flush callback never
be called. To fix this issue, move the dma_in_flight flag reset from
Tx Ready interrupt to dmov callback.

To avoid issues if any uart clients submitting any Tx requests after
uart shutdown, add is_shutdown flag and check before tx command
submission.

CRs-Fixed: 476745
Change-Id: I05314cf2f8361109302dbc0ddcfb834e9034eab5
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
msm_serial_hs: Fix UART Rx dmov command stall issues

Resetting Rx and Tx HW state machine while Rx dmov command queued
with ADM, caused dmov stall issues. Hence moving the Rx and Tx reset
to after dmov_flush. In order to do this, change the Rx path to not
enqueue dmov request as a part of dmov flush when flush is
FLUSH_IGNORE.

Removing the unnecessary UART Rx and Tx HW Reset in
msm_hs_set_bps_locked().

Require to add few clock cycles after Rx and Tx HW reset, hence
adding 10us delay as safe side. In addition to this, combining
both Rx and Tx reset in single register write.

CRs-Fixed: 481244
Change-Id: Ib33feb55ab42b6d30ce19db945fed7496b78debf
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
drivers: staging: rename synaptics_i2c_rmi4 to avoid confusion

Synaptics driver in staging directory has the same file
name as the in-use synaptics driver in touchscreen directory.
Rename so that in search it is obvious they are two different
files and both are not enabled.

Change-Id: I53c81fbeb97b95f458dfbb60744cb95aa64c6275
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
input: synaptics: Correct bugs in fw update

- Fixed reset command could fail after firmware update
- Config reset pin if reset gpio is defined in platform data
- Force do a reset in function probe
- Skip fw/config update process if image firmware id is smaller
  than device firmware id

Change-Id: I3525410c791454f64c680506fe4c77e9da650a46
Git-commit: db1a35c603df138842bdee3b0d9e7f9e24012e4e
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: modified change w.r.t current driver]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
input: synaptics_i2c_rmi4: add flipx and flipy to sysfs

- modify enable irq function
- fix F$34 issue of interrupt dispatch
- add pressure report
- add sysfs entry flipx/flipy

Change-Id: I648184496639241c45528c6b806b0ae97bc7a555
Git-commit: 3f6a24d9e9af0f5ba229910225637c081255cdc3
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: Removed unnecessary parts of patch]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
input: synaptics_fw_update: Remove hardcoded firmware image name

Firmware name should be passed in based on target, not hardcoded.
Remove hardcoding and add appropriate error checking for this.

Change-Id: Ia95bf2abf8a86adc649d64d757f22d84c8e0053f
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
input: synaptics_i2c_rmi4: Add appropriate reset delays

- Check device status after command reset

Change-Id: Ic083be66ae45c89179dfbecc88543d8c171363cf
Git-commit: 7e811dcd8eaf3fc0df765335d0ef14926f325f64
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: only portion of patch taken.
 Custom changes were necessary to add for integration
 with mainline]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
config: msm8960: Enable touch firmware update

Enable SYNAPTICS_DSX_FW_UPDATE for firmware update and
associated functionality.

Change-Id: Iea2305d006d1e053139d06a51461102da68b191d
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Merge "msm_serial_hs: Fix Tx path issues during uart shutdown"
Merge "msm_serial_hs: Fix UART Rx dmov command stall issues"
Merge "drivers: staging: rename synaptics_i2c_rmi4 to avoid confusion"
Merge "input: synaptics: Correct bugs in fw update"
Merge "input: synaptics_i2c_rmi4: add flipx and flipy to sysfs"
Merge "input: synaptics_fw_update: Remove hardcoded firmware image name"
Merge "input: synaptics_i2c_rmi4: Add appropriate reset delays"
Merge "config: msm8960: Enable touch firmware update"