mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
dlkm: ets_fps: fix build issue on kernel 4.19
New kernel change some API and we need to make some change on Ets fps driver to match it. Change-Id: Ia16be9e8e02f99ebfee723644ed1d98abc6356e0 Signed-off-by: Weilong Wu <wuwl10@motorola.com> Reviewed-on: https://gerrit.mot.com/1483695 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yan Zhang <zhangy26@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
34ee4922f1
commit
c78eab44a5
2 changed files with 24 additions and 1 deletions
|
|
@ -210,7 +210,23 @@ static DECLARE_WAIT_QUEUE_HEAD(interrupt_waitq);
|
|||
* EXIT PARAMETERS.
|
||||
* Function Return
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)
|
||||
static void interrupt_timer_routine(struct timer_list *t)
|
||||
{
|
||||
struct interrupt_desc *bdata = from_timer (bdata, t, timer);
|
||||
|
||||
DEBUG_PRINT("FPS interrupt count = %d", bdata->int_count);
|
||||
if (bdata->int_count >= bdata->detect_threshold) {
|
||||
bdata->finger_on = 1;
|
||||
DEBUG_PRINT("FPS triggered !!!!!!!\n");
|
||||
} else {
|
||||
DEBUG_PRINT("FPS not triggered !!!!!!!\n");
|
||||
}
|
||||
|
||||
bdata->int_count = 0;
|
||||
wake_up_interruptible(&interrupt_waitq);
|
||||
}
|
||||
#else
|
||||
void interrupt_timer_routine(unsigned long _data)
|
||||
{
|
||||
struct interrupt_desc *bdata = (struct interrupt_desc *)_data;
|
||||
|
|
@ -226,6 +242,7 @@ void interrupt_timer_routine(unsigned long _data)
|
|||
bdata->int_count = 0;
|
||||
wake_up_interruptible(&interrupt_waitq);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DISPLAY_SPEED_UP
|
||||
extern void ext_dsi_display_early_power_on(void);
|
||||
|
|
@ -843,7 +860,7 @@ static int etspi_create_sysfs(struct etspi_data *etspi, bool create) {
|
|||
}
|
||||
}
|
||||
class_dev = device_create(fingerprint_class, NULL, MAJOR(dev_no),
|
||||
etspi, etspi_driver.driver.name);
|
||||
etspi, "et320");
|
||||
if (IS_ERR(class_dev)) {
|
||||
dev_err(dev, "%s create fingerprint class device failed.\n", __func__);
|
||||
rc = PTR_ERR(class_dev);
|
||||
|
|
@ -1023,8 +1040,13 @@ static int etspi_probe(struct platform_device *pdev)
|
|||
etspi_reset(etspi);
|
||||
|
||||
/* the timer is for ET310 */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0)
|
||||
timer_setup(&fps_ints.timer, interrupt_timer_routine, 0);
|
||||
#else
|
||||
setup_timer(&fps_ints.timer, interrupt_timer_routine, (unsigned long)&fps_ints);
|
||||
add_timer(&fps_ints.timer);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAS_WAKELOCK
|
||||
wake_lock_init(&ets_wake_lock, WAKE_LOCK_SUSPEND, "ets_wake_lock");
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <linux/printk.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
|
||||
#ifdef FP_SPI_DEBUG
|
||||
|
|
|
|||
Loading…
Reference in a new issue