Add the sensor class device support for the kxtj9 accelerometer
sensor.
Change-Id: I4548c6787f8bc4654c1b3e08d65fa4cb1727bef5
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
The kxtj9 irq handling and enable/disable logic is not correctly
handled. Thus causing the sensor consumes more power.
Change-Id: I114e36c648d9c7e485d77ed5e490c518c93855d3
CRs-fixed: 580419
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
The cm36283 als sensor reported inaccurate illumination value
due to not calibrated on 8x10 MTP devices.
CRs-Fixed: 579407
Change-Id: Ie7239f11944579e3d107b3fe739844ceb764998b
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Mma8x5x accelerometer driver continue polling sensor data after
sensor power off, this is because power state flag has been added
into sensor state variable but control condition logic did not
update accordingly.
Change-Id: I4b2ad1a043782d9dea03c5af9a688a0cc4439186
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Rectify the package id parsing which aborts firmware upgradation
due to package id mismatch.
CRs-Fixed: 574411
Change-Id: Ib047b8824e270c4ab57c7524c74dfb4dac9378f1
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Force firmware update cannot work when touchscreen controller
cannot report correct family ID. If touchscreen is does not work
in correct state and it reports wrong family ID, it cannot be
recovered by force update, this change use family ID from device
tree instead of read from controller register to fix this issue.
Change-Id: I85d24bfc68a7777053c15f28a84027260c68cebd
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
FT5336 use new firmware bootloader, current dirver cannot update
its firmware. Driver needs update to support this new firmware
bootloader.
CRs-Fixed: 567511
Change-Id: I5c210097a6b3daedce52c4dda806c698cda63968
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Allow turn off touch panel power and reconfigure related GPIOs
to maximize power saving.
CRs-Fixed: 568957
Change-Id: I25d7dc8abbd6dae4c54ee14f8feaf5701f64fd95
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Touchscreen driver may generate unbalanced input events when
enter suspend state, these unbalanced event will make input
system always wait for symmetrical input event and can not
handle input event properly. PRESSURE event is removed to
keep input events symmetrical.
CRs-Fixed: 566134
Change-Id: I3f6fda3fb5d0a717ae943a9113be89623c96ce61
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Set the direction of reset GPIO to input before freeing it. This
eliminates any leakage current which may be there.
CRs-Fixed: 554264
Change-Id: Ib439de058326bf0d14d6e18b0a6198b4f682daf8
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Add fw_name sysfs entry in Goodix driver. This entry allows
user to read and write firmware name from sysfs.
CRs-fixed: 555332
Change-Id: I69585d757f1a6dc40834a99ee67c872bf6f3ea13
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Device needs to turn off when both ambient light sensor and
proximity sensor is not enabled, this will maximize power saving.
Change-Id: I3195f180e065c1605029af37da4a65ce30612ac2
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Add null pointer exception check for pointer 'fw'
which may be NULL after request_firmware() call
and may be deferenced.
Change-Id: Ie4b4bb8548eb89b01f7f688372d8b0300542f72a
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
After resuming from suspend, configuration may be lost. Check
"Unconfigured" bit and if it is set, reconfigure the device.
Change-Id: Id55cc3a7f1c6e0885fa6b186696eab86a18103a7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Disable device regulators for power saving while device is not in
active state.
CRs-Fixed: 547435
Change-Id: I0984ef75e927d1b8e177782503bb3b2cfa8fa987
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Goodix GT9xx touchscreen driver supports up to six groups of config
data and uses hardware GPIO configuration to select which one will
be used. This change allows these six config groups to be loaded
from devicetree.
Change-Id: I9dfd698e7084164688dd964ed914d5eecc75ecd3
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Replace non-standard debug function with the conventional
functions in Goodix driver. And remove unnecessary debug
function used in Goodix driver.
Change-Id: Ia89d225333c1309710aab67b9c406784567e3050
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Add dynamic detection support to goodix driver, where
the driver tries to read the chip id and make sure
it is communicating with the right chip.
gtp_read_version is modified to gtp_read_fw_version
which reads the firmware version from the controller
and will be used during fw update process.
CRs-fixed: 538818
Change-Id: I2dc51b84f817413da6bf9b266e2fe7e0bb09c4bc
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
There is no need to send ABS_MT_PRESSURE event when contact is
removed from touchscreen, this redundant event will confuse some
APP and cause malfunction.
CRs-Fixed: 537993
Change-Id: Ie2aef79f99cb80c10706f832cfab583ba742fdf1
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
The driver outputs too much logs and affect debugging other issues.
Some more clean up is done in the patch to supress the checkpatch
failures and keep the code style consistency.
Change-Id: I8ad9eeb2e100ab3a6999c895c4e264e689d0702c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Focaltech touchscreen ICs may use different chip IDs for same module.
Add support to ignore ID check for such cases.
Change-Id: I0fe8da6a5e687317b4878b59ac5d1a4a4b620e1d
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
There are multiple buffer overflow and input validation issues
in Goodix gt915 driver, fix these issues by adding data length
check and change file system node mode.
CRs-Fixed: 526101
Change-Id: I5173fc1ca021fd45c939c7c8a4f460651330de5b
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Add support for polling to the secure touch sysfs notification
file.
Change-Id: I08603c7ba9fdf041460f285bfc61d93541c79752
Acked-by: Christian Bolis <cbolis@qti.qualcomm.com>
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Enable power saving in suspend cycle by turning off regulators and
disabling gpios. Remove software reset on resume so that
active mode power numbers are not impacted.
CRs-fixed: 543944
Change-Id: I1929913691c45693f647a5c4bc08e0fbb85a3ad4
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
Read display resolution from platform data in order
to properly use all virtual key implementations.
Change-Id: Ic0a13d6a8166379f08c5bfb49d5ea47ac22b3229
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>