Merge "soc: qcom: add support for fingerprint sensor driver"
This commit is contained in:
commit
10fb467dd6
6 changed files with 1427 additions and 0 deletions
54
Documentation/devicetree/bindings/qbt1000/qbt1000.txt
Normal file
54
Documentation/devicetree/bindings/qbt1000/qbt1000.txt
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
Qualcomm Technologies, Inc. QBT1000 Specific Bindings
|
||||||
|
|
||||||
|
QBT is a fingerprint sensor ASIC capable of performing fingerprint image scans
|
||||||
|
and detecting finger presence on the sensor using programmable firmware.
|
||||||
|
|
||||||
|
=======================
|
||||||
|
Required Node Structure
|
||||||
|
=======================
|
||||||
|
|
||||||
|
- compatible
|
||||||
|
Usage: required
|
||||||
|
Value type: <string>
|
||||||
|
Definition: "qcom,qbt1000".
|
||||||
|
|
||||||
|
- clock-names
|
||||||
|
Usage: required
|
||||||
|
Value type: <stringlist>
|
||||||
|
Definition: List of clock names that need to be voted on/off.
|
||||||
|
|
||||||
|
- clocks
|
||||||
|
Usage: required
|
||||||
|
Value type: <prop_encoded-array>
|
||||||
|
Definition: Property pair that represents the clock controller and the clock
|
||||||
|
id. This in combination with the clock-name is used to obtain
|
||||||
|
the handle for the clock that needs to be voted on/off.
|
||||||
|
|
||||||
|
- clock-frequency
|
||||||
|
Usage: required
|
||||||
|
Value type: <u32>
|
||||||
|
Definition: Frequency of clock in Hz.
|
||||||
|
|
||||||
|
- qcom,ipc-gpio
|
||||||
|
Usage: required
|
||||||
|
Value type: <phandle>
|
||||||
|
Definition: phandle for GPIO to be used for IPC.
|
||||||
|
|
||||||
|
- qcom,finger-detect-gpio
|
||||||
|
Usage: required
|
||||||
|
Value type: <phandle>
|
||||||
|
Definition: phandle for GPIO to be used for finger detect.
|
||||||
|
|
||||||
|
=======
|
||||||
|
Example
|
||||||
|
=======
|
||||||
|
|
||||||
|
qcom,qbt1000 {
|
||||||
|
compatible = "qcom,qbt1000";
|
||||||
|
clock-names = "core", "iface";
|
||||||
|
clocks = <&clock_gcc clk_gcc_blsp2_qup6_spi_apps_clk>,
|
||||||
|
<&clock_gcc clk_gcc_blsp2_ahb_clk>;
|
||||||
|
clock-frequency = <15000000>;
|
||||||
|
qcom,ipc-gpio = <&tlmm 121 0>;
|
||||||
|
qcom,finger-detect-gpio = <&pmcobalt_gpios 2 0>;
|
||||||
|
};
|
|
@ -768,6 +768,15 @@ config MSM_SERVICE_NOTIFIER
|
||||||
like audio, the identifier for which is provided by the service
|
like audio, the identifier for which is provided by the service
|
||||||
locator.
|
locator.
|
||||||
|
|
||||||
|
config MSM_QBT1000
|
||||||
|
bool "QBT1000 Ultrasonic Fingerprint Sensor"
|
||||||
|
help
|
||||||
|
This driver provides services for configuring the fingerprint
|
||||||
|
sensor hardware and for communicating with the trusted app which
|
||||||
|
uses it. It enables clocks and provides commands for loading
|
||||||
|
trusted apps, unloading them and marshalling buffers to the
|
||||||
|
trusted fingerprint app.
|
||||||
|
|
||||||
config MSM_RPM_RBCPR_STATS_V2_LOG
|
config MSM_RPM_RBCPR_STATS_V2_LOG
|
||||||
tristate "MSM Resource Power Manager RPBCPR Stat Driver"
|
tristate "MSM Resource Power Manager RPBCPR Stat Driver"
|
||||||
depends on DEBUG_FS
|
depends on DEBUG_FS
|
||||||
|
|
|
@ -93,6 +93,7 @@ obj-$(CONFIG_MSM_KERNEL_PROTECT) += kernel_protect.o
|
||||||
obj-$(CONFIG_MSM_RTB) += msm_rtb-hotplug.o
|
obj-$(CONFIG_MSM_RTB) += msm_rtb-hotplug.o
|
||||||
obj-$(CONFIG_QCOM_REMOTEQDSS) += remoteqdss.o
|
obj-$(CONFIG_QCOM_REMOTEQDSS) += remoteqdss.o
|
||||||
obj-$(CONFIG_MSM_SERVICE_LOCATOR) += service-locator.o
|
obj-$(CONFIG_MSM_SERVICE_LOCATOR) += service-locator.o
|
||||||
|
obj-$(CONFIG_MSM_QBT1000) += qbt1000.o
|
||||||
obj-$(CONFIG_MSM_RPM_RBCPR_STATS_V2_LOG) += rpm_rbcpr_stats_v2.o
|
obj-$(CONFIG_MSM_RPM_RBCPR_STATS_V2_LOG) += rpm_rbcpr_stats_v2.o
|
||||||
obj-$(CONFIG_MSM_RPM_STATS_LOG) += rpm_stats.o rpm_master_stat.o system_stats.o
|
obj-$(CONFIG_MSM_RPM_STATS_LOG) += rpm_stats.o rpm_master_stat.o system_stats.o
|
||||||
obj-$(CONFIG_MSM_RPM_LOG) += rpm_log.o
|
obj-$(CONFIG_MSM_RPM_LOG) += rpm_log.o
|
||||||
|
|
1263
drivers/soc/qcom/qbt1000.c
Normal file
1263
drivers/soc/qcom/qbt1000.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -381,6 +381,7 @@ header-y += prctl.h
|
||||||
header-y += psci.h
|
header-y += psci.h
|
||||||
header-y += ptp_clock.h
|
header-y += ptp_clock.h
|
||||||
header-y += ptrace.h
|
header-y += ptrace.h
|
||||||
|
header-y += qbt1000.h
|
||||||
header-y += qcedev.h
|
header-y += qcedev.h
|
||||||
header-y += qcota.h
|
header-y += qcota.h
|
||||||
header-y += qnx4_fs.h
|
header-y += qnx4_fs.h
|
||||||
|
|
99
include/uapi/linux/qbt1000.h
Normal file
99
include/uapi/linux/qbt1000.h
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
#ifndef _UAPI_QBT1000_H_
|
||||||
|
#define _UAPI_QBT1000_H_
|
||||||
|
|
||||||
|
#define MAX_NAME_SIZE 32
|
||||||
|
|
||||||
|
/*
|
||||||
|
* enum qbt1000_commands -
|
||||||
|
* enumeration of command options
|
||||||
|
* @QBT1000_LOAD_APP - cmd loads TZ app
|
||||||
|
* @QBT1000_UNLOAD_APP - cmd unloads TZ app
|
||||||
|
* @QBT1000_SEND_TZCMD - sends cmd to TZ app
|
||||||
|
* @QBT1000_SET_FINGER_DETECT_KEY - sets the input key to send on finger detect
|
||||||
|
* @QBT1000_CONFIGURE_POWER_KEY - enables/disables sending the power key on
|
||||||
|
finger down events
|
||||||
|
*/
|
||||||
|
enum qbt1000_commands {
|
||||||
|
QBT1000_LOAD_APP = 100,
|
||||||
|
QBT1000_UNLOAD_APP = 101,
|
||||||
|
QBT1000_SEND_TZCMD = 102,
|
||||||
|
QBT1000_SET_FINGER_DETECT_KEY = 103,
|
||||||
|
QBT1000_CONFIGURE_POWER_KEY = 104
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* enum qbt1000_fw_event -
|
||||||
|
* enumeration of firmware events
|
||||||
|
* @FW_EVENT_FINGER_DOWN - finger down detected
|
||||||
|
* @FW_EVENT_FINGER_UP - finger up detected
|
||||||
|
* @FW_EVENT_INDICATION - an indication IPC from the firmware is pending
|
||||||
|
*/
|
||||||
|
enum qbt1000_fw_event {
|
||||||
|
FW_EVENT_FINGER_DOWN = 1,
|
||||||
|
FW_EVENT_FINGER_UP = 2,
|
||||||
|
FW_EVENT_CBGE_REQUIRED = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct qbt1000_app -
|
||||||
|
* used to load and unload apps in TZ
|
||||||
|
* @app_handle - qseecom handle for clients
|
||||||
|
* @name - Name of secure app to load
|
||||||
|
* @size - Size of requested buffer of secure app
|
||||||
|
* @high_band_width - 1 - for high bandwidth usage
|
||||||
|
* 0 - for normal bandwidth usage
|
||||||
|
*/
|
||||||
|
struct qbt1000_app {
|
||||||
|
struct qseecom_handle **app_handle;
|
||||||
|
char name[MAX_NAME_SIZE];
|
||||||
|
uint32_t size;
|
||||||
|
uint8_t high_band_width;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct qbt1000_send_tz_cmd -
|
||||||
|
* used to cmds to TZ App
|
||||||
|
* @app_handle - qseecom handle for clients
|
||||||
|
* @req_buf - Buffer containing request for secure app
|
||||||
|
* @req_buf_len - Length of request buffer
|
||||||
|
* @rsp_buf - Buffer containing response from secure app
|
||||||
|
* @rsp_buf_len - Length of response buffer
|
||||||
|
*/
|
||||||
|
struct qbt1000_send_tz_cmd {
|
||||||
|
struct qseecom_handle *app_handle;
|
||||||
|
uint8_t *req_buf;
|
||||||
|
uint32_t req_buf_len;
|
||||||
|
uint8_t *rsp_buf;
|
||||||
|
uint32_t rsp_buf_len;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct qbt1000_erie_event -
|
||||||
|
* used to receive events from Erie
|
||||||
|
* @buf - Buffer containing event from Erie
|
||||||
|
* @buf_len - Length of buffer
|
||||||
|
*/
|
||||||
|
struct qbt1000_erie_event {
|
||||||
|
uint8_t *buf;
|
||||||
|
uint32_t buf_len;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct qbt1000_set_finger_detect_key -
|
||||||
|
* used to configure the input key which is sent on finger down/up event
|
||||||
|
* @key_code - Key code to send on finger down/up. 0 disables sending key events
|
||||||
|
*/
|
||||||
|
struct qbt1000_set_finger_detect_key {
|
||||||
|
unsigned int key_code;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct qbt1000_configure_power_key -
|
||||||
|
* used to configure whether the power key is sent on finger down
|
||||||
|
* @enable - if non-zero, power key is sent on finger down
|
||||||
|
*/
|
||||||
|
struct qbt1000_configure_power_key {
|
||||||
|
unsigned int enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* _UAPI_QBT1000_H_ */
|
Loading…
Add table
Reference in a new issue