Add 'qcom/opensource/fingerprint/' from commit 'bf1db14b5f25c95f72d4ad57026186a823c22eff'
git-subtree-dir: qcom/opensource/fingerprint git-subtree-mainline:af64423e9f
git-subtree-split:bf1db14b5f
Change-Id: repo: https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/fingerprint tag: LA.VENDOR.14.3.0.r1-17300-lanai.QSSI15.0
This commit is contained in:
commit
992813d9c1
28
qcom/opensource/fingerprint/Android.mk
Normal file
28
qcom/opensource/fingerprint/Android.mk
Normal file
@ -0,0 +1,28 @@
|
||||
# Android makefile for Fingerprint kernel modules
|
||||
FINGERPRINT_DLKM_ENABLED := true
|
||||
ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
|
||||
ifeq ($(TARGET_KERNEL_DLKM_FINGERPRINT_OVERRIDE), false)
|
||||
FINGERPRINT_DLKM_ENABLED := false;
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(FINGERPRINT_DLKM_ENABLED), true)
|
||||
|
||||
ifeq ($(call is-board-platform-in-list,pineapple), true)
|
||||
ifneq (,$(filter arm aarch64 arm64, $(TARGET_ARCH)))
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
LOCAL_MODULE_DDK_BUILD := true
|
||||
|
||||
DLKM_DIR := device/qcom/common/dlkm
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := $(LOCAL_PATH)/qbt_handler.c
|
||||
LOCAL_MODULE := qbt_handler.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
|
||||
include $(DLKM_DIR)/Build_external_kernelmodule.mk
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
5
qcom/opensource/fingerprint/BUILD.bazel
Normal file
5
qcom/opensource/fingerprint/BUILD.bazel
Normal file
@ -0,0 +1,5 @@
|
||||
load(":define_modules.bzl", "define_basic_modules")
|
||||
|
||||
targets = ["pineapple"]
|
||||
variants = ["gki", "consolidate"]
|
||||
define_basic_modules(targets, variants)
|
1
qcom/opensource/fingerprint/Kbuild
Normal file
1
qcom/opensource/fingerprint/Kbuild
Normal file
@ -0,0 +1 @@
|
||||
obj-m := qbt_handler.o
|
12
qcom/opensource/fingerprint/Makefile
Normal file
12
qcom/opensource/fingerprint/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
all:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules
|
||||
|
||||
modules_install:
|
||||
$(MAKE) M=$(M) -C $(KERNEL_SRC) modules_install
|
||||
|
||||
%:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(KERNEL_SRC) M=$(M) clean
|
||||
|
20
qcom/opensource/fingerprint/README.txt
Normal file
20
qcom/opensource/fingerprint/README.txt
Normal file
@ -0,0 +1,20 @@
|
||||
How to set up and Compile using Bazel
|
||||
|
||||
Create symlink to link with kernel_platform for building and running bazel
|
||||
|
||||
mkdir -p kernel_platform/external_modules
|
||||
cd kernel_platform/external_modules
|
||||
ln -s ../../vendor/qcom/opens/fingerprint
|
||||
|
||||
|
||||
Command to check from kernel_platform dir to check if setup correct
|
||||
./build_with_bazel.py -t pinapple gki --lto=thin
|
||||
|
||||
|
||||
Command to run bazel build
|
||||
./tools/bazel build --lto=thin //external_modules/fingerprint:all
|
||||
|
||||
Command example to run bazel run to copy to dist dir
|
||||
./tools/bazel run --lto=thin //external_modules/fingerprint:pinapple_gki_qbt_handler_dist
|
||||
|
||||
Note: A few misspells on purpose to avoid banned keywords.
|
35
qcom/opensource/fingerprint/define_modules.bzl
Normal file
35
qcom/opensource/fingerprint/define_modules.bzl
Normal file
@ -0,0 +1,35 @@
|
||||
load("//build/kernel/kleaf:kernel.bzl", "ddk_module")
|
||||
load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir")
|
||||
|
||||
def define_basic_modules(targets, variants):
|
||||
for t in targets:
|
||||
for v in variants:
|
||||
define_modules(t, v)
|
||||
|
||||
def define_modules(target, variant):
|
||||
tv = "{}_{}".format(target, variant)
|
||||
rule_base = "{}_qbt_handler".format(tv)
|
||||
|
||||
ddk_module(
|
||||
name = rule_base,
|
||||
out = "qbt_handler.ko",
|
||||
deps = ["//msm-kernel:all_headers"],
|
||||
srcs = [
|
||||
"qbt_handler.c",
|
||||
"qbt_handler.h"
|
||||
],
|
||||
includes = ["include/linux"],
|
||||
kernel_build = "//msm-kernel:{}".format(tv),
|
||||
visibility = ["//visibility:public"]
|
||||
)
|
||||
|
||||
copy_to_dist_dir(
|
||||
name = "{}_dist".format(rule_base),
|
||||
data = [":{}".format(rule_base)],
|
||||
dist_dir = "../out/target/product/{}/dlkm/lib/modules/".format(target),
|
||||
flat = True,
|
||||
wipe_dist_dir = False,
|
||||
allow_duplicate_filenames = False,
|
||||
mode_overrides = {"**/*": "644"},
|
||||
log = "info",
|
||||
)
|
13
qcom/opensource/fingerprint/fingerprint_board.mk
Normal file
13
qcom/opensource/fingerprint/fingerprint_board.mk
Normal file
@ -0,0 +1,13 @@
|
||||
FINGERPRINT_DLKM_ENABLED := true
|
||||
ifeq ($(TARGET_KERNEL_DLKM_DISABLE), true)
|
||||
ifeq ($(TARGET_KERNEL_DLKM_FINGERPRINT_OVERRIDE), false)
|
||||
FINGERPRINT_DLKM_ENABLED := false;
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(FINGERPRINT_DLKM_ENABLED), true)
|
||||
ifeq ($(call is-board-platform-in-list,pineapple), true)
|
||||
BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/qbt_handler.ko
|
||||
endif
|
||||
|
||||
endif
|
3
qcom/opensource/fingerprint/fingerprint_product.mk
Normal file
3
qcom/opensource/fingerprint/fingerprint_product.mk
Normal file
@ -0,0 +1,3 @@
|
||||
ifeq ($(call is-board-platform-in-list,pineapple), true)
|
||||
PRODUCT_PACKAGES += qbt_handler.ko
|
||||
endif
|
1521
qcom/opensource/fingerprint/qbt_handler.c
Normal file
1521
qcom/opensource/fingerprint/qbt_handler.c
Normal file
File diff suppressed because it is too large
Load Diff
158
qcom/opensource/fingerprint/qbt_handler.h
Normal file
158
qcom/opensource/fingerprint/qbt_handler.h
Normal file
@ -0,0 +1,158 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifndef _QBT_HANDLER_H_
|
||||
#define _QBT_HANDLER_H_
|
||||
|
||||
#define MAX_NAME_SIZE 32
|
||||
|
||||
#define QBT_IS_WUHB_CONNECTED 100
|
||||
#define QBT_SEND_KEY_EVENT 101
|
||||
#define QBT_ENABLE_IPC 102
|
||||
#define QBT_DISABLE_IPC 103
|
||||
#define QBT_ENABLE_FD 104
|
||||
#define QBT_DISABLE_FD 105
|
||||
#define QBT_CONFIGURE_TOUCH_FD 106
|
||||
#define QBT_ACQUIRE_WAKELOCK 107
|
||||
#define QBT_RELEASE_WAKELOCK 108
|
||||
|
||||
#define QBT_GET_TOUCH_FD_VERSION 109
|
||||
#define QBT_CONFIGURE_TOUCH_FD_V2 110
|
||||
|
||||
#define QBT_INTR2_TEST 111
|
||||
#define QBT_CONFIGURE_TOUCH_FD_V3 112
|
||||
|
||||
/*
|
||||
* enum qbt_finger_events -
|
||||
* enumeration of qbt finger events
|
||||
* @QBT_EVENT_FINGER_UP - finger up detected
|
||||
* @QBT_EVENT_FINGER_DOWN - finger down detected
|
||||
* @QBT_EVENT_FINGER_MOVE - finger move detected
|
||||
*/
|
||||
enum qbt_finger_events {
|
||||
QBT_EVENT_FINGER_UP,
|
||||
QBT_EVENT_FINGER_DOWN,
|
||||
QBT_EVENT_FINGER_MOVE
|
||||
};
|
||||
|
||||
/*
|
||||
* enum qbt_fw_event -
|
||||
* enumeration of firmware events
|
||||
* @FW_EVENT_FINGER_DOWN - finger down detected
|
||||
* @FW_EVENT_FINGER_UP - finger up detected
|
||||
* @FW_EVENT_IPC - an IPC from the firmware is pending
|
||||
*/
|
||||
enum qbt_fw_event {
|
||||
FW_EVENT_FINGER_DOWN = 1,
|
||||
FW_EVENT_FINGER_UP = 2,
|
||||
FW_EVENT_IPC = 3,
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_wuhb_connected_status -
|
||||
* used to query whether WUHB INT line is connected
|
||||
* @is_wuhb_connected - if non-zero, WUHB INT line is connected
|
||||
*/
|
||||
struct qbt_wuhb_connected_status {
|
||||
_Bool is_wuhb_connected;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_key_event -
|
||||
* used to send key event
|
||||
* @key - the key event to send
|
||||
* @value - value of the key event
|
||||
*/
|
||||
struct qbt_key_event {
|
||||
int key;
|
||||
int value;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_touch_config -
|
||||
* used to configure touch finger detect
|
||||
* @rad_filter_enable - flag to enable/disable radius based filtering
|
||||
* @rad_x: movement radius in x direction
|
||||
* @rad_y: movement radius in y direction
|
||||
*/
|
||||
struct qbt_touch_config {
|
||||
_Bool rad_filter_enable;
|
||||
int rad_x;
|
||||
int rad_y;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_touch_fd_version -
|
||||
* used to get touch finger detect version
|
||||
* @version: version number
|
||||
*/
|
||||
struct qbt_touch_fd_version {
|
||||
int version;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_touch_config_v2 -
|
||||
* used to configure touch finger detect
|
||||
* @version - touch FD version
|
||||
* @touch_fd_enable - flag to enable/disable touch finger detect
|
||||
* @rad_filter_enable - flag to enable/disable radius based filtering
|
||||
* @left - x-coordinate of top left corner of AOI
|
||||
* @top - y-coordinate of top left corner of AOI
|
||||
* @right - x-coordinate of bottom right corner of AOI
|
||||
* @bottom - y--coordinate of bottom right corner of AOI
|
||||
* @rad_x: movement radius in x direction
|
||||
* @rad_y: movement radius in y direction
|
||||
*/
|
||||
struct qbt_touch_config_v2 {
|
||||
struct qbt_touch_fd_version version;
|
||||
_Bool touch_fd_enable;
|
||||
_Bool rad_filter_enable;
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
int rad_x;
|
||||
int rad_y;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_touch_config_v3 -
|
||||
* used to configure touch finger detect
|
||||
* @version - touch FD version
|
||||
* @touch_fd_enable - flag to enable/disable touch finger detect
|
||||
* @rad_filter_enable - flag to enable/disable radius based filtering
|
||||
* @left - x-coordinate of top left corner of AOI
|
||||
* @top - y-coordinate of top left corner of AOI
|
||||
* @right - x-coordinate of bottom right corner of AOI
|
||||
* @bottom - y--coordinate of bottom right corner of AOI
|
||||
* @rad_x: movement radius in x direction
|
||||
* @rad_y: movement radius in y direction
|
||||
* @intr2_enable - flag to enable/disable intr2
|
||||
*/
|
||||
struct qbt_touch_config_v3 {
|
||||
struct qbt_touch_fd_version version;
|
||||
_Bool touch_fd_enable;
|
||||
_Bool rad_filter_enable;
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
int rad_x;
|
||||
int rad_y;
|
||||
_Bool intr2_enable;
|
||||
};
|
||||
|
||||
/*
|
||||
* struct qbt_intr2_test -
|
||||
* used for INTR2 factory test
|
||||
* @state: state to toggle INTR2 pin
|
||||
*/
|
||||
struct qbt_intr2_test {
|
||||
__s32 state;
|
||||
};
|
||||
#endif /* _QBT_HANDLER_H_ */
|
Loading…
Reference in New Issue
Block a user