mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
Build goodix gt9615 driver module
TP: Build goodix gt9616 driver module. Change-Id: I0b5c1ed550bcf28c195600e06b4b97513284d248 Signed-off-by: Wenge Zhu <zhuwg1@motorola.com> Reviewed-on: https://gerrit.mot.com/2778811 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jichao Zou <zoujc@motorola.com> Reviewed-by: Jun Weng <wengjun1@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6de617e9b3
commit
3582d300e2
8 changed files with 78 additions and 21 deletions
23
drivers/input/touchscreen/goodix_gt96x_mmi/Android.mk
Normal file
23
drivers/input/touchscreen/goodix_gt96x_mmi/Android.mk
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
DLKM_DIR := motorola/kernel/modules
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(TOUCHSCREEN_GOODIX_BRL_SPI),true)
|
||||
ifeq ($(call is-board-platform-in-list,taro kalama parrot crow pineapple), true)
|
||||
KBUILD_OPTIONS += CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI=y
|
||||
else
|
||||
KERNEL_CFLAGS += CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI=y
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := goodix_gt96x_mmi.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
||||
ifneq ($(findstring touchscreen_mmi.ko,$(BOARD_VENDOR_KERNEL_MODULES)),)
|
||||
KBUILD_OPTIONS += CONFIG_INPUT_TOUCHSCREEN_MMI=y
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES += $(KERNEL_MODULES_OUT)/touchscreen_mmi.ko
|
||||
endif
|
||||
|
||||
KBUILD_OPTIONS_GKI += GKI_OBJ_MODULE_DIR=gki
|
||||
include $(DLKM_DIR)/AndroidKernelModule.mk
|
||||
23
drivers/input/touchscreen/goodix_gt96x_mmi/Kbuild
Normal file
23
drivers/input/touchscreen/goodix_gt96x_mmi/Kbuild
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# add -Wall to try to catch everything we can.
|
||||
EXTRA_CFLAGS += -Wall
|
||||
EXTRA_CFLAGS += \
|
||||
-I$(ANDROID_BUILD_TOP)/motorola/kernel/modules/include
|
||||
|
||||
obj-m := goodix_gt96x_mmi.o
|
||||
goodix_gt96x_mmi-objs := \
|
||||
goodix_brl_i2c.o \
|
||||
goodix_brl_spi.o \
|
||||
goodix_ts_core.o \
|
||||
goodix_brl_hw.o \
|
||||
goodix_cfg_bin.o \
|
||||
goodix_ts_utils.o \
|
||||
goodix_brl_fwupdate.o \
|
||||
goodix_ts_inspect.o \
|
||||
goodix_ts_tools.o \
|
||||
goodix_ts_gesture.o
|
||||
|
||||
ifneq ($(filter m y,$(CONFIG_TOUCHSCREEN_GOODIX_BRL_SPI)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_TOUCHSCREEN_GOODIX_BRL_SPI
|
||||
endif
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS += $(CURDIR)/$(KBUILD_EXTMOD)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers
|
||||
|
|
@ -1,12 +1,16 @@
|
|||
obj-$(CONFIG_TOUCHSCREEN_GOODIX_BRL) += goodix_core.o
|
||||
goodix_core-y := \
|
||||
goodix_brl_i2c.o \
|
||||
goodix_brl_spi.o \
|
||||
goodix_ts_core.o \
|
||||
goodix_brl_hw.o \
|
||||
goodix_cfg_bin.o \
|
||||
goodix_ts_utils.o \
|
||||
goodix_brl_fwupdate.o \
|
||||
goodix_ts_gesture.o \
|
||||
goodix_ts_inspect.o \
|
||||
goodix_ts_tools.o
|
||||
all: modules
|
||||
|
||||
modules:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
|
||||
|
||||
modules_install:
|
||||
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
|
||||
|
||||
%:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
|
||||
rm -rf .tmp_versions
|
||||
|
||||
KBUILD_EXTRA_SYMBOLS += $(M)/../touchscreen_mmi/$(GKI_OBJ_MODULE_DIR)/Module.symvers
|
||||
|
|
|
|||
|
|
@ -1454,7 +1454,7 @@ static int brld_get_framedata(struct goodix_ts_core *cd,
|
|||
int ret;
|
||||
unsigned char val;
|
||||
int retry = 20;
|
||||
unsigned char frame_buf[GOODIX_MAX_FRAMEDATA_LEN];
|
||||
static unsigned char frame_buf[GOODIX_MAX_FRAMEDATA_LEN];
|
||||
unsigned char *cur_ptr;
|
||||
unsigned int flag_addr = cd->ic_info.misc.frame_data_addr;
|
||||
int tx = cd->ic_info.parm.drv_num;
|
||||
|
|
|
|||
|
|
@ -14,18 +14,16 @@
|
|||
* General Public License for more details.
|
||||
*
|
||||
*/
|
||||
#include <linux/version.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include "goodix_ts_core.h"
|
||||
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 38)
|
||||
#include <linux/input/mt.h>
|
||||
#define INPUT_TYPE_B_PROTOCOL
|
||||
#endif
|
||||
|
||||
#include "goodix_ts_core.h"
|
||||
/* goodix fb test */
|
||||
// #include "../../../video/fbdev/core/fb_firefly.h"
|
||||
|
||||
|
|
@ -1415,13 +1413,12 @@ void goodix_ts_esd_on(struct goodix_ts_core *cd)
|
|||
void goodix_ts_esd_off(struct goodix_ts_core *cd)
|
||||
{
|
||||
struct goodix_ts_esd *ts_esd = &cd->ts_esd;
|
||||
int ret;
|
||||
|
||||
if (!atomic_read(&ts_esd->esd_on))
|
||||
return;
|
||||
|
||||
atomic_set(&ts_esd->esd_on, 0);
|
||||
ret = cancel_delayed_work_sync(&ts_esd->esd_work);
|
||||
cancel_delayed_work_sync(&ts_esd->esd_work);
|
||||
ts_info("Esd off");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <linux/unistd.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_OF)
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
|
@ -66,6 +71,10 @@
|
|||
#define TS_DEFAULT_FIRMWARE "goodix_firmware.bin"
|
||||
#define TS_DEFAULT_CFG_BIN "goodix_cfg_group.bin"
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
|
||||
#define PDE_DATA(x) pde_data(x)
|
||||
#endif
|
||||
|
||||
enum GOODIX_GESTURE_TYP {
|
||||
GESTURE_C = (1 << 0),
|
||||
GESTURE_E = (1 << 1),
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ const static struct attribute_group gesture_sysfs_group = {
|
|||
|
||||
int gesture_module_init(struct goodix_ts_core *core_data)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
struct kobject *parent = &core_data->pdev->dev.kobj;
|
||||
|
||||
/* gesture sysfs init */
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <linux/version.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/fs.h>
|
||||
#include <stdarg.h>
|
||||
#include <linux/stdarg.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
|
||||
|
|
@ -2687,7 +2687,8 @@ static void *seq_start(struct seq_file *s, loff_t *pos)
|
|||
|
||||
static int seq_show(struct seq_file *s, void *v)
|
||||
{
|
||||
seq_printf(s, (u8 *)v);
|
||||
//seq_printf(s, (u8 *)v);
|
||||
seq_printf(s, "%s", (u8 *)v);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue