mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
3091141d78
I noticed in its DSDT that one of my tablets actually is using the GPADC pin for temperature monitoring. The whole axp288_adc_set_ts() function is a bit weird, in the past it was removed because it seems to make no sense, then this was reverted because of regressions. So I decided to test the special GPADC pin handling on this tablet. Conclusion: not only is axp288_adc_set_ts() necessary, we need to sleep a bit after making the AXP288_ADC_TS_PIN_CTRL changes before sampling the GPADC, otherwise it will often (about 80% of the time) read 0 instead of its actual value. It seems that there is only 1 bias current source and to be able to use it for the GPIO0 pin in GPADC mode it must be temporarily turned off for the TS pin, but the datasheet does not mention this. This commit adds a sleep after disabling the TS pin bias current, fixing the GPADC more often then not wrongly returning 0. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> |
||
---|---|---|
.. | ||
accel | ||
adc | ||
amplifiers | ||
buffer | ||
chemical | ||
common | ||
counter | ||
dac | ||
dummy | ||
frequency | ||
gyro | ||
health | ||
humidity | ||
imu | ||
light | ||
magnetometer | ||
orientation | ||
potentiometer | ||
potentiostat | ||
pressure | ||
proximity | ||
temperature | ||
trigger | ||
iio_core_trigger.h | ||
iio_core.h | ||
industrialio-buffer.c | ||
industrialio-configfs.c | ||
industrialio-core.c | ||
industrialio-event.c | ||
industrialio-sw-device.c | ||
industrialio-sw-trigger.c | ||
industrialio-trigger.c | ||
industrialio-triggered-event.c | ||
inkern.c | ||
Kconfig | ||
Makefile |