PD#OTT-144
Problem:
after the dark screen, the adc button does not work
Solution:
The adc_keypad introduces earlysuspend for MID project:
after the LCD backlight disable, prevent the user from
pressing the key to open some applications and not complete standby.
Now check the adc button using the "system_freezable_wq" system queue,
which replaces the function of the code.So can remove it.
Verify:
g12b socket
Change-Id: I2333ba3dc406d2624962d116293a0b9d36f97534
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172713: touchscreen: goodix_gt9xx: fix coverity warning
There is no judgment about whether the pointer
is NULL before using it.
This causes "Dereference before null check".
Change-Id: Ic4d96cc1e48d16f409b71c70a049b433eeb39bf1
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172714: touchscreen: goodix_gt1x: fix coverity warning
There is no judgment about whether it is null before
using the pointer.
This causes "Untrusted value as argument".
Change-Id: I147b89e9a96cddf4bdc3c42753bd165b6b802065
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172714: touchscreen: goodix_gt1x: fix coverity warning
1.The return value of the function "gt1x_i2c_read" is not
checked in the "gt1x_generic.c" file.
2.There is no exit condition for the "while (retry > 0)"
loop statement in the "gt1x_update.c" file.
This causes "Untrusted valued as argument" and "Logically dead code".
Change-Id: I07c0639d084ca3b961dd187ce6721f0167b2e4cc
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172715: touchscreen: focaltech: fix coverity warning
In the "copy_from_user" function does not ensure that
the string "writebuf" ends with a null character.So that
need to add a null character at the end.
This causes "String not null terminated".
Change-Id: I4cc0736ec06652226f39dd5dcde3dc7406639b89
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172715: touchscreen: focaltech: fix coverity warning
In the "drivers/amlogic/input/touchscreen/focaltech_touch/
focaltech_core.c" file,the variable "irq_gpio"and
"reset_gpio" is an unsigned integer, they cannot be
compared with 0.
This causes "Unsigned compared against 0.
Change-Id: Ic0ef2043e18550cc6c81867ef73f492d2dc446ec
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172717: meson: adc_key: fix coverity warning
The "strncpy" function does not ensure that
the string "key->name"ends with a null character.
So, the function "strncpy" is replaced by the function "snprintf".
This causes "Buffer not null terminated".
Change-Id: I83cd35f2df8790ca779a8cc8bcde1cd97f2c9020
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172716: meson: remote: fix coverity warning
The "strncpy" function does not ensure that the
string "ptable->tab.custom_name"ends with a null character.
So,the function "strncpy" is replaced by the function "snprintf".
This causes "Buffer not null terminated".
Change-Id: I4dd7ce89778ba8be7d60f3463e445f5a3a753061
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172715: touchscreen: focaltech: fix coverity warning
The two header files "focaltech_upgrade_common.h" and
"focaltech_flash.h" contain each other.
This causes "Recursion in included headers".
Change-Id: I5ca6deae0c33a7cc32aa4f9498e19d40c001b2d3
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172714: touchscreen: goodix_gt1x: fix coverity warning
The value of "ret" variable is overridden by
the new value before it is used.
This causes "Unused value".
Change-Id: Ie48b58668c4f4077606d69d5bafbd8d59264ae7e
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172713: touchscreen: goodix_gt9xx: fix coverity warning
1.The return value of function "gtp_i2c_read" is not
checked in the "gt9xx.c" file.
2."ts"null pointer dereferencing reference in the "gt9xx.c" file.
3.In the "goodix_tool.c" file, because the third argument to
"memset" function is of type int, expression "cmd_head.data_len + 1"
is of type u16, so it need to convert to int.
This causes "Unused value".
Change-Id: I85ae8d9c11da0ed5d0ffbef97ad4b6c89fd78cf3
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#172286: this commit changes mainly for GVA
1) keypad: add pca9557 keypad driver for new mic board D607.
Change-Id: I0d9ec9626362b3d87d6c55e5c967bfa4486b1472
Signed-off-by: jinrong.liao <jinrong.liao@amlogic.com>
PD#172258: pio_keypad: Fix key reporting [1/1]
the following issues have been fixed :
1. didn't report any keys to userspace.
2. the push down of key is reported as push up.
3. no event is reported when press key for the first time.
adjust the key event value by changing the gpio flag for
atom board, as follows:
1. the event value "0" is replaced to "1" when push down.
2. the event value "1" is replaced to "0" when push up.
Change-Id: Ia207506df25ea604bce4b6ae9573a981fe664061
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Tellen Yu <tellen.yu@amlogic.com>
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
PD#169652: board: solve 32bit printk type error
for some data type, printk should follow below rule:
size_t: %zu or %zx
phys_addr_t: %pa
Change-Id: I456bd2f010080e6365b521a787367cc51bb4e9f4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
PD#169285: touchscreen: optimize module init flow
1.Initializing/Uninitializing resource in probe/remove function is more
appropriate in this case.
2.Use module_i2c_driver to replace module_init/exit to make code more
compact.
verify on a311d_w400
Change-Id: If02f12a6c290a6346d439785060e60a6cd815c12
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
PD#164774: kernel panic after mtk_cfg80211_set_power_mgmt
two possible overflow cases:
1. dev->debug_current + len == dev->debug_buffer_size
2. len > dev->debug_buffer_size
for the first case(currently triggered case)
the last byte of string pointed to by fmt, aka.'\0', will
overwrite the first byte of memory pointed to by header(in
function __register_sysctl_table), which is just the LSB of
ipv4_table[]'s base address. Leading to "Unable to handle
kernel paging request at virtual address xxxx" panic
for the second case
a bunch of memory pointed to by header(in function
__register_sysctl_table) will be overwritten
Change-Id: I6bc42308323b7ffb52fe4d1fa9d22742a31e8b1f
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
PD#163342: add remote led blink function to u211
Change-Id: I92ba57af1f3c83e6d432a344d35021734dfecf3c
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
PD#160889: keypad: avoid repetition of reporting power key event
If the adc_keypad and gpio_keypad driver are enabled at the same time,
the system will report two power key event when it resumes, and the
second event will result in the system suspend again. The patch resolves
the bug.
Change-Id: Iea4d9e2bf6632e4603dc9743fce07e5af74d0273
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
PD#146381: saradc/adc_keypad: reduce the probability bl30 fail to get race flag
1. unify the way to obtain race flag with bl30
2. replace the irq mode with polling mode
3. delay adc key scan time by 25ms
Change-Id: If072ee0a0a62c55e9c671baee0d25d1647e29ad9
Signed-off-by: xingyu.chen <xingyu.chen@amlogic.com>
PD#146614: adc_keypad: update interface to access adc and add sysfs interface
1.use sysfs interface to set dynamic key
inquire key map:
cat /sys/devices/platform/adc_keypad/table
set key:
echo [name]:[code]:[channel]:[value]:[tolerance] >
/sys/devices/platform/adc_keypad/table
2. use the consumer interface of the IIO to access sar adc
Change-Id: I0357e84720340b0fee4baa882f41f0aa7f36a9a1
Signed-off-by: xingyu.chen <xingyu.chen@amlogic.com>
PD#146222: saradc: refactor the driver based on the iio sub-system
the sar adc driver has been moved from directory input/saradc
into directory iio/adc, and is refactored base on the standard
iio sub-system.
the iio sub-system provide two ways to access sar adc resources:
1. standard api for consumer driver
it can be found at the file "include/linux/iio/consumer.h".
2. sysfs interface for user space(X: 0-7)
- obtain 10-bit sample value:
cat sys/bus/iio/devices/iio:device0/in_voltage[X]_input
- obtain raw sample value(10-bit or 12-bit):
cat sys/bus/iio/devices/iio:device0/in_voltage[X]_raw
- obtain mean raw sample value:
cat sys/bus/iio/devices/iio:device0/in_voltage[X]_mean_raw
test pass on the gxl skt, axg skt, m200.
Change-Id: I6c8877c782c51a01993557cabc0d43f212a8e524
Signed-off-by: xingyu.chen <xingyu.chen@amlogic.com>
PD#138714: optimizing remote driver for android
1. remove unnecessary key that set into keybit
Change-Id: Id553d3f243ed30da923c0431fd220acc16528660
Signed-off-by: Zan Peng <zan.peng@amlogic.com>
PD#138714: Re-implement legacy early_suspend for Amlogic driver.
1. re-implement early_suspend mechanism for legacy early_suspend driver code.
The early_suspend/late_resume can be trigger via cmd:
echo 1/0 > /sys/power/eary_suspend_trigger
2. Register wakeup source and report wakeup event for Remoute KEY_POWER
Change-Id: I07ba9861aa0c0c1126238e84248948f7707e9ae2
Signed-off-by: Qiufang Dai <qiufang.dai@amlogic.com>
PD#141217: add sar adc driver support for m8b
Change-Id: If0c43fe2c938d776e15d8dda03523626c6613e9f
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>