Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0
kernel device tree source code for OnePlus 5 & 5T P device Change-Id: I84f40e66833ea1ce30eb1d9a710d6e1529e9e637
This commit is contained in:
parent
f5a1f5889a
commit
8148b9d900
370 changed files with 91725 additions and 6325 deletions
4
Documentation/devicetree/bindings/fingerprint_detcet.txt
Normal file
4
Documentation/devicetree/bindings/fingerprint_detcet.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
fingerprint
|
||||
|
||||
Required Properties:
|
||||
- compatible: Must be "ompatible = "oneplus,fpdetect".
|
20
Documentation/devicetree/bindings/input/fpc1020_tee.txt
Normal file
20
Documentation/devicetree/bindings/input/fpc1020_tee.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
fpc Fingerprint
|
||||
|
||||
Required Properties:
|
||||
- compatible: Must be "ompatible = "fpc,fpc1020".
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
/* Fingerprint */
|
||||
fpc_fpc1020 {
|
||||
compatible = "fpc,fpc1020";
|
||||
interrupt-parent = <&tlmm>;
|
||||
fpc,irq-gpio = <&tlmm 121 0>;
|
||||
/*
|
||||
fpc,gpio_id0 = <&tlmm 39 0>;
|
||||
fpc,gpio_id1 = <&tlmm 41 0>;
|
||||
fpc,gpio_id2 = <&tlmm 63 0>;
|
||||
*/
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
synaptics,s3320
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "synaptics,s3320"
|
||||
|
||||
Example:
|
||||
synaptics-rmi-ts@20 {
|
||||
compatible = "synaptics,s3320";
|
||||
};
|
21
Documentation/devicetree/bindings/input/tri_state_key.txt
Normal file
21
Documentation/devicetree/bindings/input/tri_state_key.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
Tri-state key
|
||||
|
||||
Required Properties:
|
||||
- compatible: Must be "ompatible = "oneplus,tri-state-key".
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
tri_state_key {
|
||||
compatible = "oneplus,tri-state-key";
|
||||
status = "okay";
|
||||
interrupt-parent = <&tlmm>;
|
||||
tristate,gpio_key1 = <&tlmm 40 0x00>;
|
||||
tristate,gpio_key2 = <&tlmm 42 0x00>;
|
||||
tristate,gpio_key3 = <&tlmm 26 0x00>;
|
||||
pinctrl-names = "pmx_tri_state_key_active",
|
||||
"pmx_tri_state_key_suspend";
|
||||
pinctrl-0 = <&tri_state_key_active>;
|
||||
pinctrl-1 = <&tri_state_key_suspend>;
|
||||
};
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
Bootloader_log
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "bootloader_log"
|
||||
|
||||
Example:
|
||||
bootloader_log {
|
||||
compatible = "bootloader_log";
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
Goodix Fingerprint TEE driver
|
||||
|
||||
Required properties:
|
||||
|
||||
-compatible : should be "goodix,fingerprint".
|
||||
-interrupt-parent : gpio interrupt parent declare
|
||||
-fp-gpio-irq : irq gpio declare
|
||||
-fp-gpio-reset : reset gpio declare
|
||||
|
||||
Example:
|
||||
|
||||
goodix_fp {
|
||||
compatible = "goodix,fingerprint";
|
||||
interrupt-parent = <&tlmm>;
|
||||
fp-gpio-irq = <&tlmm 58 0x00>;
|
||||
fp-gpio-reset = <&tlmm 59 0x00>;
|
||||
status = "okay";
|
||||
};
|
20
Documentation/devicetree/bindings/power/bq27541.txt
Normal file
20
Documentation/devicetree/bindings/power/bq27541.txt
Normal file
|
@ -0,0 +1,20 @@
|
|||
ti,bq27541-battery
|
||||
|
||||
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : should be "ti,bq27541-battery"
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
bq27541-battery@55 {
|
||||
|
||||
status = "ok";
|
||||
|
||||
compatible = "ti,bq27541-battery";
|
||||
|
||||
reg = <0x55>;
|
||||
|
||||
qcom,modify-soc-smooth;
|
21
Documentation/devicetree/bindings/power/oneplus_fastchg.txt
Normal file
21
Documentation/devicetree/bindings/power/oneplus_fastchg.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
crochip,oneplus_fastcg"
|
||||
|
||||
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : should be "microchip,oneplus_fastcg"
|
||||
|
||||
|
||||
Example:
|
||||
oneplus_fastcg@26{
|
||||
|
||||
status = "ok";
|
||||
|
||||
compatible = "microchip,oneplus_fastcg";
|
||||
|
||||
reg = <0x26>;
|
||||
|
||||
microchip,mcu-en-gpio = <&tlmm 96 0x00>;
|
||||
|
||||
microchip,usb-sw-1-gpio = <&tlmm 15 0x00>;
|
17
Documentation/devicetree/bindings/serial/msm_serial.txt
Normal file
17
Documentation/devicetree/bindings/serial/msm_serial.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
oem force serial
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "oem,force_serial"
|
||||
|
||||
Example:
|
||||
force_enable_serial {
|
||||
compatible = "oem,force_serial";
|
||||
};
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "em,oem_serial_pinctrl"
|
||||
|
||||
Example:
|
||||
oem_serial_pinctrl {
|
||||
compatible = "oem,oem_serial_pinctrl";
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
Op_rf_cable_monitor
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "oem,rf_cable"
|
||||
|
||||
Example:
|
||||
oem_rf_cable {
|
||||
compatible = "oem,rf_cable";
|
||||
};
|
9
Documentation/devicetree/bindings/sound/tfa98xx.txt
Normal file
9
Documentation/devicetree/bindings/sound/tfa98xx.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
nxp,tfa9891
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "nxp,tfa9891"
|
||||
|
||||
Example:
|
||||
bootloader_log {
|
||||
compatible = "nxp,tfa9891";
|
||||
};
|
|
@ -262,3 +262,8 @@ zyxel ZyXEL Communications Corp.
|
|||
zarlink Zarlink Semiconductor
|
||||
zii Zodiac Inflight Innovations
|
||||
zte ZTE Corp.
|
||||
oem Oneplus Technologies
|
||||
oneplus OnePlus Technologies
|
||||
fpc fpc1020
|
||||
HWK synaptics
|
||||
android Android P
|
||||
|
|
2
Makefile
2
Makefile
|
@ -414,6 +414,8 @@ KBUILD_AFLAGS_MODULE := -DMODULE
|
|||
KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
|
||||
|
||||
CFLAGS_KERNEL += -DJUST_FOR_BRINGUP
|
||||
|
||||
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
|
||||
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
|
||||
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
|
||||
|
|
|
@ -145,40 +145,48 @@ msm8998-qrd-overlay.dtbo-base := msm8998-qrd.dtb
|
|||
msm8998-qrd-vr1-overlay.dtbo-base := msm8998-qrd-vr1.dtb
|
||||
msm8998-qrd-skuk-overlay.dtbo-base := msm8998-qrd-skuk.dtb
|
||||
else
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += msm8998-sim.dtb \
|
||||
msm8998-rumi.dtb \
|
||||
msm8998-cdp.dtb \
|
||||
msm8998-mtp.dtb \
|
||||
msm8998-qrd.dtb \
|
||||
msm8998-v2-sim.dtb \
|
||||
msm8998-v2-rumi.dtb \
|
||||
msm8998-v2-mtp.dtb \
|
||||
msm8998-v2-cdp.dtb \
|
||||
msm8998-v2-qrd.dtb \
|
||||
msm8998-qrd-skuk.dtb \
|
||||
msm8998-v2-qrd-skuk.dtb \
|
||||
msm8998-qrd-vr1.dtb \
|
||||
msm8998-v2-qrd-vr1.dtb \
|
||||
msm8998-v2-qrd-skuk-evt3.dtb \
|
||||
msm8998-v2-qrd-skuk-hdk.dtb \
|
||||
apq8098-mtp.dtb \
|
||||
apq8098-cdp.dtb \
|
||||
apq8098-v2-mtp.dtb \
|
||||
apq8098-v2-cdp.dtb \
|
||||
apq8098-v2-qrd.dtb \
|
||||
apq8098-v2-qrd-skuk-hdk.dtb \
|
||||
msm8998-v2.1-mtp.dtb \
|
||||
msm8998-v2.1-mtp-4k-display.dtb \
|
||||
msm8998-v2.1-cdp.dtb \
|
||||
msm8998-v2.1-qrd.dtb \
|
||||
apq8098-v2.1-mtp.dtb \
|
||||
apq8098-v2.1-cdp.dtb \
|
||||
apq8098-v2.1-qrd.dtb \
|
||||
apq8098-v2.1-mediabox.dtb \
|
||||
apq8098-v2.1-svr20.dtb \
|
||||
msm8998-v2.1-interposer-sdm660-cdp.dtb \
|
||||
msm8998-v2.1-interposer-sdm660-mtp.dtb \
|
||||
msm8998-v2.1-interposer-sdm660-qrd.dtb
|
||||
#dtb-$(CONFIG_ARCH_MSM8998) += msm8998-sim.dtb \
|
||||
# msm8998-rumi.dtb \
|
||||
# msm8998-cdp.dtb \
|
||||
# msm8998-mtp.dtb \
|
||||
# msm8998-qrd.dtb \
|
||||
# msm8998-v2-sim.dtb \
|
||||
# msm8998-v2-rumi.dtb \
|
||||
# msm8998-v2-mtp.dtb \
|
||||
# msm8998-v2-cdp.dtb \
|
||||
# msm8998-v2-qrd.dtb \
|
||||
# msm8998-qrd-skuk.dtb \
|
||||
# msm8998-v2-qrd-skuk.dtb \
|
||||
# msm8998-qrd-vr1.dtb \
|
||||
# msm8998-v2-qrd-vr1.dtb \
|
||||
# msm8998-v2-qrd-skuk-evt3.dtb \
|
||||
# msm8998-v2-qrd-skuk-hdk.dtb \
|
||||
# apq8098-mtp.dtb \
|
||||
# apq8098-cdp.dtb \
|
||||
# apq8098-v2-mtp.dtb \
|
||||
# apq8098-v2-cdp.dtb \
|
||||
# apq8098-v2-qrd.dtb \
|
||||
# apq8098-v2-qrd-skuk-hdk.dtb \
|
||||
# msm8998-v2.1-mtp.dtb \
|
||||
# msm8998-v2.1-mtp-4k-display.dtb \
|
||||
# msm8998-v2.1-cdp.dtb \
|
||||
# msm8998-v2.1-qrd.dtb \
|
||||
# apq8098-v2.1-mtp.dtb \
|
||||
# apq8098-v2.1-cdp.dtb \
|
||||
# apq8098-v2.1-qrd.dtb \
|
||||
# apq8098-v2.1-mediabox.dtb \
|
||||
# apq8098-v2.1-svr20.dtb \
|
||||
# msm8998-v2.1-interposer-sdm660-cdp.dtb \
|
||||
# msm8998-v2.1-interposer-sdm660-mtp.dtb \
|
||||
# msm8998-v2.1-interposer-sdm660-qrd.dtb \
|
||||
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += cheeseburger-v2.1-dvt1.dtb
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += cheeseburger-v2.1-pvt.dtb
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += cheeseburger-v2.1-pvt1.dtb
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += dumpling-v2.1-dvt.dtb
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += dumpling-v2.1-pvt.dtb
|
||||
dtb-$(CONFIG_ARCH_MSM8998) += dumpling-v2.1-Second_Resource.dtb
|
||||
|
||||
endif
|
||||
|
||||
dtb-$(CONFIG_ARCH_MSMHAMSTER) += msmhamster-rumi.dtb
|
||||
|
|
80
arch/arm/boot/dts/qcom/OP-batterydata-3300mah.dtsi
Normal file
80
arch/arm/boot/dts/qcom/OP-batterydata-3300mah.dtsi
Normal file
|
@ -0,0 +1,80 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
qcom,OP_3300mah {
|
||||
qcom,max-voltage-uv = <4370000>;
|
||||
qcom,fg-cc-cv-threshold-mv = <4360>;
|
||||
qcom,fastchg-current-ma = <3000>;
|
||||
qcom,batt-id-kohm = <200>;
|
||||
qcom,battery-beta = <3450>;
|
||||
qcom,battery-type = "OP_3300mah";
|
||||
qcom,checksum = <0xE06B>;
|
||||
qcom,gui-version = "PMI8998GUI - 0.0.0.82";
|
||||
qcom,fg-profile-data = [
|
||||
A4 1F 6E 05
|
||||
9C 0A 16 06
|
||||
32 1D 24 E5
|
||||
61 0B 1B 15
|
||||
AD 17 8C 22
|
||||
EB 3C 87 4A
|
||||
5B 00 00 00
|
||||
12 00 00 00
|
||||
00 00 62 C2
|
||||
0C CD D8 C2
|
||||
19 00 0C 00
|
||||
7E 00 C7 EC
|
||||
E3 05 5D FA
|
||||
97 F5 12 12
|
||||
C2 05 90 3B
|
||||
22 09 40 40
|
||||
07 00 05 00
|
||||
7D 1F DE 05
|
||||
3F 0A 73 06
|
||||
72 1D E2 F5
|
||||
6F 12 BF 1D
|
||||
88 18 FB 22
|
||||
8D 45 C6 52
|
||||
54 00 00 00
|
||||
0F 00 00 00
|
||||
00 00 BD CD
|
||||
55 C2 5D C5
|
||||
14 00 00 00
|
||||
7E 00 C7 EC
|
||||
60 06 BB 00
|
||||
B3 FC 61 03
|
||||
6A 06 78 1B
|
||||
B3 33 08 33
|
||||
07 10 00 00
|
||||
3E 0B 99 45
|
||||
14 00 19 00
|
||||
AE 01 0A FA
|
||||
FF 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
00 00 00 00
|
||||
];
|
||||
};
|
1148
arch/arm/boot/dts/qcom/cheeseburger-dvt1.dtsi
Normal file
1148
arch/arm/boot/dts/qcom/cheeseburger-dvt1.dtsi
Normal file
File diff suppressed because it is too large
Load diff
1103
arch/arm/boot/dts/qcom/cheeseburger-pvt.dtsi
Normal file
1103
arch/arm/boot/dts/qcom/cheeseburger-pvt.dtsi
Normal file
File diff suppressed because it is too large
Load diff
1104
arch/arm/boot/dts/qcom/cheeseburger-pvt1.dtsi
Normal file
1104
arch/arm/boot/dts/qcom/cheeseburger-pvt1.dtsi
Normal file
File diff suppressed because it is too large
Load diff
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-dvt1.dts
Normal file
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-dvt1.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "cheeseburger.dtsi"
|
||||
#include "cheeseburger-dvt1.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 16859 22>;
|
||||
};
|
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-pvt.dts
Normal file
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-pvt.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "cheeseburger.dtsi"
|
||||
#include "cheeseburger-pvt.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 16859 23>;
|
||||
};
|
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-pvt1.dts
Normal file
26
arch/arm/boot/dts/qcom/cheeseburger-v2.1-pvt1.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "cheeseburger.dtsi"
|
||||
#include "cheeseburger-pvt1.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 16859 24>;
|
||||
};
|
1035
arch/arm/boot/dts/qcom/cheeseburger.dtsi
Executable file
1035
arch/arm/boot/dts/qcom/cheeseburger.dtsi
Executable file
File diff suppressed because it is too large
Load diff
138
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa3_1080p_cmd.dtsi
Normal file
138
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa3_1080p_cmd.dtsi
Normal file
|
@ -0,0 +1,138 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
dsi_samsung_s6e3fa3_1080p_cmd: qcom,mdss_dsi_samsung_s6e3fa3_1080p_cmd {
|
||||
qcom,cont-splash-enabled;
|
||||
qcom,mdss-dsi-panel-name = "samsung s6e3fa3 1080p cmd mode dsi panel";
|
||||
qcom,mdss-dsi-panel-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-version = "S6E3FA3";
|
||||
qcom,mdss-dsi-backlight-version = "SAMSUNG";
|
||||
qcom,mdss-dsi-backlight-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
|
||||
qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
|
||||
qcom,mdss-dsi-panel-destination = "display_1";
|
||||
qcom,mdss-dsi-panel-framerate = <60>;
|
||||
qcom,mdss-dsi-virtual-channel-id = <0>;
|
||||
qcom,mdss-dsi-stream = <0>;
|
||||
qcom,mdss-dsi-panel-width = <1080>;
|
||||
qcom,mdss-dsi-panel-height = <1920>;
|
||||
qcom,mdss-dsi-h-front-porch = <120>;
|
||||
qcom,mdss-dsi-h-back-porch = <70>;
|
||||
qcom,mdss-dsi-h-pulse-width = <19>;
|
||||
qcom,mdss-dsi-h-sync-skew = <0>;
|
||||
qcom,mdss-dsi-v-back-porch = <4>;
|
||||
qcom,mdss-dsi-v-front-porch = <18>;
|
||||
qcom,mdss-dsi-v-pulse-width = <2>;
|
||||
qcom,mdss-dsi-h-left-border = <0>;
|
||||
qcom,mdss-dsi-h-right-border = <0>;
|
||||
qcom,mdss-dsi-v-top-border = <0>;
|
||||
qcom,mdss-dsi-v-bottom-border = <0>;
|
||||
qcom,mdss-dsi-bpp = <24>;
|
||||
qcom,mdss-dsi-color-order = "rgb_swap_rgb";
|
||||
qcom,mdss-dsi-underflow-color = <0xff>;
|
||||
qcom,mdss-dsi-border-color = <0>;
|
||||
qcom,mdss-dsi-on-command = [
|
||||
05 01 00 00 14 00 02 11 00
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 FC 5A 5A
|
||||
39 01 00 00 00 00 02 B0 01
|
||||
39 01 00 00 00 00 03 CC 54 4A
|
||||
39 01 00 00 00 00 02 B0 06
|
||||
39 01 00 00 00 00 02 FF 02
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
39 01 00 00 00 00 03 FC A5 A5
|
||||
15 01 00 00 00 00 02 35 00
|
||||
39 01 00 00 00 00 03 FC 5A 5A
|
||||
39 01 00 00 00 00 03 F4 00 01
|
||||
39 01 00 00 00 00 03 FC A5 A5
|
||||
15 01 00 00 00 00 02 53 20
|
||||
15 01 00 00 00 00 02 55 00
|
||||
39 01 00 00 00 00 02 57 40
|
||||
05 01 00 00 00 00 02 29 00
|
||||
];
|
||||
qcom,mdss-dsi-off-command = [05 01 00 00 28 00 02 28 00
|
||||
05 01 00 00 A0 00 02 10 00];
|
||||
qcom,mdss-dsi-post-panel-on-command = [05 01 00 00 00 00 02 29 00];
|
||||
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-h-sync-pulse = <1>;
|
||||
qcom,mdss-dsi-traffic-mode = "burst_mode";
|
||||
qcom,mdss-dsi-lane-map = "lane_map_0123";
|
||||
qcom,mdss-dsi-bllp-eof-power-mode;
|
||||
qcom,mdss-dsi-bllp-power-mode;
|
||||
qcom,mdss-dsi-lane-0-state;
|
||||
qcom,mdss-dsi-lane-1-state;
|
||||
qcom,mdss-dsi-lane-2-state;
|
||||
qcom,mdss-dsi-lane-3-state;
|
||||
qcom,mdss-dsi-panel-timings = [00 1b 06 06 0b 10 06 07 05 03 04 00];
|
||||
qcom,mdss-dsi-te-pin-select = <1>;
|
||||
qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line = <0x2c>;
|
||||
qcom,mdss-dsi-te-v-sync-continue-lines = <0x3c>;
|
||||
qcom,mdss-dsi-te-dcs-command = <1>;
|
||||
qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
|
||||
qcom,mdss-dsi-te-check-enable;
|
||||
qcom,mdss-dsi-te-using-te-pin;
|
||||
qcom,mdss-dsi-t-clk-post = <0x07>;
|
||||
qcom,mdss-dsi-t-clk-pre = <0x29>;
|
||||
qcom,mdss-dsi-bl-min-level = <1>;
|
||||
qcom,mdss-dsi-bl-max-level = <255>;
|
||||
qcom,mdss-dsi-dma-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-mdp-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
|
||||
qcom,mdss-dsi-lp11-init;
|
||||
qcom,mdss-dsi-init-delay-us = <10000>;
|
||||
qcom,mdss-dsi-reset-sequence = <1 2>,<0 2>, <1 2>;
|
||||
/*qcom,mdss-dsi-panel-inverted;*/
|
||||
qcom,mdss-pan-physical-width-dimension = <68>;
|
||||
qcom,mdss-pan-physical-height-dimension = <122>;
|
||||
qcom,mdss-tear-check-frame-rate=<6000>;
|
||||
//qcom,mdss-tear-check-sync-cfg-height = <1932>; /* Height + VBP + VFP + VSW */
|
||||
//qcom,mdss-tear-check-sync-init-val= <1920>; /* Height */
|
||||
//qcom,mdss-tear-check-sync-threshold-start = <4>;
|
||||
//qcom,mdss-tear-check-sync-threshold-continue = <4>;
|
||||
//qcom,mdss-tear-check-start-pos= <1920>; /* Height */
|
||||
//qcom,mdss-tear-check-rd-ptr-trigger-intr= <1921>; /* Height + 1 */
|
||||
qcom,mdss-dsi-panel-orientation = "180";
|
||||
qcom,mdss-dsi-high-brightness-panel;
|
||||
qcom,mdss-dsi-panel-acl-command = [15 01 00 00 00 00 02 55 00];
|
||||
qcom,mdss-dsi-acl-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-acl-ncmds = <0>;
|
||||
qcom,mdss-dsi-acl-npayload = <1>;
|
||||
qcom,mdss-dsi-panel-srgb-on-command = [39 01 00 00 00 00 02 57 4c];
|
||||
qcom,mdss-dsi-panel-srgb-off-command = [39 01 00 00 00 00 02 57 40];
|
||||
qcom,mdss-dsi-srgb-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-hbm-on-command = [15 01 00 00 00 00 02 53 E8];
|
||||
qcom,mdss-dsi-panel-hbm-off-command = [15 01 00 00 00 00 02 53 28];
|
||||
qcom,mdss-dsi-hbm-command-state = "dsi_hs_mode";
|
||||
/******************************************************************************/
|
||||
// if you need read the lcd register value you can modify the qcom,mdss-dsi-id-command
|
||||
qcom,mdss-dsi-read-reg-enable-command = [39 01 00 00 00 00 03 F0 5A 5A];
|
||||
qcom,mdss-dsi-read-reg-disable-command = [29 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-packetsizetxcmds-command = [37 01 00 00 00 00 02 07 00];
|
||||
qcom,mdss-dsi-readpostxcmds-command = [15 01 00 00 00 00 02 B0 00];
|
||||
qcom,mdss-dsi-id-command = [ 06 01 00 00 00 00 01 C8 0A 28]; //read C8 41~50th , 40=0x28
|
||||
qcom,mdss-dsi-packetsizetxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-readpostxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-enable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-disable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-id-command-state = "dsi_lp_mode";
|
||||
|
||||
/*****************************************************************************/
|
||||
};
|
||||
};
|
|
@ -0,0 +1,114 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
dsi_samsung_s6e3fa3_1080p_video: qcom,mdss_dsi_samsung_s6e3fa3_1080p_video {
|
||||
qcom,cont-splash-enabled;
|
||||
qcom,mdss-dsi-panel-name = "samsung s6e3fa3 1080p video mode dsi panel";
|
||||
qcom,mdss-dsi-panel-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-version = "S6E3FA3";
|
||||
qcom,mdss-dsi-backlight-version = "SAMSUNG";
|
||||
qcom,mdss-dsi-backlight-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
|
||||
qcom,mdss-dsi-panel-type = "dsi_video_mode";
|
||||
qcom,mdss-dsi-panel-destination = "display_1";
|
||||
qcom,mdss-dsi-panel-framerate = <60>;
|
||||
qcom,mdss-dsi-virtual-channel-id = <0>;
|
||||
qcom,mdss-dsi-stream = <0>;
|
||||
qcom,mdss-dsi-panel-width = <1080>;
|
||||
qcom,mdss-dsi-panel-height = <1920>;
|
||||
qcom,mdss-dsi-h-front-porch = <120>;
|
||||
qcom,mdss-dsi-h-back-porch = <60>;
|
||||
qcom,mdss-dsi-h-pulse-width = <20>;
|
||||
qcom,mdss-dsi-h-sync-skew = <0>;
|
||||
qcom,mdss-dsi-v-back-porch = <8>;
|
||||
qcom,mdss-dsi-v-front-porch = <6>;
|
||||
qcom,mdss-dsi-v-pulse-width = <2>;
|
||||
qcom,mdss-dsi-h-left-border = <0>;
|
||||
qcom,mdss-dsi-h-right-border = <0>;
|
||||
qcom,mdss-dsi-v-top-border = <0>;
|
||||
qcom,mdss-dsi-v-bottom-border = <0>;
|
||||
qcom,mdss-dsi-bpp = <24>;
|
||||
qcom,mdss-dsi-color-order = "rgb_swap_rgb";
|
||||
qcom,mdss-dsi-underflow-color = <0xff>;
|
||||
qcom,mdss-dsi-border-color = <0>;
|
||||
qcom,mdss-dsi-on-command = [
|
||||
05 01 00 00 8c 00 02 11 00
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
15 01 00 00 00 00 02 B9 01
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 FC 5A 5A
|
||||
39 01 00 00 00 00 03 F4 00 01
|
||||
15 01 00 00 00 00 02 C0 32
|
||||
15 01 00 00 00 00 02 F7 03
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
39 01 00 00 00 00 03 FC A5 A5
|
||||
15 01 00 00 00 00 02 53 20
|
||||
15 01 00 00 64 00 02 51 00
|
||||
39 01 00 00 00 00 02 57 40
|
||||
05 01 00 00 0A 00 02 29 00
|
||||
];
|
||||
qcom,mdss-dsi-off-command = [05 01 00 00 28 00 02 28 00
|
||||
05 01 00 00 A0 00 02 10 00];
|
||||
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-h-sync-pulse = <1>;
|
||||
qcom,mdss-dsi-traffic-mode = "burst_mode";
|
||||
qcom,mdss-dsi-lane-map = "lane_map_0123";
|
||||
qcom,mdss-dsi-bllp-eof-power-mode;
|
||||
qcom,mdss-dsi-bllp-power-mode;
|
||||
qcom,mdss-dsi-lane-0-state;
|
||||
qcom,mdss-dsi-lane-1-state;
|
||||
qcom,mdss-dsi-lane-2-state;
|
||||
qcom,mdss-dsi-lane-3-state;
|
||||
qcom,mdss-dsi-panel-timings = [00 1b 06 06 0b 11 05 07 05 03 04 00];
|
||||
qcom,mdss-dsi-t-clk-post = <0x07>;
|
||||
qcom,mdss-dsi-t-clk-pre = <0x29>;
|
||||
/*
|
||||
qcom,mdss-dsi-te-pin-select = <1>;
|
||||
qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line = <0x2c>;
|
||||
qcom,mdss-dsi-te-v-sync-continue-lines = <0x3c>;
|
||||
qcom,mdss-dsi-te-dcs-command = <1>;
|
||||
//qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
|
||||
qcom,mdss-dsi-te-check-enable;
|
||||
qcom,mdss-dsi-te-using-te-pin;
|
||||
*/
|
||||
//qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "reg_read";
|
||||
qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08];
|
||||
qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-panel-status-read-length = <1>;
|
||||
qcom,mdss-dsi-panel-max-error-count = <2>;
|
||||
qcom,mdss-dsi-panel-status-value = <0x9c>;
|
||||
qcom,mdss-dsi-bl-min-level = <1>;
|
||||
qcom,mdss-dsi-bl-max-level = <255>;
|
||||
qcom,mdss-dsi-dma-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-mdp-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
|
||||
qcom,mdss-dsi-lp11-init;
|
||||
qcom,mdss-dsi-force-clock-lane-hs;
|
||||
qcom,mdss-dsi-init-delay-us = <10000>;
|
||||
qcom,mdss-dsi-reset-sequence = <1 20>, <0 10>, <1 100>;
|
||||
/*qcom,mdss-dsi-panel-inverted;*/
|
||||
qcom,mdss-pan-physical-width-dimension = <68>;
|
||||
qcom,mdss-pan-physical-height-dimension = <122>;
|
||||
qcom,mdss-dsi-panel-orientation = "180";
|
||||
qcom,mdss-dsi-high-brightness-panel;
|
||||
};
|
||||
};
|
177
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa5_1080p_cmd.dtsi
Normal file
177
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa5_1080p_cmd.dtsi
Normal file
|
@ -0,0 +1,177 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
dsi_samsung_s6e3fa5_1080p_cmd: qcom,mdss_dsi_samsung_s6e3fa5_1080p_cmd {
|
||||
qcom,cont-splash-enabled;
|
||||
qcom,mdss-dsi-panel-name = "samsung s6e3fa5 1080p cmd mode dsi panel";
|
||||
qcom,mdss-dsi-panel-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-version = "S6E3FA5";
|
||||
qcom,mdss-dsi-backlight-version = "SAMSUNG";
|
||||
qcom,mdss-dsi-backlight-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
|
||||
qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
|
||||
qcom,mdss-dsi-panel-destination = "display_1";
|
||||
qcom,mdss-dsi-panel-framerate = <60>;
|
||||
qcom,mdss-dsi-virtual-channel-id = <0>;
|
||||
qcom,mdss-dsi-stream = <0>;
|
||||
qcom,mdss-dsi-panel-width = <1080>;
|
||||
qcom,mdss-dsi-panel-height = <1920>;
|
||||
qcom,mdss-dsi-h-front-porch = <120>;
|
||||
qcom,mdss-dsi-h-back-porch = <70>;
|
||||
qcom,mdss-dsi-h-pulse-width = <19>;
|
||||
qcom,mdss-dsi-h-sync-skew = <0>;
|
||||
qcom,mdss-dsi-v-back-porch = <4>;
|
||||
qcom,mdss-dsi-v-front-porch = <18>;
|
||||
qcom,mdss-dsi-v-pulse-width = <2>;
|
||||
qcom,mdss-dsi-h-left-border = <0>;
|
||||
qcom,mdss-dsi-h-right-border = <0>;
|
||||
qcom,mdss-dsi-v-top-border = <0>;
|
||||
qcom,mdss-dsi-v-bottom-border = <0>;
|
||||
qcom,mdss-dsi-bpp = <24>;
|
||||
qcom,mdss-dsi-color-order = "rgb_swap_rgb";
|
||||
qcom,mdss-dsi-underflow-color = <0xff>;
|
||||
qcom,mdss-dsi-border-color = <0>;
|
||||
qcom,mdss-dsi-on-command = [
|
||||
05 01 00 00 14 00 02 11 00
|
||||
15 01 00 00 00 00 02 35 00
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 B0 04
|
||||
39 01 00 00 00 00 04 B4 06 0C 12
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
15 01 00 00 00 00 02 53 20
|
||||
15 01 00 00 00 00 02 55 00
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
05 01 00 00 00 00 02 29 00
|
||||
];
|
||||
qcom,mdss-dsi-off-command = [05 01 00 00 28 00 02 28 00
|
||||
05 01 00 00 A0 00 02 10 00];
|
||||
qcom,mdss-dsi-post-panel-on-command = [05 01 00 00 00 00 02 29 00];
|
||||
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-h-sync-pulse = <1>;
|
||||
qcom,mdss-dsi-traffic-mode = "burst_mode";
|
||||
qcom,mdss-dsi-lane-map = "lane_map_0123";
|
||||
qcom,mdss-dsi-bllp-eof-power-mode;
|
||||
qcom,mdss-dsi-bllp-power-mode;
|
||||
qcom,mdss-dsi-lane-0-state;
|
||||
qcom,mdss-dsi-lane-1-state;
|
||||
qcom,mdss-dsi-lane-2-state;
|
||||
qcom,mdss-dsi-lane-3-state;
|
||||
qcom,mdss-dsi-panel-timings = [00 1b 06 06 0b 10 06 07 05 03 04 00];
|
||||
qcom,mdss-dsi-te-pin-select = <1>;
|
||||
qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line = <0x2c>;
|
||||
qcom,mdss-dsi-te-v-sync-continue-lines = <0x3c>;
|
||||
qcom,mdss-dsi-te-dcs-command = <1>;
|
||||
qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
|
||||
qcom,mdss-dsi-te-check-enable;
|
||||
qcom,mdss-dsi-te-using-te-pin;
|
||||
qcom,mdss-dsi-t-clk-post = <0x07>;
|
||||
qcom,mdss-dsi-t-clk-pre = <0x29>;
|
||||
qcom,mdss-dsi-bl-min-level = <1>;
|
||||
qcom,mdss-dsi-bl-max-level = <255>;
|
||||
qcom,mdss-dsi-dma-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-mdp-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
|
||||
qcom,mdss-dsi-lp11-init;
|
||||
qcom,mdss-dsi-init-delay-us = <10000>;
|
||||
qcom,mdss-dsi-reset-sequence = <1 2>,<0 2>, <1 2>;
|
||||
/*qcom,mdss-dsi-panel-inverted;*/
|
||||
qcom,mdss-pan-physical-width-dimension = <68>;
|
||||
qcom,mdss-pan-physical-height-dimension = <122>;
|
||||
qcom,mdss-tear-check-frame-rate=<6000>;
|
||||
//qcom,mdss-tear-check-sync-cfg-height = <1932>; /* Height + VBP + VFP + VSW */
|
||||
//qcom,mdss-tear-check-sync-init-val= <1920>; /* Height */
|
||||
// qcom,mdss-tear-check-sync-threshold-start = <4>;
|
||||
// qcom,mdss-tear-check-sync-threshold-continue = <4>;
|
||||
// qcom,mdss-tear-check-start-pos= <1920>; /* Height */
|
||||
// qcom,mdss-tear-check-rd-ptr-trigger-intr= <1921>; /* Height + 1 */
|
||||
|
||||
qcom,mdss-dsi-high-brightness-panel;
|
||||
qcom,mdss-dsi-panel-acl-command = [15 01 00 00 00 00 02 55 00];
|
||||
qcom,mdss-dsi-acl-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-acl-ncmds = <0>;
|
||||
qcom,mdss-dsi-acl-npayload = <1>;
|
||||
qcom,mdss-dsi-panel-hbm-on-command = [15 01 00 00 00 00 02 53 E8];
|
||||
qcom,mdss-dsi-panel-hbm-off-command = [15 01 00 00 00 00 02 53 28];
|
||||
qcom,mdss-dsi-hbm-command-state = "dsi_hs_mode";
|
||||
/******************************************************************************/
|
||||
// if you need read the lcd register value you can modify the qcom,mdss-dsi-id-command
|
||||
qcom,mdss-dsi-read-reg-enable-command = [39 01 00 00 00 00 03 F0 5A 5A];
|
||||
qcom,mdss-dsi-read-reg-disable-command = [29 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-packetsizetxcmds-command = [37 01 00 00 00 00 02 07 00];
|
||||
qcom,mdss-dsi-readpostxcmds-command = [15 01 00 00 00 00 02 B0 00];
|
||||
qcom,mdss-dsi-id-command = [ 06 01 00 00 00 00 01 C3 0A 19]; //read C3 25~35th , 25=0x19
|
||||
qcom,mdss-dsi-packetsizetxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-readpostxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-enable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-disable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-id-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-panel-srgb-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 81
|
||||
39 01 00 00 00 00 02 B0 19
|
||||
39 01 00 00 00 00 16 C3 B2 06 05 3C CF 14 07 07 B2 4B E7 C9 BF 0A B9 E5 DA 18 FF F6 D7
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 03 f0 A5 A5];
|
||||
qcom,mdss-dsi-panel-srgb-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-srgb-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-dci-p3-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 81
|
||||
39 01 00 00 00 00 02 B0 19
|
||||
39 01 00 00 00 00 16 C3 D8 00 00 16 D2 00 08 08 C3 1C F1 CF E8 02 C8 E9 DF 00 FF F6 D7
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 03 f0 A5 A5];
|
||||
qcom,mdss-dsi-panel-dci-p3-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-panel-orientation = "180";
|
||||
qcom,mdss-dsi-dci-p3-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-night-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5a 5a
|
||||
39 01 00 00 00 00 02 C3 81
|
||||
39 01 00 00 00 00 02 B0 19
|
||||
39 01 00 00 00 00 16 C3 B2 06 05 3C CF 14 07 07 B2 4B E7 C9 BF 0A B9 E5 DA 18 FD FE FA
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 03 f0 A5 A5];
|
||||
qcom,mdss-dsi-panel-night-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 C3 01
|
||||
39 01 00 00 00 00 02 B0 18
|
||||
39 01 00 00 00 00 02 C3 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-night-mode-command-state = "dsi_hs_mode";
|
||||
};
|
||||
};
|
196
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa6_1080p_cmd.dtsi
Normal file
196
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fa6_1080p_cmd.dtsi
Normal file
|
@ -0,0 +1,196 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
dsi_samsung_s6e3fa6_1080p_cmd: qcom,mdss_dsi_samsung_s6e3fa6_1080p_cmd {
|
||||
qcom,cont-splash-enabled;
|
||||
qcom,mdss-dsi-panel-name = "samsung s6e3fa6 1080p cmd mode dsi panel";
|
||||
qcom,mdss-dsi-panel-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-version = "S6E3FA6";
|
||||
qcom,mdss-dsi-backlight-version = "SAMSUNG";
|
||||
qcom,mdss-dsi-backlight-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
|
||||
qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
|
||||
qcom,mdss-dsi-panel-destination = "display_1";
|
||||
qcom,mdss-dsi-panel-framerate = <60>;
|
||||
qcom,mdss-dsi-virtual-channel-id = <0>;
|
||||
qcom,mdss-dsi-stream = <0>;
|
||||
qcom,mdss-dsi-panel-width = <1080>;
|
||||
qcom,mdss-dsi-panel-height = <1920>;
|
||||
qcom,mdss-dsi-h-front-porch = <120>;
|
||||
qcom,mdss-dsi-h-back-porch = <70>;
|
||||
qcom,mdss-dsi-h-pulse-width = <19>;
|
||||
qcom,mdss-dsi-h-sync-skew = <0>;
|
||||
qcom,mdss-dsi-v-back-porch = <4>;
|
||||
qcom,mdss-dsi-v-front-porch = <18>;
|
||||
qcom,mdss-dsi-v-pulse-width = <2>;
|
||||
qcom,mdss-dsi-h-left-border = <0>;
|
||||
qcom,mdss-dsi-h-right-border = <0>;
|
||||
qcom,mdss-dsi-v-top-border = <0>;
|
||||
qcom,mdss-dsi-v-bottom-border = <0>;
|
||||
qcom,mdss-dsi-bpp = <24>;
|
||||
qcom,mdss-dsi-color-order = "rgb_swap_rgb";
|
||||
qcom,mdss-dsi-underflow-color = <0xff>;
|
||||
qcom,mdss-dsi-border-color = <0>;
|
||||
qcom,mdss-dsi-on-command = [
|
||||
05 01 00 00 14 00 02 11 00
|
||||
15 01 00 00 00 00 02 35 00
|
||||
15 01 00 00 00 00 02 53 20
|
||||
15 01 00 00 00 00 02 55 00
|
||||
05 01 00 00 00 00 02 29 00
|
||||
];
|
||||
qcom,mdss-dsi-off-command = [05 01 00 00 28 00 02 28 00
|
||||
05 01 00 00 A0 00 02 10 00];
|
||||
qcom,mdss-dsi-post-panel-on-command = [05 01 00 00 00 00 02 29 00];
|
||||
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-h-sync-pulse = <1>;
|
||||
qcom,mdss-dsi-traffic-mode = "burst_mode";
|
||||
qcom,mdss-dsi-lane-map = "lane_map_0123";
|
||||
qcom,mdss-dsi-bllp-eof-power-mode;
|
||||
qcom,mdss-dsi-bllp-power-mode;
|
||||
qcom,mdss-dsi-lane-0-state;
|
||||
qcom,mdss-dsi-lane-1-state;
|
||||
qcom,mdss-dsi-lane-2-state;
|
||||
qcom,mdss-dsi-lane-3-state;
|
||||
qcom,mdss-dsi-panel-timings = [00 1b 06 06 0b 10 06 07 05 03 04 00];
|
||||
qcom,mdss-dsi-te-pin-select = <1>;
|
||||
qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line = <0x2c>;
|
||||
qcom,mdss-dsi-te-v-sync-continue-lines = <0x3c>;
|
||||
qcom,mdss-dsi-te-dcs-command = <1>;
|
||||
qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
|
||||
qcom,mdss-dsi-te-check-enable;
|
||||
qcom,mdss-dsi-te-using-te-pin;
|
||||
qcom,mdss-dsi-t-clk-post = <0x07>;
|
||||
qcom,mdss-dsi-t-clk-pre = <0x29>;
|
||||
qcom,mdss-dsi-bl-min-level = <1>;
|
||||
qcom,mdss-dsi-bl-max-level = <1023>;
|
||||
qcom,mdss-dsi-dma-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-mdp-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
|
||||
qcom,mdss-dsi-lp11-init;
|
||||
qcom,mdss-dsi-init-delay-us = <10000>;
|
||||
qcom,mdss-dsi-reset-sequence = <1 2>,<0 2>, <1 2>;
|
||||
/*qcom,mdss-dsi-panel-inverted;*/
|
||||
qcom,mdss-pan-physical-width-dimension = <68>;
|
||||
qcom,mdss-pan-physical-height-dimension = <122>;
|
||||
qcom,mdss-tear-check-frame-rate=<6000>;
|
||||
//qcom,mdss-tear-check-sync-cfg-height = <1932>; /* Height + VBP + VFP + VSW */
|
||||
//qcom,mdss-tear-check-sync-init-val= <1920>; /* Height */
|
||||
// qcom,mdss-tear-check-sync-threshold-start = <4>;
|
||||
// qcom,mdss-tear-check-sync-threshold-continue = <4>;
|
||||
// qcom,mdss-tear-check-start-pos= <1920>; /* Height */
|
||||
// qcom,mdss-tear-check-rd-ptr-trigger-intr= <1921>; /* Height + 1 */
|
||||
|
||||
qcom,mdss-dsi-high-brightness-panel;
|
||||
qcom,mdss-dsi-panel-acl-command = [15 01 00 00 00 00 02 55 00];
|
||||
qcom,mdss-dsi-acl-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-acl-ncmds = <0>;
|
||||
qcom,mdss-dsi-acl-npayload = <1>;
|
||||
qcom,mdss-dsi-panel-hbm-on-command = [15 01 00 00 00 00 02 53 E8];
|
||||
qcom,mdss-dsi-panel-hbm-off-command = [15 01 00 00 00 00 02 53 28];
|
||||
qcom,mdss-dsi-hbm-command-state = "dsi_hs_mode";
|
||||
/******************************************************************************/
|
||||
// if you need read the lcd register value you can modify the qcom,mdss-dsi-id-command
|
||||
qcom,mdss-dsi-read-reg-enable-command = [39 01 00 00 00 00 03 F0 5A 5A];
|
||||
qcom,mdss-dsi-read-reg-disable-command = [29 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-packetsizetxcmds-command = [37 01 00 00 00 00 02 07 00];
|
||||
qcom,mdss-dsi-readpostxcmds-command = [15 01 00 00 00 00 02 B0 00];
|
||||
qcom,mdss-dsi-id-command = [ 06 01 00 00 00 00 01 C3 0A 19]; //read C3 25~35th , 25=0x19
|
||||
qcom,mdss-dsi-packetsizetxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-readpostxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-enable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-disable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-id-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-panel-orientation = "180";
|
||||
|
||||
qcom,mdss-dsi-panel-srgb-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 80 01
|
||||
39 01 00 00 00 00 02 C3 13
|
||||
39 01 00 00 00 00 02 B0 0E
|
||||
39 01 00 00 00 00 16 C3 A0 02 04 3B C7 12 08 07 A8 4B E7 C9 BF 0A B9 E3 DA 18 FF F6 D4
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-panel-srgb-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 80 00
|
||||
39 01 00 00 00 00 02 C3 10
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-srgb-command-state = "dsi_hs_mode";
|
||||
|
||||
qcom,mdss-dsi-panel-dci-p3-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 80 01
|
||||
39 01 00 00 00 00 02 C3 13
|
||||
39 01 00 00 00 00 02 B0 0E
|
||||
39 01 00 00 00 00 16 C3 C6 00 00 16 D2 00 04 08 C3 1C F1 CF E2 02 CE E9 DF 00 FF F6 D4
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-panel-dci-p3-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 80 00
|
||||
39 01 00 00 00 00 02 C3 10
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-dci-p3-command-state = "dsi_hs_mode";
|
||||
/*****************************************************************************/
|
||||
qcom,mdss-dsi-panel-night-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 80 01
|
||||
39 01 00 00 00 00 02 C3 13
|
||||
39 01 00 00 00 00 02 B0 0E
|
||||
39 01 00 00 00 00 16 C3 A0 02 04 3B C7 12 08 07 A8 4B E7 C9 BF 0A B9 E3 DA 18 FF FE FA
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-panel-night-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 80 00
|
||||
39 01 00 00 00 00 02 C3 10
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-night-mode-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-read-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 80 01
|
||||
39 01 00 00 00 00 02 C3 13
|
||||
39 01 00 00 00 00 02 B0 0E
|
||||
39 01 00 00 00 00 16 C3 A0 02 04 3B C7 12 08 07 A8 4B E7 C9 BF 0A B9 E3 DA 18 FF FF FF
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-panel-read-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 80 00
|
||||
39 01 00 00 00 00 02 C3 10
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
|
||||
];
|
||||
qcom,mdss-dsi-read-mode-command-state = "dsi_hs_mode";
|
||||
|
||||
|
||||
/**************************************************************************/
|
||||
};
|
||||
};
|
236
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fc1_cmd.dtsi
Normal file
236
arch/arm/boot/dts/qcom/dsi-panel-samsung_s6e3fc1_cmd.dtsi
Normal file
|
@ -0,0 +1,236 @@
|
|||
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
dsi_samsung_s6e3fc1_cmd: qcom,mdss_dsi_samsung_s6e3fc1_cmd {
|
||||
qcom,cont-splash-enabled;
|
||||
qcom,mdss-dsi-panel-name = "samsung s6e3fc1 cmd mode dsi panel";
|
||||
qcom,mdss-dsi-panel-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-version = "S6E3FC1";
|
||||
qcom,mdss-dsi-backlight-version = "SAMSUNG";
|
||||
qcom,mdss-dsi-backlight-manufacture = "SAMSUNG";
|
||||
qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
|
||||
qcom,mdss-dsi-panel-type = "dsi_cmd_mode";
|
||||
qcom,mdss-dsi-panel-destination = "display_1";
|
||||
qcom,mdss-dsi-panel-framerate = <60>;
|
||||
qcom,mdss-dsi-virtual-channel-id = <0>;
|
||||
qcom,mdss-dsi-stream = <0>;
|
||||
qcom,mdss-dsi-panel-width = <1080>;
|
||||
qcom,mdss-dsi-panel-height = <2160>;
|
||||
qcom,mdss-dsi-h-front-porch = <128>;
|
||||
qcom,mdss-dsi-h-back-porch = <64>;
|
||||
qcom,mdss-dsi-h-pulse-width = <16>;
|
||||
qcom,mdss-dsi-h-sync-skew = <0>;
|
||||
qcom,mdss-dsi-v-back-porch = <4>;
|
||||
qcom,mdss-dsi-v-front-porch = <18>;
|
||||
qcom,mdss-dsi-v-pulse-width = <2>;
|
||||
qcom,mdss-dsi-h-left-border = <0>;
|
||||
qcom,mdss-dsi-h-right-border = <0>;
|
||||
qcom,mdss-dsi-v-top-border = <0>;
|
||||
qcom,mdss-dsi-v-bottom-border = <0>;
|
||||
qcom,mdss-dsi-bpp = <24>;
|
||||
qcom,mdss-dsi-color-order = "rgb_swap_rgb";
|
||||
qcom,mdss-dsi-underflow-color = <0xff>;
|
||||
qcom,mdss-dsi-border-color = <0>;
|
||||
qcom,mdss-dsi-on-command = [
|
||||
05 01 00 00 19 00 02 11 00
|
||||
15 01 00 00 00 00 02 35 00
|
||||
39 01 00 00 00 00 03 FC 5A 5A
|
||||
39 01 00 00 00 00 04 E8 64 08 0C
|
||||
39 01 00 00 00 00 03 FC A5 A5
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 02 B0 01
|
||||
39 01 00 00 00 00 02 ED 04
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
15 01 00 00 00 00 02 53 20
|
||||
15 01 00 00 00 00 02 55 00
|
||||
05 01 00 00 00 00 02 29 00
|
||||
];
|
||||
|
||||
qcom,mdss-dsi-off-command = [05 01 00 00 0A 00 02 28 00
|
||||
05 01 00 00 A0 00 02 10 00];
|
||||
qcom,mdss-dsi-post-panel-on-command = [05 01 00 00 00 00 02 29 00];
|
||||
qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-h-sync-pulse = <1>;
|
||||
qcom,mdss-dsi-traffic-mode = "burst_mode";
|
||||
qcom,mdss-dsi-lane-map = "lane_map_0123";
|
||||
qcom,mdss-dsi-bllp-eof-power-mode;
|
||||
qcom,mdss-dsi-bllp-power-mode;
|
||||
qcom,mdss-dsi-lane-0-state;
|
||||
qcom,mdss-dsi-lane-1-state;
|
||||
qcom,mdss-dsi-lane-2-state;
|
||||
qcom,mdss-dsi-lane-3-state;
|
||||
qcom,mdss-dsi-panel-timings = [00 20 07 07 0c 12 06 08 06 03 04 00];
|
||||
qcom,mdss-dsi-te-pin-select = <1>;
|
||||
qcom,mdss-dsi-te-v-sync-rd-ptr-irq-line = <0x2c>;
|
||||
qcom,mdss-dsi-te-v-sync-continue-lines = <0x3c>;
|
||||
qcom,mdss-dsi-te-dcs-command = <1>;
|
||||
qcom,esd-check-enabled;
|
||||
qcom,mdss-dsi-panel-status-check-mode = "te_signal_check";
|
||||
qcom,mdss-dsi-te-check-enable;
|
||||
qcom,mdss-dsi-te-using-te-pin;
|
||||
qcom,mdss-dsi-t-clk-post = <0x08>;
|
||||
qcom,mdss-dsi-t-clk-pre = <0x30>;
|
||||
qcom,mdss-dsi-bl-min-level = <1>;
|
||||
qcom,mdss-dsi-bl-max-level = <1023>;
|
||||
qcom,mdss-dsi-dma-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-mdp-trigger = "trigger_sw";
|
||||
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
|
||||
qcom,mdss-dsi-lp11-init;
|
||||
qcom,mdss-dsi-init-delay-us = <10000>;
|
||||
qcom,mdss-dsi-reset-sequence = <1 2>,<0 2>, <1 2>;
|
||||
/*qcom,mdss-dsi-panel-inverted;*/
|
||||
qcom,mdss-pan-physical-width-dimension = <68>;
|
||||
qcom,mdss-pan-physical-height-dimension = <137>;
|
||||
qcom,mdss-tear-check-frame-rate=<6000>;
|
||||
/* Height + VBP + VFP + VSW */
|
||||
//qcom,mdss-tear-check-sync-cfg-height = <1932>;
|
||||
//qcom,mdss-tear-check-sync-init-val= <1920>; /* Height */
|
||||
//qcom,mdss-tear-check-sync-threshold-start = <4>;
|
||||
//qcom,mdss-tear-check-sync-threshold-continue = <4>;
|
||||
//qcom,mdss-tear-check-start-pos= <1920>; /* Height */
|
||||
//qcom,mdss-tear-check-rd-ptr-trigger-intr= <1921>; /* Height + 1 */
|
||||
qcom,mdss-brightness-max-level = <1023>;
|
||||
qcom,mdss-dsi-high-brightness-panel;
|
||||
qcom,mdss-dsi-panel-acl-command = [15 01 00 00 00 00 02 55 00];
|
||||
qcom,mdss-dsi-acl-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-acl-ncmds = <0>;
|
||||
qcom,mdss-dsi-acl-npayload = <1>;
|
||||
qcom,mdss-dsi-panel-hbm-on-command = [15 01 00 00 00 00 02 53 E8];
|
||||
qcom,mdss-dsi-panel-hbm-off-command = [15 01 00 00 00 00 02 53 28];
|
||||
qcom,mdss-dsi-hbm-command-state = "dsi_hs_mode";
|
||||
/**************************************/
|
||||
//if you need read the lcd register value
|
||||
//you can modify the qcom,mdss-dsi-id-command
|
||||
qcom,mdss-dsi-read-reg-enable-command = [39 01 00 00 00 00 03 F0 5A 5A];
|
||||
qcom,mdss-dsi-read-reg-disable-command = [29 01 00 00 00 00 03 F0 A5 A5];
|
||||
qcom,mdss-dsi-packetsizetxcmds-command = [37 01 00 00 00 00 02 07 00];
|
||||
qcom,mdss-dsi-readpostxcmds-command = [15 01 00 00 00 00 02 B0 00];
|
||||
//read C3 25~35th , 25=0x19
|
||||
qcom,mdss-dsi-id-command = [ 06 01 00 00 00 00 01 C3 0A 19];
|
||||
qcom,mdss-dsi-packetsizetxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-readpostxcmds-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-enable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-read-reg-disable-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-id-command-state = "dsi_lp_mode";
|
||||
qcom,mdss-bl-high2bit;
|
||||
qcom,mdss-dsi-tx-eot-append;
|
||||
qcom,mdss-dsi-panel-seria-num-command = [06 01 00 00 00 00 01 A1];
|
||||
qcom,mdss-dsi-panel-seria-num-state = "dsi_lp_mode";
|
||||
qcom,mdss-dsi-panel-seria-num-year-index = <12>;
|
||||
qcom,mdss-dsi-panel-seria-num-mon-index = <12>;
|
||||
qcom,mdss-dsi-panel-seria-num-day-index = <13>;
|
||||
qcom,mdss-dsi-panel-seria-num-hour-index = <14>;
|
||||
qcom,mdss-dsi-panel-seria-num-min-index = <15>;
|
||||
|
||||
qcom,mdss-dsi-panel-srgb-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 BC 01
|
||||
39 01 00 00 00 00 02 B0 01
|
||||
39 01 00 00 00 00 02 BC 12
|
||||
39 01 00 00 00 00 02 B0 2C
|
||||
39 01 00 00 00 00 16 bc A3 05 04 46 cd 10 05 09 b0 57 ef cf bb 11 bf e1 da 17 ff f9 d8
|
||||
39 01 00 00 00 00 02 b0 42
|
||||
39 01 00 00 00 00 02 bc 03
|
||||
39 01 00 00 00 00 02 b0 4B
|
||||
39 01 00 00 00 00 02 bc A1
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-panel-srgb-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 BC E0 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-srgb-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-dci-p3-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 02 BC 01
|
||||
39 01 00 00 00 00 02 B0 01
|
||||
39 01 00 00 00 00 02 BC 12
|
||||
39 01 00 00 00 00 02 B0 2C
|
||||
39 01 00 00 00 00 16 BC C6 00 00 1e cf 00 06 0a c3 26 ef cd e0 04 ce e9 df 00 ff f9 d8
|
||||
39 01 00 00 00 00 02 b0 42
|
||||
39 01 00 00 00 00 02 bc 03
|
||||
39 01 00 00 00 00 02 b0 4B
|
||||
39 01 00 00 00 00 02 bc A1
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-panel-dci-p3-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 BC E0 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-dci-p3-command-state = "dsi_hs_mode";
|
||||
/*****************************************************************************/
|
||||
qcom,mdss-dsi-panel-night-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5A 5A
|
||||
39 01 00 00 00 00 03 BC 01 12
|
||||
39 01 00 00 00 00 02 B0 2C
|
||||
39 01 00 00 00 00 16 BC A0 02 04 3B C7 12 08 07 A8 4B E7 C9 BF 0A B9 E3 DA 18 FF FE FA
|
||||
39 01 00 00 00 00 03 f0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-panel-night-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 BC E0 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-night-mode-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-oneplus-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5a 5a
|
||||
39 01 00 00 00 00 03 bc 01 12
|
||||
39 01 00 00 00 00 02 b0 2c
|
||||
39 01 00 00 00 00 16 bc b4 02 04 05 ff 02 00 00 ff 00 ff ff f0 00 f0 e0 e1 18 ff fe fB
|
||||
39 01 00 00 00 00 03 f0 a5 a5
|
||||
39 01 00 00 00 00 03 f0 5a 5a
|
||||
39 01 00 00 00 00 02 bc 01
|
||||
39 01 00 00 00 00 02 b0 42
|
||||
39 01 00 00 00 00 02 bc 03
|
||||
39 01 00 00 00 00 02 b0 4b
|
||||
39 01 00 00 00 00 02 bc 01
|
||||
39 01 00 00 00 00 03 f0 a5 a5
|
||||
];
|
||||
qcom,mdss-dsi-panel-oneplus-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 BC E0 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-read-mode-command-state = "dsi_hs_mode";
|
||||
qcom,mdss-dsi-panel-adaption-mode-on-command = [
|
||||
39 01 00 00 00 00 03 f0 5a 5a
|
||||
39 01 00 00 00 00 03 bc 01 12
|
||||
39 01 00 00 00 00 02 b0 2c
|
||||
39 01 00 00 00 00 16 bc B8 03 04 45 E2 10 04 07 C1 4B EB D7 B8 0A BF FF ED 14 FF FF FA
|
||||
39 01 00 00 00 00 03 f0 a5 a5
|
||||
39 01 00 00 00 00 03 f0 5a 5a
|
||||
39 01 00 00 00 00 02 bc 01
|
||||
39 01 00 00 00 00 02 b0 42
|
||||
39 01 00 00 00 00 02 bc 03
|
||||
39 01 00 00 00 00 02 b0 4b
|
||||
39 01 00 00 00 00 02 bc 01
|
||||
39 01 00 00 00 00 03 f0 a5 a5
|
||||
];
|
||||
qcom,mdss-dsi-panel-adaption-mode-off-command = [
|
||||
39 01 00 00 00 00 03 F0 5A 5A
|
||||
39 01 00 00 00 00 03 BC E0 00
|
||||
39 01 00 00 00 00 03 F0 A5 A5
|
||||
];
|
||||
qcom,mdss-dsi-adaption-mode-command-state = "dsi_hs_mode";
|
||||
|
||||
/**************************************************************************/
|
||||
};
|
||||
};
|
1114
arch/arm/boot/dts/qcom/dumpling-Second_Resource.dtsi
Normal file
1114
arch/arm/boot/dts/qcom/dumpling-Second_Resource.dtsi
Normal file
File diff suppressed because it is too large
Load diff
1114
arch/arm/boot/dts/qcom/dumpling-dvt.dtsi
Normal file
1114
arch/arm/boot/dts/qcom/dumpling-dvt.dtsi
Normal file
File diff suppressed because it is too large
Load diff
1114
arch/arm/boot/dts/qcom/dumpling-pvt.dtsi
Normal file
1114
arch/arm/boot/dts/qcom/dumpling-pvt.dtsi
Normal file
File diff suppressed because it is too large
Load diff
26
arch/arm/boot/dts/qcom/dumpling-v2.1-Second_Resource.dts
Normal file
26
arch/arm/boot/dts/qcom/dumpling-v2.1-Second_Resource.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "dumpling.dtsi"
|
||||
#include "dumpling-Second_Resource.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 17801 53>;
|
||||
};
|
26
arch/arm/boot/dts/qcom/dumpling-v2.1-dvt.dts
Normal file
26
arch/arm/boot/dts/qcom/dumpling-v2.1-dvt.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "dumpling.dtsi"
|
||||
#include "dumpling-dvt.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 17801 42>;
|
||||
};
|
26
arch/arm/boot/dts/qcom/dumpling-v2.1-pvt.dts
Normal file
26
arch/arm/boot/dts/qcom/dumpling-v2.1-pvt.dts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "msm8998-v2.1.dtsi"
|
||||
#include "msm8998-mdss-panels.dtsi"
|
||||
#include "msm8998-mtp.dtsi"
|
||||
#include "dumpling.dtsi"
|
||||
#include "dumpling-pvt.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Qualcomm Technologies, Inc. MSM 8998 v2.1 MTP";
|
||||
compatible = "qcom,msm8998-mtp", "qcom,msm8998", "qcom,mtp";
|
||||
qcom,board-id = <8 0 17801 43>;
|
||||
};
|
1052
arch/arm/boot/dts/qcom/dumpling.dtsi
Executable file
1052
arch/arm/boot/dts/qcom/dumpling.dtsi
Executable file
File diff suppressed because it is too large
Load diff
|
@ -43,6 +43,10 @@
|
|||
qcom,pon-type = <0>;
|
||||
qcom,pull-up = <1>;
|
||||
linux,code = <116>;
|
||||
qcom,support-reset = <1>;
|
||||
qcom,s1-timer = <10256>;
|
||||
qcom,s2-timer = <2000>;
|
||||
qcom,s2-type = <7>;
|
||||
};
|
||||
|
||||
qcom,pon_2 {
|
||||
|
|
|
@ -342,7 +342,8 @@
|
|||
qcom,fg-esr-timer-charging = <0 96>;
|
||||
qcom,cycle-counter-en;
|
||||
status = "okay";
|
||||
|
||||
qcom,fg-sys-term-current = <190>;
|
||||
qcom,fg-chg-term-current = <180>;
|
||||
qcom,fg-batt-soc@4000 {
|
||||
status = "okay";
|
||||
reg = <0x4000 0x100>;
|
||||
|
|
|
@ -347,17 +347,17 @@
|
|||
&cam_sensor_front_suspend &led_disable>;
|
||||
gpios = <&tlmm 14 0>,
|
||||
<&tlmm 28 0>,
|
||||
<&pm8998_gpios 9 0>,
|
||||
<&tlmm 21 0>;
|
||||
<&pm8998_gpios 9 0>/* delete by xcb, gpio 21 are used by lcd,
|
||||
<&tlmm 21 0>*/;
|
||||
qcom,gpio-reset = <1>;
|
||||
qcom,gpio-vdig = <2>;
|
||||
qcom,gpio-flash-en = <3>;
|
||||
qcom,gpio-req-tbl-num = <0 1 2 3>;
|
||||
qcom,gpio-req-tbl-flags = <1 0 0 0>;
|
||||
/*qcom,gpio-flash-en = <3>;*/
|
||||
qcom,gpio-req-tbl-num = <0 1 2 /*3*/>;
|
||||
qcom,gpio-req-tbl-flags = <1 0 0 /*0*/>;
|
||||
qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
|
||||
"CAM_RESET2",
|
||||
"CAM_VDIG",
|
||||
"FLASH_EN";
|
||||
"CAM_VDIG"/*,
|
||||
"FLASH_EN"*/;
|
||||
qcom,sensor-position = <1>;
|
||||
qcom,sensor-mode = <0>;
|
||||
qcom,cci-master = <1>;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
*/
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "msm8998-camera-sensor-mtp.dtsi"
|
||||
//#include "msm8998-camera-sensor-mtp.dtsi"
|
||||
&vendor {
|
||||
bluetooth: bt_wcn3990 {
|
||||
compatible = "qca,wcn3990";
|
||||
|
@ -150,16 +150,6 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
gpio@d200 { /* GPIO 19 - wil6210 refclk3_en */
|
||||
qcom,mode = <0>; /* Input */
|
||||
qcom,pull = <5>; /* No Pull */
|
||||
qcom,vin-sel = <1>; /* VIN1 GPIO_MV */
|
||||
qcom,src-sel = <0>; /* GPIO */
|
||||
qcom,invert = <0>; /* Invert */
|
||||
qcom,master-en = <1>; /* Enable GPIO */
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* GPIO 21 (NFC_CLK_REQ) */
|
||||
gpio@d400 {
|
||||
qcom,mode = <0>;
|
||||
|
@ -614,6 +604,7 @@
|
|||
&vendor {
|
||||
mtp_batterydata: qcom,battery-data {
|
||||
qcom,batt-id-range-pct = <15>;
|
||||
#include "OP-batterydata-3300mah.dtsi"
|
||||
#include "fg-gen3-batterydata-itech-3000mah.dtsi"
|
||||
#include "fg-gen3-batterydata-ascent-3450mah.dtsi"
|
||||
#include "fg-gen3-batterydata-demo-6000mah.dtsi"
|
||||
|
|
|
@ -1121,10 +1121,10 @@
|
|||
<0x01fcb24c 0x4>,
|
||||
<0x00784238 0x4>;
|
||||
reg-names = "qusb_phy_base",
|
||||
"tcsr_clamp_dig_n_1p8",
|
||||
"efuse_addr";
|
||||
qcom,efuse-bit-pos = <16>;
|
||||
qcom,efuse-num-bits = <4>;
|
||||
"tcsr_clamp_dig_n_1p8";
|
||||
// "efuse_addr";
|
||||
// qcom,efuse-bit-pos = <16>;
|
||||
// qcom,efuse-num-bits = <4>;
|
||||
qcom,qusb-phy-init-seq =
|
||||
/* <value reg_offset> */
|
||||
<0x13 0x04 /* analog_controls_two */
|
||||
|
|
|
@ -292,7 +292,15 @@
|
|||
dev = "/dev/block/platform/soc/1da4000.ufshc/by-name/vendor";
|
||||
type = "ext4";
|
||||
mnt_flags = "ro,barrier=1,discard";
|
||||
fsmgr_flags = "wait,slotselect,verify";
|
||||
fsmgr_flags = "wait,verify";
|
||||
status = "ok";
|
||||
};
|
||||
system {
|
||||
compatible = "android,system";
|
||||
dev = "/dev/block/platform/soc/1da4000.ufshc/by-name/system";
|
||||
type = "ext4";
|
||||
mnt_flags = "ro,barrier=1,discard";
|
||||
fsmgr_flags = "wait,verify";
|
||||
status = "ok";
|
||||
};
|
||||
};
|
||||
|
|
87
arch/arm/boot/dts/qcom/pxlw-iris-samsung_s6e3fa3.dtsi
Normal file
87
arch/arm/boot/dts/qcom/pxlw-iris-samsung_s6e3fa3.dtsi
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*---------------------------------------------------------------------------
|
||||
* Iris2p Setting for Samsung S6e3fa3 Panel
|
||||
*---------------------------------------------------------------------------*/
|
||||
/* iris mipi mode */
|
||||
qcom,iris-mipitx-type = "dsi_cmd_mode"; /* dsi_video_mode/dsi_cmd_mode */
|
||||
qcom,iris-mipirx-channel = <0x1>; /*dual channel*/
|
||||
qcom,iris-mipitx-channel = <0x1>;
|
||||
qcom,iris-mipirx-dsc = <0x0>; /*non DSC*/
|
||||
qcom,iris-mipitx-dsc = <0x0>;
|
||||
qcom,iris-mipirx-pxl-mode = <0x0>;
|
||||
qcom,iris-mipitx-pxl-mode = <0x1>;
|
||||
|
||||
qcom,mdss-dsi-on-command-to-video-panel = [
|
||||
05 01 00 00 32 00 02 11 00
|
||||
29 01 00 00 00 00 03 F0 5A 5A
|
||||
29 01 00 00 00 00 02 B9 01
|
||||
29 01 00 00 00 00 03 F0 A5 A5
|
||||
29 01 00 00 00 00 03 F0 5A 5A
|
||||
29 01 00 00 00 00 03 FC 5A 5A
|
||||
29 01 00 00 00 00 03 F4 00 01
|
||||
29 01 00 00 00 00 02 C0 32
|
||||
29 01 00 00 00 00 02 F7 03
|
||||
29 01 00 00 00 00 03 F0 A5 A5
|
||||
29 01 00 00 00 00 03 FC A5 A5
|
||||
29 01 00 00 00 00 02 53 20
|
||||
29 01 00 00 00 00 02 57 40
|
||||
29 01 00 00 00 00 02 55 00
|
||||
//05 01 00 00 10 00 02 29 00
|
||||
];
|
||||
qcom,mdss-dsi-on-command-to-video-panel-state = "dsi_lp_mode";
|
||||
|
||||
qcom,mdss-dsi-off-command-to-video-panel = [
|
||||
39 01 00 00 32 00 02 28 00
|
||||
39 01 00 00 78 00 02 10 00
|
||||
];
|
||||
qcom,mdss-dsi-off-command-to-video-panel-state = "dsi_hs_mode";
|
||||
|
||||
qcom,mdss-dsi-on-command-to-iris-mipirx = [
|
||||
15 01 00 00 01 00 02 3a 77 /* rgb_888 */
|
||||
15 01 00 00 01 00 02 35 00 /* set tearing on */
|
||||
39 01 00 00 01 00 05 2a 00 00 04 37
|
||||
39 01 00 00 01 00 05 2b 00 00 07 7f
|
||||
];
|
||||
qcom,mdss-dsi-on-command-to-iris-mipirx-state = "dsi_hs_mode";
|
||||
/* iris sys */
|
||||
qcom,iris-pll-setting = <
|
||||
0x0002 0x430901 0x655555 /*PPLL_CTRL0 PPLL_CTRL1 PPLL_CTRL2*/
|
||||
0x2002 0x201101 0x41D97F /*DPLL_CTRL0 DPLL_CTRL1 DPLL_CTRL2*/
|
||||
0x003f 0x3E0901 0x800000 /*MPLL_CTRL0 MPLL_CTRL1 MPLL_CTRL2*/
|
||||
0x0000 0x000002 0x000000 /*TXPLL_DIV TXPLL_SEL reserved*/
|
||||
>;
|
||||
qcom,iris-clock-setting = [01 01 09 12 09 72]; /* Dclk Inclk Mcuclk Pclk Mclk Escclk */
|
||||
|
||||
iris,analog-bypass-mode-enabled;
|
||||
|
||||
/* iris mipi rx */
|
||||
qcom,mipirx-dsi-functional-program = <0x64>;
|
||||
qcom,mipirx-data-lane-timing-param = <0xFF08>;
|
||||
qcom,mipirx-eot-ecc-crc-disable = <0x7>;
|
||||
|
||||
/* iris2p mipitx */
|
||||
qcom,mipitx-dsi-tx-ctrl = <0xA00C139>;
|
||||
qcom,mipitx-hs-tx-timer = <0x762125>;
|
||||
qcom,mipitx-bta-lp-timer = <0xFFFF17>;
|
||||
qcom,mipitx-initialization-reset-timer = <0xA8C078F>;
|
||||
qcom,mipitx-dphy-timing-margin = <0x40401>;
|
||||
qcom,mipitx-lp-timing-para = <0xE010006>;
|
||||
qcom,mipitx-data-lane-timing-param1 = <0x120B1005>;
|
||||
qcom,mipitx-clock-lane-timing-param = <0x120A2805>;
|
||||
qcom,mipitx-dphy-pll-para = <0x78F>;
|
||||
qcom,mipitx-dphy-trim-1 = <0xEDB5380C>;
|
||||
|
||||
|
||||
/*iris out timing*/
|
||||
qcom,iris-out-panel-width = <1080>;
|
||||
qcom,iris-out-panel-height = <1920>;
|
||||
qcom,iris-out-h-pulse-width = <19>;
|
||||
qcom,iris-out-h-back-porch = <70>;
|
||||
qcom,iris-out-h-front-porch = <120>;
|
||||
qcom,iris-out-v-pulse-width = <2>;
|
||||
qcom,iris-out-v-back-porch = <4>;
|
||||
qcom,iris-out-v-front-porch = <76>;
|
||||
|
||||
qcom,iris-delta-period-min = <50>;
|
||||
qcom,iris-delta-period-max = <58>;
|
||||
qcom,iris-reset-sequence = <0 3>,<1 2>;
|
||||
qcom,iris-enabled;
|
110
arch/arm/boot/dts/qcom/pxlw-iris-settings.dtsi
Normal file
110
arch/arm/boot/dts/qcom/pxlw-iris-settings.dtsi
Normal file
|
@ -0,0 +1,110 @@
|
|||
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* This file is autogenerated file using gcdb parser. Please do not edit it.
|
||||
* Update input XML file to add a new entry or update variable in this file
|
||||
* VERSION = "1.0"
|
||||
*---------------------------------------------------------------------------*/
|
||||
&mdss_mdp {
|
||||
pxlw_iris_settings: pxlw,mdss_iris_settings {
|
||||
/*iris last frame repeat cnt*/
|
||||
pxlw,iris-last-frame-repeat-cnt = <0x00>;
|
||||
|
||||
/*disable dbc settings*/
|
||||
pxlw,iris-disable-dbc-dlv-sensitivity = <0x00>;
|
||||
pxlw,iris-disable-dbc-quality = <0x00>;
|
||||
|
||||
/*disable pq settings*/
|
||||
pxlw,iris-disable-pq-peaking = <0x00>;
|
||||
pxlw,iris-disable-pq-peaking-demo= <0x00>;
|
||||
pxlw,iris-disable-pq-gamma = <0x00>;
|
||||
pxlw,iris-disable-pq-contrast = <0x32>;
|
||||
|
||||
/*disable lce setting*/
|
||||
pxlw,iris-disable-lce = <0x00>;
|
||||
|
||||
/*disable cm*/
|
||||
pxlw,iris-disable-cm-c6axes = <0x00>;
|
||||
pxlw,iris-disable-cm-c3d = <0x00>;
|
||||
pxlw,iris-disable-cm-fleshtone = <0x00>;
|
||||
pxlw,iris-disable-color-temp-en = <0x00>;
|
||||
pxlw,iris-disable-reading-mode = <0x00>;
|
||||
/*disable color adjust*/
|
||||
pxlw,iris-disable-color-adjust = <0x32>;
|
||||
|
||||
/*use analog bypass or bypass*/
|
||||
pxlw,iris-is-analog-bypass = <0x1>;
|
||||
|
||||
/*default setting for APPCODE init data */
|
||||
pxlw,iris-pq-peaking-default = <0x00>;
|
||||
pxlw,iris-pq-sharpness-default = <0x00>;
|
||||
pxlw,iris-pq-memc-demo-mode-default = <0x00>;
|
||||
pxlw,iris-pq-peaking-demo-mode-default = <0x00>;
|
||||
pxlw,iris-pq-gamma-mode-default = <0x00>;
|
||||
pxlw,iris-pq-memclevel-default = <0x03>;
|
||||
pxlw,iris-pq-contrast-default = <0x32>;
|
||||
pxlw,iris-pq-cinema-default = <0x00>;
|
||||
|
||||
pxlw,iris-cabcmode-default = <0x01>;
|
||||
|
||||
pxlw,iris-color-adjust-default = <0x32>;
|
||||
|
||||
pxlw,iris-lce-mode-default = <0x00>;
|
||||
pxlw,iris-lce-mode1-level-default = <0x01>;
|
||||
pxlw,iris-lce-mode2-level-default = <0x01>;
|
||||
pxlw,iris-lce-demo-mode-default = <0x00>;
|
||||
pxlw,iris-lux-value-default = <0x00>;
|
||||
pxlw,iris-cct-value-default = <0x00>;
|
||||
|
||||
pxlw,iris-reading-mode-default = <0x00>;
|
||||
|
||||
pxlw,iris-cm-6axes-default = <0x00>;
|
||||
pxlw,iris-cm-3d-default = <0x00>;
|
||||
pxlw,iris-cm-demo-mode-default = <0x00>;
|
||||
pxlw,iris-cm-fleshtone-default = <0x00>;
|
||||
pxlw,iris-color-temp-en-default = <0x00>;
|
||||
pxlw,iris-color-temp-default = <0x00>;
|
||||
pxlw,iris-sensor-auto-en-default = <0x00>;
|
||||
|
||||
/* setting for AP init data */
|
||||
pxlw,iris-pq-peaking-init = <0x00>;
|
||||
pxlw,iris-pq-sharpness-init = <0x00>;
|
||||
pxlw,iris-pq-memc-demo-mode-init = <0x00>;
|
||||
pxlw,iris-pq-peaking-demo-mode-init = <0x00>;
|
||||
pxlw,iris-pq-gamma-mode-init = <0x00>;
|
||||
pxlw,iris-pq-memclevel-init = <0x03>;
|
||||
pxlw,iris-pq-contrast-init = <0x32>;
|
||||
pxlw,iris-pq-cinema-init = <0x00>;
|
||||
|
||||
pxlw,iris-cabcmode-init = <0x00>;
|
||||
|
||||
pxlw,iris-color-adjust-init = <0x32>;
|
||||
|
||||
pxlw,iris-lce-mode-init = <0x00>;
|
||||
pxlw,iris-lce-mode1-level-init = <0x01>;
|
||||
pxlw,iris-lce-mode2-level-init = <0x01>;
|
||||
pxlw,iris-lce-demo-mode-init = <0x00>;
|
||||
|
||||
pxlw,iris-lux-value-init = <0x00>;
|
||||
pxlw,iris-cct-value-init = <0x00>;
|
||||
pxlw,iris-reading-mode-init = <0x00>;
|
||||
pxlw,iris-cm-6axes-init = <0x00>;
|
||||
pxlw,iris-cm-3d-init = <0x00>;
|
||||
pxlw,iris-cm-demo-mode-init = <0x00>;
|
||||
pxlw,iris-cm-fleshtone-init = <0x00>;
|
||||
pxlw,iris-color-temp-en-init = <0x00>;
|
||||
pxlw,iris-color-temp-init = <0x00>;
|
||||
pxlw,iris-sensor-auto-en-init = <0x00>;
|
||||
};
|
||||
};
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
dts-dirs += altera
|
||||
dts-dirs += amd
|
||||
dts-dirs += apm
|
||||
dts-dirs += arm
|
||||
dts-dirs += broadcom
|
||||
dts-dirs += cavium
|
||||
dts-dirs += exynos
|
||||
dts-dirs += freescale
|
||||
dts-dirs += hisilicon
|
||||
dts-dirs += marvell
|
||||
dts-dirs += mediatek
|
||||
#dts-dirs += altera
|
||||
#dts-dirs += amd
|
||||
#dts-dirs += apm
|
||||
#dts-dirs += arm
|
||||
#dts-dirs += broadcom
|
||||
#dts-dirs += cavium
|
||||
#dts-dirs += exynos
|
||||
#dts-dirs += freescale
|
||||
#dts-dirs += hisilicon
|
||||
#dts-dirs += marvell
|
||||
#dts-dirs += mediatek
|
||||
dts-dirs += qcom
|
||||
dts-dirs += rockchip
|
||||
dts-dirs += sprd
|
||||
dts-dirs += xilinx
|
||||
#dts-dirs += rockchip
|
||||
#dts-dirs += sprd
|
||||
#dts-dirs += xilinx
|
||||
|
||||
subdir-y := $(dts-dirs)
|
||||
|
||||
|
|
|
@ -229,3 +229,5 @@ CONFIG_CRYPTO_CRC32_ARM64=y
|
|||
CONFIG_HIBERNATION=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_CORESIGHT=y
|
||||
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
|
|
|
@ -611,3 +611,4 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
|||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CRC32_ARM64=y
|
||||
CONFIG_QMI_ENCDEC=y
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
|
|
|
@ -596,6 +596,7 @@ CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
|
|||
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
||||
CONFIG_DEBUG_KMEMLEAK=y
|
||||
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
|
||||
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=4000
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_LOCKUP_DETECTOR=y
|
||||
|
@ -649,3 +650,4 @@ CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
|||
CONFIG_CRYPTO_CRC32_ARM64=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_QMI_ENCDEC=y
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
|
|
788
arch/arm64/configs/msmcortex-oqc_defconfig
Normal file
788
arch/arm64/configs/msmcortex-oqc_defconfig
Normal file
|
@ -0,0 +1,788 @@
|
|||
CONFIG_LOCALVERSION="-aging"
|
||||
# CONFIG_USELIB is not set
|
||||
CONFIG_AUDIT=y
|
||||
# CONFIG_AUDITSYSCALL is not set
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_TASK_XACCT=y
|
||||
CONFIG_TASK_IO_ACCOUNTING=y
|
||||
CONFIG_RCU_EXPERT=y
|
||||
CONFIG_RCU_FAST_NO_HZ=y
|
||||
CONFIG_RCU_NOCB_CPU=y
|
||||
CONFIG_RCU_NOCB_CPU_ALL=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_CPU_MAX_BUF_SHIFT=17
|
||||
CONFIG_CGROUP_DEBUG=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_SCHEDTUNE=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_SCHED_HMP=y
|
||||
CONFIG_SCHED_HMP_CSTATE_AWARE=y
|
||||
CONFIG_SCHED_CORE_CTL=y
|
||||
CONFIG_NAMESPACES=y
|
||||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_PID_NS is not set
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_SCHED_TUNE=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_XZ is not set
|
||||
# CONFIG_RD_LZO is not set
|
||||
# CONFIG_RD_LZ4 is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
# CONFIG_MEMBARRIER is not set
|
||||
CONFIG_EMBEDDED=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_CC_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=16
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
# CONFIG_MODULE_SIG=y
|
||||
# CONFIG_MODULE_SIG_FORCE=y
|
||||
# CONFIG_MODULE_SIG_SHA512=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_MSM8998=y
|
||||
CONFIG_ARCH_MSMHAMSTER=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MSM=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_QCOM_TLB_EL2_HANDLER=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_CLEANCACHE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_ZSMALLOC=y
|
||||
CONFIG_BALANCE_ANON_FILE_RECLAIM=y
|
||||
CONFIG_SECCOMP=y
|
||||
CONFIG_ARMV8_DEPRECATED=y
|
||||
CONFIG_SWP_EMULATION=y
|
||||
CONFIG_CP15_BARRIER_EMULATION=y
|
||||
CONFIG_SETEND_EMULATION=y
|
||||
CONFIG_ARM64_SW_TTBR0_PAN=y
|
||||
CONFIG_RANDOMIZE_BASE=y
|
||||
CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE=y
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_PM_AUTOSLEEP=y
|
||||
CONFIG_PM_WAKELOCKS=y
|
||||
CONFIG_PM_WAKELOCKS_LIMIT=0
|
||||
# CONFIG_PM_WAKELOCKS_GC is not set
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_BOOST=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM_USER=y
|
||||
CONFIG_XFRM_STATISTICS=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_IP_ROUTE_VERBOSE=y
|
||||
CONFIG_IP_PNP=y
|
||||
CONFIG_IP_PNP_DHCP=y
|
||||
CONFIG_NET_IPVTI=y
|
||||
CONFIG_INET_AH=y
|
||||
CONFIG_INET_ESP=y
|
||||
CONFIG_INET_IPCOMP=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_INET_UDP_DIAG=y
|
||||
CONFIG_INET_DIAG_DESTROY=y
|
||||
CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_IPV6_ROUTE_INFO=y
|
||||
CONFIG_IPV6_OPTIMISTIC_DAD=y
|
||||
CONFIG_INET6_AH=y
|
||||
CONFIG_INET6_ESP=y
|
||||
CONFIG_INET6_IPCOMP=y
|
||||
CONFIG_IPV6_MIP6=y
|
||||
CONFIG_IPV6_VTI=y
|
||||
CONFIG_IPV6_MULTIPLE_TABLES=y
|
||||
CONFIG_IPV6_SUBTREES=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_NF_CONNTRACK=y
|
||||
CONFIG_NF_CONNTRACK_SECMARK=y
|
||||
CONFIG_NF_CONNTRACK_EVENTS=y
|
||||
CONFIG_NF_CT_PROTO_DCCP=y
|
||||
CONFIG_NF_CT_PROTO_SCTP=y
|
||||
CONFIG_NF_CT_PROTO_UDPLITE=y
|
||||
CONFIG_NF_CONNTRACK_AMANDA=y
|
||||
CONFIG_NF_CONNTRACK_FTP=y
|
||||
CONFIG_NF_CONNTRACK_H323=y
|
||||
CONFIG_NF_CONNTRACK_IRC=y
|
||||
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
|
||||
CONFIG_NF_CONNTRACK_PPTP=y
|
||||
CONFIG_NF_CONNTRACK_SANE=y
|
||||
CONFIG_NF_CONNTRACK_TFTP=y
|
||||
CONFIG_NF_CT_NETLINK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
|
||||
CONFIG_NETFILTER_XT_TARGET_HARDIDLETIMER=y
|
||||
CONFIG_NETFILTER_XT_TARGET_LOG=y
|
||||
CONFIG_NETFILTER_XT_TARGET_MARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TEE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TRACE=y
|
||||
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
|
||||
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
|
||||
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_DSCP=y
|
||||
CONFIG_NETFILTER_XT_MATCH_ESP=y
|
||||
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_HELPER=y
|
||||
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
|
||||
# CONFIG_NETFILTER_XT_MATCH_L2TP is not set
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
|
||||
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_MAC=y
|
||||
CONFIG_NETFILTER_XT_MATCH_MARK=y
|
||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=y
|
||||
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
|
||||
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
|
||||
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
|
||||
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
|
||||
CONFIG_NETFILTER_XT_MATCH_STRING=y
|
||||
CONFIG_NETFILTER_XT_MATCH_TIME=y
|
||||
CONFIG_NETFILTER_XT_MATCH_U32=y
|
||||
CONFIG_NF_CONNTRACK_IPV4=y
|
||||
CONFIG_IP_NF_IPTABLES=y
|
||||
CONFIG_IP_NF_MATCH_AH=y
|
||||
CONFIG_IP_NF_MATCH_ECN=y
|
||||
CONFIG_IP_NF_MATCH_RPFILTER=y
|
||||
CONFIG_IP_NF_MATCH_TTL=y
|
||||
CONFIG_IP_NF_FILTER=y
|
||||
CONFIG_IP_NF_TARGET_REJECT=y
|
||||
CONFIG_IP_NF_NAT=y
|
||||
CONFIG_IP_NF_TARGET_MASQUERADE=y
|
||||
CONFIG_IP_NF_TARGET_NETMAP=y
|
||||
CONFIG_IP_NF_TARGET_REDIRECT=y
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_IP_NF_RAW=y
|
||||
CONFIG_IP_NF_SECURITY=y
|
||||
CONFIG_IP_NF_ARPTABLES=y
|
||||
CONFIG_IP_NF_ARPFILTER=y
|
||||
CONFIG_IP_NF_ARP_MANGLE=y
|
||||
CONFIG_NF_CONNTRACK_IPV6=y
|
||||
CONFIG_IP6_NF_IPTABLES=y
|
||||
CONFIG_IP6_NF_IPTABLES_128=y
|
||||
CONFIG_IP6_NF_MATCH_RPFILTER=y
|
||||
CONFIG_IP6_NF_FILTER=y
|
||||
CONFIG_IP6_NF_TARGET_REJECT=y
|
||||
CONFIG_IP6_NF_MANGLE=y
|
||||
CONFIG_IP6_NF_RAW=y
|
||||
CONFIG_BRIDGE_NF_EBTABLES=y
|
||||
CONFIG_BRIDGE_EBT_BROUTE=y
|
||||
CONFIG_L2TP=y
|
||||
CONFIG_L2TP_DEBUGFS=y
|
||||
CONFIG_L2TP_V3=y
|
||||
CONFIG_L2TP_IP=y
|
||||
CONFIG_L2TP_ETH=y
|
||||
CONFIG_BRIDGE=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_HTB=y
|
||||
CONFIG_NET_SCH_PRIO=y
|
||||
CONFIG_NET_SCH_MULTIQ=y
|
||||
CONFIG_NET_SCH_INGRESS=y
|
||||
CONFIG_NET_CLS_FW=y
|
||||
CONFIG_NET_CLS_U32=y
|
||||
CONFIG_CLS_U32_MARK=y
|
||||
CONFIG_NET_CLS_FLOW=y
|
||||
CONFIG_NET_EMATCH=y
|
||||
CONFIG_NET_EMATCH_CMP=y
|
||||
CONFIG_NET_EMATCH_NBYTE=y
|
||||
CONFIG_NET_EMATCH_U32=y
|
||||
CONFIG_NET_EMATCH_META=y
|
||||
CONFIG_NET_EMATCH_TEXT=y
|
||||
CONFIG_NET_CLS_ACT=y
|
||||
CONFIG_NET_ACT_GACT=y
|
||||
CONFIG_NET_ACT_MIRRED=y
|
||||
CONFIG_NET_ACT_SKBEDIT=y
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_RMNET_DATA=y
|
||||
CONFIG_RMNET_DATA_FC=y
|
||||
CONFIG_RMNET_DATA_DEBUG_PKT=y
|
||||
CONFIG_SOCKEV_NLMCAST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_MSM_BT_POWER=y
|
||||
CONFIG_BTFM_SLIM=y
|
||||
CONFIG_BTFM_SLIM_WCN3990=y
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_CFG80211_CERTIFICATION_ONUS=y
|
||||
CONFIG_CFG80211_REG_CELLULAR_HINTS=y
|
||||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
# CONFIG_CFG80211_CRDA_SUPPORT is not set
|
||||
CONFIG_RFKILL=y
|
||||
# CONFIG_NFC_NQ=y
|
||||
CONFIG_NFC_PN5XX=y
|
||||
CONFIG_NFC_PN80T=y
|
||||
CONFIG_IPC_ROUTER=y
|
||||
CONFIG_IPC_ROUTER_SECURITY=y
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_REGMAP_ALLOW_WRITE_DEBUGFS=y
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_ZRAM=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=8192
|
||||
CONFIG_QSEECOM=y
|
||||
CONFIG_HDCP_QSEECOM=y
|
||||
CONFIG_UID_SYS_STATS=y
|
||||
CONFIG_QPNP_MISC=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_CHR_DEV_SCH=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_SCSI_UFSHCD=y
|
||||
CONFIG_SCSI_UFSHCD_PLATFORM=y
|
||||
CONFIG_SCSI_UFS_QCOM=y
|
||||
CONFIG_SCSI_UFS_QCOM_ICE=y
|
||||
CONFIG_SCSI_UFSHCD_CMD_LOGGING=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_MD=y
|
||||
CONFIG_MD_LINEAR=y
|
||||
CONFIG_BLK_DEV_DM=y
|
||||
CONFIG_DM_CRYPT=y
|
||||
CONFIG_DM_REQ_CRYPT=y
|
||||
CONFIG_DM_UEVENT=y
|
||||
CONFIG_DM_VERITY=y
|
||||
CONFIG_DM_VERITY_FEC=y
|
||||
CONFIG_DM_ANDROID_VERITY=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_BONDING=y
|
||||
CONFIG_DUMMY=y
|
||||
CONFIG_TUN=y
|
||||
CONFIG_MSM_RMNET_MHI=y
|
||||
CONFIG_RNDIS_IPA=y
|
||||
CONFIG_PPP=y
|
||||
CONFIG_PPP_BSDCOMP=y
|
||||
CONFIG_PPP_DEFLATE=y
|
||||
CONFIG_PPP_FILTER=y
|
||||
CONFIG_PPP_MPPE=y
|
||||
CONFIG_PPP_MULTILINK=y
|
||||
CONFIG_PPPOE=y
|
||||
CONFIG_PPPOL2TP=y
|
||||
CONFIG_PPPOLAC=y
|
||||
CONFIG_PPPOPNS=y
|
||||
CONFIG_PPP_ASYNC=y
|
||||
CONFIG_PPP_SYNC_TTY=y
|
||||
CONFIG_USB_USBNET=y
|
||||
CONFIG_WCNSS_MEM_PRE_ALLOC=y
|
||||
CONFIG_ATH_CARDS=y
|
||||
CONFIG_WIL6210=m
|
||||
CONFIG_CLD_LL_CORE=y
|
||||
CONFIG_CNSS_GENL=y
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_KEYRESET=y
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21 is not set
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21 is not set
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI=y
|
||||
CONFIG_INPUT_FINGERPRINT=y
|
||||
CONFIG_FINGERPRINT_DETECT=y
|
||||
CONFIG_FINGERPRINT_FPC=y
|
||||
CONFIG_FINGERPRINT_GOODIX=y
|
||||
CONFIG_SECURE_TOUCH=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_HBTP_INPUT=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_KEYCHORD=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
CONFIG_INPUT_GPIO=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVMEM is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SERIAL_MSM_HS=y
|
||||
CONFIG_SERIAL_MSM_SMD=y
|
||||
CONFIG_DIAG_CHAR=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_MSM_LEGACY=y
|
||||
# CONFIG_DEVPORT is not set
|
||||
CONFIG_MSM_ADSPRPC=y
|
||||
CONFIG_MSM_RDBG=m
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_MSM_V2=y
|
||||
CONFIG_SLIMBUS_MSM_NGD=y
|
||||
CONFIG_SOUNDWIRE=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_QUP=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_SPMI=y
|
||||
CONFIG_PINCTRL_MSM8998=y
|
||||
CONFIG_PINCTRL_SDM660=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_GPIO_QPNP_PIN=y
|
||||
CONFIG_POWER_RESET_QCOM=y
|
||||
CONFIG_QCOM_DLOAD_MODE=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_FG_GEN3=y
|
||||
CONFIG_FG_BQ27541=y
|
||||
CONFIG_ONEPLUS_FASTCHG=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_MSM_BCL_CTL=y
|
||||
CONFIG_MSM_BCL_PERIPHERAL_CTL=y
|
||||
CONFIG_BATTERY_BCL=y
|
||||
CONFIG_QPNP_SMB2=y
|
||||
CONFIG_SMB138X_CHARGER=y
|
||||
CONFIG_QPNP_QNOVO=y
|
||||
CONFIG_MSM_PM=y
|
||||
CONFIG_APSS_CORE_EA=y
|
||||
CONFIG_MSM_APM=y
|
||||
CONFIG_SENSORS_QPNP_ADC_VOLTAGE=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_LIMITS_MONITOR=y
|
||||
CONFIG_LIMITS_LITE_HW=y
|
||||
CONFIG_THERMAL_MONITOR=y
|
||||
CONFIG_THERMAL_TSENS8974=y
|
||||
CONFIG_THERMAL_QPNP=y
|
||||
CONFIG_THERMAL_QPNP_ADC_TM=y
|
||||
CONFIG_QCOM_THERMAL_LIMITS_DCVS=y
|
||||
CONFIG_MFD_SPMI_PMIC=y
|
||||
CONFIG_MFD_I2C_PMIC=y
|
||||
CONFIG_WCD9335_CODEC=y
|
||||
CONFIG_WCD934X_CODEC=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_RPM_SMD=y
|
||||
CONFIG_REGULATOR_QPNP=y
|
||||
CONFIG_REGULATOR_QPNP_LABIBB=y
|
||||
CONFIG_REGULATOR_QPNP_LCDB=y
|
||||
CONFIG_REGULATOR_SPM=y
|
||||
CONFIG_REGULATOR_CPR3_HMSS=y
|
||||
CONFIG_REGULATOR_CPR3_MMSS=y
|
||||
CONFIG_REGULATOR_CPRH_KBSS=y
|
||||
CONFIG_REGULATOR_MEM_ACC=y
|
||||
CONFIG_REGULATOR_PROXY_CONSUMER=y
|
||||
CONFIG_REGULATOR_STUB=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_VIDEO_ADV_DEBUG=y
|
||||
CONFIG_VIDEO_FIXED_MINOR_RANGES=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_MSM_CAMERA=y
|
||||
CONFIG_MSM_CAMERA_DEBUG=y
|
||||
CONFIG_MSMB_CAMERA=y
|
||||
CONFIG_MSMB_CAMERA_DEBUG=y
|
||||
CONFIG_MSM_CAMERA_SENSOR=y
|
||||
CONFIG_MSM_CPP=y
|
||||
CONFIG_MSM_CCI=y
|
||||
CONFIG_MSM_CSI20_HEADER=y
|
||||
CONFIG_MSM_CSI22_HEADER=y
|
||||
CONFIG_MSM_CSI30_HEADER=y
|
||||
CONFIG_MSM_CSI31_HEADER=y
|
||||
CONFIG_MSM_CSIPHY=y
|
||||
CONFIG_MSM_CSID=y
|
||||
CONFIG_MSM_EEPROM=y
|
||||
CONFIG_MSM_ISPIF=y
|
||||
CONFIG_IMX134=y
|
||||
CONFIG_IMX132=y
|
||||
CONFIG_OV9724=y
|
||||
CONFIG_OV5648=y
|
||||
CONFIG_GC0339=y
|
||||
CONFIG_OV8825=y
|
||||
CONFIG_OV8865=y
|
||||
CONFIG_s5k4e1=y
|
||||
CONFIG_OV12830=y
|
||||
CONFIG_MSM_V4L2_VIDEO_OVERLAY_DEVICE=y
|
||||
CONFIG_MSMB_JPEG=y
|
||||
CONFIG_MSM_FD=y
|
||||
CONFIG_MSM_JPEGDMA=y
|
||||
CONFIG_MSM_VIDC_V4L2=y
|
||||
CONFIG_MSM_VIDC_VMEM=y
|
||||
CONFIG_MSM_VIDC_GOVERNORS=y
|
||||
CONFIG_MSM_SDE_ROTATOR=y
|
||||
CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG=y
|
||||
CONFIG_DVB_MPQ=m
|
||||
CONFIG_DVB_MPQ_DEMUX=m
|
||||
CONFIG_TSPP=m
|
||||
CONFIG_QCOM_KGSL=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FB_VIRTUAL=y
|
||||
CONFIG_FB_MSM=y
|
||||
CONFIG_FB_MSM_MDSS=y
|
||||
CONFIG_FB_MSM_MDSS_WRITEBACK=y
|
||||
CONFIG_FB_MSM_MDSS_HDMI_PANEL=y
|
||||
CONFIG_FB_MSM_MDSS_DP_PANEL=y
|
||||
CONFIG_FB_MSM_MDSS_XLOG_DEBUG=y
|
||||
CONFIG_LOGO=y
|
||||
# CONFIG_LOGO_LINUX_MONO is not set
|
||||
# CONFIG_LOGO_LINUX_VGA16 is not set
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_USB_AUDIO=y
|
||||
CONFIG_SND_USB_AUDIO_QMI=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_MSM8998=y
|
||||
CONFIG_UHID=y
|
||||
CONFIG_HID_APPLE=y
|
||||
CONFIG_HID_ELECOM=y
|
||||
CONFIG_HID_MAGICMOUSE=y
|
||||
CONFIG_HID_MICROSOFT=y
|
||||
CONFIG_HID_MULTITOUCH=y
|
||||
CONFIG_HID_PLANTRONICS=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_ISP1760=y
|
||||
CONFIG_USB_ISP1760_HOST_ROLE=y
|
||||
CONFIG_USB_PD_POLICY=y
|
||||
CONFIG_QPNP_USB_PDPHY=y
|
||||
CONFIG_USB_EHSET_TEST_FIXTURE=y
|
||||
CONFIG_USB_OTG_WAKELOCK=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_MSM_SSPHY_QMP=y
|
||||
CONFIG_MSM_QUSB_PHY=y
|
||||
CONFIG_DUAL_ROLE_USB_INTF=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_VBUS_DRAW=500
|
||||
CONFIG_USB_CONFIGFS=y
|
||||
CONFIG_USB_CONFIGFS_NCM=y
|
||||
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
|
||||
CONFIG_USB_CONFIGFS_F_FS=y
|
||||
CONFIG_USB_CONFIGFS_F_MTP=y
|
||||
CONFIG_USB_CONFIGFS_F_PTP=y
|
||||
CONFIG_USB_CONFIGFS_F_ACC=y
|
||||
CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y
|
||||
CONFIG_USB_CONFIGFS_UEVENT=y
|
||||
CONFIG_USB_CONFIGFS_F_MIDI=y
|
||||
CONFIG_USB_CONFIGFS_F_HID=y
|
||||
CONFIG_USB_CONFIGFS_F_DIAG=y
|
||||
CONFIG_USB_CONFIGFS_F_GSI=y
|
||||
CONFIG_USB_CONFIGFS_F_CDEV=y
|
||||
CONFIG_USB_CONFIGFS_F_QDSS=y
|
||||
CONFIG_USB_CONFIGFS_F_CCID=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_PERF_PROFILING=y
|
||||
CONFIG_MMC_RING_BUFFER=y
|
||||
CONFIG_MMC_PARANOID_SD_INIT=y
|
||||
CONFIG_MMC_CLKGATE=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_TEST=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_MSM=y
|
||||
CONFIG_LEDS_QPNP=y
|
||||
CONFIG_LEDS_QPNP_FLASH_V2=y
|
||||
CONFIG_LEDS_QPNP_WLED=y
|
||||
CONFIG_LEDS_SYSCON=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_SWITCH=y
|
||||
CONFIG_EDAC=y
|
||||
CONFIG_EDAC_MM_EDAC=y
|
||||
CONFIG_EDAC_CORTEX_ARM64=y
|
||||
CONFIG_EDAC_CORTEX_ARM64_PANIC_ON_UE=y
|
||||
CONFIG_PAGE_POISONING=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_QPNP=y
|
||||
CONFIG_ESOC=y
|
||||
CONFIG_ESOC_DEV=y
|
||||
CONFIG_ESOC_CLIENT=y
|
||||
# CONFIG_ESOC_DEBUG is not set
|
||||
CONFIG_ESOC_MDM_4x=y
|
||||
CONFIG_ESOC_MDM_DRV=y
|
||||
CONFIG_ESOC_MDM_DBG_ENG=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_QCOM_SPS_DMA=y
|
||||
CONFIG_UIO=y
|
||||
CONFIG_UIO_MSM_SHAREDMEM=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_ASHMEM=y
|
||||
CONFIG_ANDROID_TIMED_GPIO=y
|
||||
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
|
||||
CONFIG_ION=y
|
||||
CONFIG_ION_MSM=y
|
||||
CONFIG_QPNP_REVID=y
|
||||
CONFIG_QPNP_COINCELL=y
|
||||
CONFIG_SPS=y
|
||||
CONFIG_SPS_SUPPORT_NDP_BAM=y
|
||||
CONFIG_IPA=y
|
||||
CONFIG_RMNET_IPA=y
|
||||
CONFIG_GSI=y
|
||||
CONFIG_IPA3=y
|
||||
CONFIG_RMNET_IPA3=y
|
||||
CONFIG_GPIO_USB_DETECT=y
|
||||
CONFIG_MSM_MHI=y
|
||||
CONFIG_MSM_MHI_UCI=y
|
||||
# CONFIG_MSM_MHI_DEBUG is not set
|
||||
CONFIG_SEEMP_CORE=y
|
||||
CONFIG_USB_BAM=y
|
||||
CONFIG_MSM_MDSS_PLL=y
|
||||
CONFIG_REMOTE_SPINLOCK_MSM=y
|
||||
CONFIG_MSM_TIMER_LEAP=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_FAST_SELFTEST is not set
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG_TRACKING=y
|
||||
CONFIG_IOMMU_TESTS=y
|
||||
CONFIG_QCOM_COMMON_LOG=y
|
||||
CONFIG_MSM_SMEM=y
|
||||
CONFIG_QPNP_HAPTIC=y
|
||||
CONFIG_MSM_SMD=y
|
||||
# CONFIG_MSM_SMD_DEBUG is not set
|
||||
CONFIG_MSM_GLINK=y
|
||||
CONFIG_MSM_GLINK_LOOPBACK_SERVER=y
|
||||
CONFIG_MSM_GLINK_SMD_XPRT=y
|
||||
CONFIG_MSM_GLINK_SMEM_NATIVE_XPRT=y
|
||||
CONFIG_MSM_GLINK_SPI_XPRT=y
|
||||
CONFIG_MSM_SPCOM=y
|
||||
CONFIG_MSM_SPSS_UTILS=y
|
||||
CONFIG_MSM_SMEM_LOGGING=y
|
||||
CONFIG_MSM_SMP2P=y
|
||||
CONFIG_MSM_SMP2P_TEST=y
|
||||
CONFIG_MSM_QMI_INTERFACE=y
|
||||
CONFIG_MSM_RPM_SMD=y
|
||||
CONFIG_QCOM_BUS_SCALING=y
|
||||
CONFIG_MSM_SERVICE_LOCATOR=y
|
||||
CONFIG_QCOM_DCC=y
|
||||
CONFIG_MSM_IPC_ROUTER_SMD_XPRT=y
|
||||
CONFIG_MSM_SYSMON_GLINK_COMM=y
|
||||
CONFIG_MSM_IPC_ROUTER_GLINK_XPRT=y
|
||||
CONFIG_MSM_GLINK_PKT=y
|
||||
CONFIG_MSM_SPM=y
|
||||
CONFIG_QCOM_SCM=y
|
||||
CONFIG_QCOM_WATCHDOG_V2=y
|
||||
CONFIG_QCOM_IRQ_HELPER=y
|
||||
CONFIG_QCOM_MEMORY_DUMP_V2=y
|
||||
CONFIG_ICNSS=y
|
||||
CONFIG_MSM_GLADIATOR_ERP_V2=y
|
||||
CONFIG_PANIC_ON_GLADIATOR_ERROR_V2=y
|
||||
CONFIG_MSM_GLADIATOR_HANG_DETECT=y
|
||||
CONFIG_MSM_CORE_HANG_DETECT=y
|
||||
CONFIG_MSM_RUN_QUEUE_STATS=y
|
||||
CONFIG_MSM_BOOT_STATS=y
|
||||
CONFIG_QCOM_CPUSS_DUMP=y
|
||||
CONFIG_MSM_ADSP_LOADER=y
|
||||
CONFIG_MSM_PERFORMANCE=y
|
||||
CONFIG_MSM_SUBSYSTEM_RESTART=y
|
||||
CONFIG_MSM_PIL=y
|
||||
CONFIG_MSM_PIL_SSR_GENERIC=y
|
||||
CONFIG_MSM_PIL_MSS_QDSP6V5=y
|
||||
CONFIG_TRACER_PKT=y
|
||||
CONFIG_QCOM_FORCE_WDOG_BITE_ON_PANIC=y
|
||||
CONFIG_MSM_MPM_OF=y
|
||||
CONFIG_MSM_EVENT_TIMER=y
|
||||
CONFIG_MSM_AVTIMER=y
|
||||
CONFIG_QCOM_REMOTEQDSS=y
|
||||
CONFIG_MSM_SERVICE_NOTIFIER=y
|
||||
CONFIG_MSM_QBT1000=y
|
||||
CONFIG_MSM_RPM_RBCPR_STATS_V2_LOG=y
|
||||
CONFIG_MSM_RPM_LOG=y
|
||||
CONFIG_MSM_RPM_STATS_LOG=y
|
||||
CONFIG_QSEE_IPC_IRQ_BRIDGE=y
|
||||
CONFIG_QCOM_SMCINVOKE=y
|
||||
CONFIG_QCOM_EARLY_RANDOM=y
|
||||
CONFIG_MEM_SHARE_QMI_SERVICE=y
|
||||
CONFIG_QCOM_BIMC_BWMON=y
|
||||
CONFIG_ARM_MEMLAT_MON=y
|
||||
CONFIG_DEVFREQ_GOV_QCOM_BW_HWMON=y
|
||||
CONFIG_DEVFREQ_GOV_MEMLAT=y
|
||||
CONFIG_QCOM_DEVFREQ_DEVBW=y
|
||||
CONFIG_SPDM_SCM=y
|
||||
CONFIG_DEVFREQ_SPDM=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_QCOM_RRADC=y
|
||||
CONFIG_QCOM_TADC=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_QPNP=y
|
||||
CONFIG_ARM_GIC_V3_ACL=y
|
||||
CONFIG_PHY_XGENE=y
|
||||
CONFIG_ANDROID=y
|
||||
CONFIG_ANDROID_BINDER_IPC=y
|
||||
CONFIG_MSM_TZ_LOG=y
|
||||
CONFIG_SENSORS_SSC=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT2_FS_XATTR=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_EXT4_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ENCRYPTION=y
|
||||
CONFIG_EXT4_FS_ICE_ENCRYPTION=y
|
||||
CONFIG_F2FS_FS=y
|
||||
CONFIG_F2FS_FS_SECURITY=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_QUOTA_NETLINK_INTERFACE=y
|
||||
CONFIG_QFMT_V2=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
CONFIG_NTFS_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
CONFIG_ECRYPT_FS=y
|
||||
CONFIG_ECRYPT_FS_MESSAGING=y
|
||||
CONFIG_SDCARD_FS=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_PAGE_OWNER=y
|
||||
CONFIG_PAGE_OWNER_ENABLE_DEFAULT=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
|
||||
# CONFIG_SLUB_DEBUG_PANIC_ON is not set
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_PAGE_POISONING=y
|
||||
CONFIG_PAGE_POISONING_ENABLE_DEFAULT=y
|
||||
CONFIG_DEBUG_OBJECTS=y
|
||||
CONFIG_DEBUG_OBJECTS_FREE=y
|
||||
CONFIG_DEBUG_OBJECTS_TIMERS=y
|
||||
CONFIG_DEBUG_OBJECTS_WORK=y
|
||||
# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set
|
||||
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
CONFIG_DEBUG_KMEMLEAK=y
|
||||
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=5500
|
||||
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_LOCKUP_DETECTOR=y
|
||||
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
CONFIG_WQ_WATCHDOG=y
|
||||
CONFIG_PANIC_TIMEOUT=5
|
||||
CONFIG_PANIC_ON_SCHED_BUG=y
|
||||
CONFIG_PANIC_ON_RT_THROTTLING=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
CONFIG_SCHED_STACK_END_CHECK=y
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_DEBUG_MUTEXES=y
|
||||
CONFIG_DEBUG_ATOMIC_SLEEP=y
|
||||
CONFIG_DEBUG_LIST=y
|
||||
CONFIG_FAULT_INJECTION=y
|
||||
CONFIG_FAIL_PAGE_ALLOC=y
|
||||
CONFIG_UFS_FAULT_INJECTION=y
|
||||
CONFIG_FAULT_INJECTION_DEBUG_FS=y
|
||||
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
|
||||
CONFIG_IPC_LOGGING=y
|
||||
CONFIG_QCOM_RTB=y
|
||||
CONFIG_QCOM_RTB_SEPARATE_CPUS=y
|
||||
CONFIG_FUNCTION_TRACER=y
|
||||
CONFIG_PREEMPTIRQ_EVENTS=y
|
||||
CONFIG_IRQSOFF_TRACER=y
|
||||
CONFIG_PREEMPT_TRACER=y
|
||||
CONFIG_BLK_DEV_IO_TRACE=y
|
||||
CONFIG_CPU_FREQ_SWITCH_PROFILER=y
|
||||
CONFIG_LKDTM=y
|
||||
CONFIG_MEMTEST=y
|
||||
CONFIG_PANIC_ON_DATA_CORRUPTION=y
|
||||
CONFIG_ARM64_PTDUMP=y
|
||||
CONFIG_PID_IN_CONTEXTIDR=y
|
||||
CONFIG_DEBUG_SET_MODULE_RONX=y
|
||||
CONFIG_FREE_PAGES_RDONLY=y
|
||||
CONFIG_ARM64_STRICT_BREAK_BEFORE_MAKE=y
|
||||
CONFIG_CORESIGHT=y
|
||||
CONFIG_CORESIGHT_EVENT=y
|
||||
CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
|
||||
CONFIG_CORESIGHT_SOURCE_ETM4X=y
|
||||
CONFIG_CORESIGHT_REMOTE_ETM=y
|
||||
CONFIG_CORESIGHT_REMOTE_ETM_DEFAULT_ENABLE=0
|
||||
CONFIG_CORESIGHT_QCOM_REPLICATOR=y
|
||||
CONFIG_CORESIGHT_STM=y
|
||||
CONFIG_CORESIGHT_HWEVENT=y
|
||||
CONFIG_CORESIGHT_CTI=y
|
||||
CONFIG_CORESIGHT_TPDA=y
|
||||
CONFIG_CORESIGHT_TPDM=y
|
||||
CONFIG_CORESIGHT_QPDI=y
|
||||
CONFIG_CORESIGHT_SOURCE_DUMMY=y
|
||||
CONFIG_PFK=y
|
||||
CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_HARDENED_USERCOPY=y
|
||||
CONFIG_SECURITY_SELINUX=y
|
||||
CONFIG_SECURITY_SMACK=y
|
||||
CONFIG_CRYPTO_GCM=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_XCBC=y
|
||||
CONFIG_CRYPTO_MD4=y
|
||||
CONFIG_CRYPTO_TWOFISH=y
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRYPTO_DEV_QCRYPTO=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_MSM_QCE=y
|
||||
CONFIG_CRYPTO_DEV_QCEDEV=y
|
||||
CONFIG_CRYPTO_DEV_OTA_CRYPTO=y
|
||||
CONFIG_CRYPTO_DEV_QCOM_ICE=y
|
||||
CONFIG_SYSTEM_TRUSTED_KEYS="verity.x509.pem"
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA2_ARM64_CE=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_GHASH_ARM64_CE=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
|
||||
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
||||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CRC32_ARM64=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_QMI_ENCDEC=y
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
CONFIG_RF_CABLE_DETECT=y
|
||||
#CONFIG_DEVMEM=y
|
||||
# CONFIG_DEVMEM is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
CONFIG_PSTORE_DEVICE_INFO=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_KSWAPD_CPU_AFFINITY_MASK="f"
|
|
@ -240,7 +240,9 @@ CONFIG_CFG80211_CERTIFICATION_ONUS=y
|
|||
CONFIG_CFG80211_REG_CELLULAR_HINTS=y
|
||||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
# CONFIG_NFC_NQ=y
|
||||
CONFIG_NFC_PN5XX=y
|
||||
CONFIG_NFC_PN80T=y
|
||||
CONFIG_IPC_ROUTER=y
|
||||
CONFIG_IPC_ROUTER_SECURITY=y
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
|
@ -254,6 +256,7 @@ CONFIG_QSEECOM=y
|
|||
CONFIG_HDCP_QSEECOM=y
|
||||
CONFIG_UID_SYS_STATS=y
|
||||
CONFIG_QPNP_MISC=y
|
||||
CONFIG_DLOAD_MODE_DEFAULT=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
|
@ -306,21 +309,25 @@ CONFIG_INPUT_KEYRESET=y
|
|||
CONFIG_KEYBOARD_GPIO=y
|
||||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21=y
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21 is not set
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21 is not set
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI=y
|
||||
CONFIG_INPUT_FINGERPRINT=y
|
||||
CONFIG_FINGERPRINT_DETECT=y
|
||||
CONFIG_FINGERPRINT_FPC=y
|
||||
CONFIG_FINGERPRINT_GOODIX=y
|
||||
CONFIG_SECURE_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_ST_I2C=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_HBTP_INPUT=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
CONFIG_INPUT_STMVL53L0=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVMEM is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_CONSOLE=y
|
||||
CONFIG_SERIAL_MSM_HS=y
|
||||
CONFIG_SERIAL_MSM_SMD=y
|
||||
CONFIG_DIAG_CHAR=y
|
||||
|
@ -347,6 +354,8 @@ CONFIG_QCOM_DLOAD_MODE=y
|
|||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_FG_GEN3=y
|
||||
CONFIG_FG_BQ27541=y
|
||||
CONFIG_ONEPLUS_FASTCHG=y
|
||||
CONFIG_MSM_BCL_CTL=y
|
||||
CONFIG_MSM_BCL_PERIPHERAL_CTL=y
|
||||
CONFIG_BATTERY_BCL=y
|
||||
|
@ -624,6 +633,8 @@ CONFIG_QFMT_V2=y
|
|||
CONFIG_FUSE_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
CONFIG_NTFS_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_ECRYPT_FS=y
|
||||
|
@ -678,3 +689,15 @@ CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
|
|||
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
||||
CONFIG_CRYPTO_CRC32_ARM64=y
|
||||
CONFIG_QMI_ENCDEC=y
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
|
||||
CONFIG_RF_CABLE_DETECT=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
CONFIG_PSTORE_DEVICE_INFO=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_INPUT_KEYCHORD=y
|
||||
CONFIG_KSWAPD_CPU_AFFINITY_MASK="f"
|
||||
|
|
|
@ -43,10 +43,10 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS=16
|
|||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
CONFIG_MODULE_SIG=y
|
||||
CONFIG_MODULE_SIG_FORCE=y
|
||||
CONFIG_MODULE_SIG_SHA512=y
|
||||
# CONFIG_MODVERSIONS=y
|
||||
# CONFIG_MODULE_SIG=y
|
||||
# CONFIG_MODULE_SIG_FORCE=y
|
||||
# CONFIG_MODULE_SIG_SHA512=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_IOSCHED_DEADLINE is not set
|
||||
|
@ -81,7 +81,7 @@ CONFIG_PM_WAKELOCKS_LIMIT=0
|
|||
# CONFIG_PM_WAKELOCKS_GC is not set
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_STAT is not set
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
|
@ -243,7 +243,9 @@ CONFIG_CFG80211_REG_CELLULAR_HINTS=y
|
|||
CONFIG_CFG80211_INTERNAL_REGDB=y
|
||||
# CONFIG_CFG80211_CRDA_SUPPORT is not set
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_NFC_NQ=y
|
||||
# CONFIG_NFC_NQ=y
|
||||
CONFIG_NFC_PN5XX=y
|
||||
CONFIG_NFC_PN80T=y
|
||||
CONFIG_IPC_ROUTER=y
|
||||
CONFIG_IPC_ROUTER_SECURITY=y
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
|
@ -309,18 +311,20 @@ CONFIG_KEYBOARD_GPIO=y
|
|||
# CONFIG_INPUT_MOUSE is not set
|
||||
CONFIG_INPUT_JOYSTICK=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21=y
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21=y
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_CORE_v21 is not set
|
||||
# CONFIG_TOUCHSCREEN_SYNAPTICS_DSX_FW_UPDATE_v21 is not set
|
||||
CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI=y
|
||||
CONFIG_INPUT_FINGERPRINT=y
|
||||
CONFIG_FINGERPRINT_DETECT=y
|
||||
CONFIG_FINGERPRINT_FPC=y
|
||||
CONFIG_FINGERPRINT_GOODIX=y
|
||||
CONFIG_SECURE_TOUCH=y
|
||||
CONFIG_TOUCHSCREEN_ST=y
|
||||
CONFIG_TOUCHSCREEN_ST_I2C=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
CONFIG_INPUT_HBTP_INPUT=y
|
||||
CONFIG_INPUT_QPNP_POWER_ON=y
|
||||
CONFIG_INPUT_KEYCHORD=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
CONFIG_INPUT_GPIO=y
|
||||
CONFIG_INPUT_STMVL53L0=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
# CONFIG_VT is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
|
@ -354,6 +358,11 @@ CONFIG_QCOM_DLOAD_MODE=y
|
|||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_QPNP_FG_GEN3=y
|
||||
CONFIG_FG_BQ27541=y
|
||||
CONFIG_ONEPLUS_FASTCHG=y
|
||||
CONFIG_JOYSTICK_XPAD=y
|
||||
CONFIG_HID_SONY=y
|
||||
CONFIG_SONY_FF=y
|
||||
CONFIG_MSM_BCL_CTL=y
|
||||
CONFIG_MSM_BCL_PERIPHERAL_CTL=y
|
||||
CONFIG_BATTERY_BCL=y
|
||||
|
@ -516,12 +525,13 @@ CONFIG_EDAC=y
|
|||
CONFIG_EDAC_MM_EDAC=y
|
||||
CONFIG_EDAC_CORTEX_ARM64=y
|
||||
CONFIG_EDAC_CORTEX_ARM64_PANIC_ON_UE=y
|
||||
CONFIG_PAGE_POISONING=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_QPNP=y
|
||||
CONFIG_ESOC=y
|
||||
CONFIG_ESOC_DEV=y
|
||||
CONFIG_ESOC_CLIENT=y
|
||||
CONFIG_ESOC_DEBUG=y
|
||||
# CONFIG_ESOC_DEBUG is not set
|
||||
CONFIG_ESOC_MDM_4x=y
|
||||
CONFIG_ESOC_MDM_DRV=y
|
||||
CONFIG_ESOC_MDM_DBG_ENG=y
|
||||
|
@ -547,14 +557,14 @@ CONFIG_RMNET_IPA3=y
|
|||
CONFIG_GPIO_USB_DETECT=y
|
||||
CONFIG_MSM_MHI=y
|
||||
CONFIG_MSM_MHI_UCI=y
|
||||
CONFIG_MSM_MHI_DEBUG=y
|
||||
# CONFIG_MSM_MHI_DEBUG is not set
|
||||
CONFIG_SEEMP_CORE=y
|
||||
CONFIG_USB_BAM=y
|
||||
CONFIG_MSM_MDSS_PLL=y
|
||||
CONFIG_REMOTE_SPINLOCK_MSM=y
|
||||
CONFIG_MSM_TIMER_LEAP=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST=y
|
||||
CONFIG_IOMMU_IO_PGTABLE_FAST_SELFTEST=y
|
||||
# CONFIG_IOMMU_IO_PGTABLE_FAST_SELFTEST is not set
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG_TRACKING=y
|
||||
|
@ -563,7 +573,7 @@ CONFIG_QCOM_COMMON_LOG=y
|
|||
CONFIG_MSM_SMEM=y
|
||||
CONFIG_QPNP_HAPTIC=y
|
||||
CONFIG_MSM_SMD=y
|
||||
CONFIG_MSM_SMD_DEBUG=y
|
||||
# CONFIG_MSM_SMD_DEBUG is not set
|
||||
CONFIG_MSM_GLINK=y
|
||||
CONFIG_MSM_GLINK_LOOPBACK_SERVER=y
|
||||
CONFIG_MSM_GLINK_SMD_XPRT=y
|
||||
|
@ -651,6 +661,8 @@ CONFIG_QFMT_V2=y
|
|||
CONFIG_FUSE_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_EXFAT_FS=y
|
||||
CONFIG_NTFS_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_EFIVAR_FS=y
|
||||
|
@ -667,18 +679,19 @@ CONFIG_PAGE_OWNER=y
|
|||
CONFIG_PAGE_OWNER_ENABLE_DEFAULT=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
|
||||
CONFIG_SLUB_DEBUG_PANIC_ON=y
|
||||
# CONFIG_SLUB_DEBUG_PANIC_ON is not set
|
||||
# CONFIG_SLUB_DEBUG is not set
|
||||
CONFIG_PAGE_POISONING=y
|
||||
CONFIG_PAGE_POISONING_ENABLE_DEFAULT=y
|
||||
CONFIG_DEBUG_OBJECTS=y
|
||||
CONFIG_DEBUG_OBJECTS_FREE=y
|
||||
CONFIG_DEBUG_OBJECTS_TIMERS=y
|
||||
CONFIG_DEBUG_OBJECTS_WORK=y
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
|
||||
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
|
||||
CONFIG_SLUB_DEBUG_ON=y
|
||||
# CONFIG_DEBUG_OBJECTS is not set
|
||||
# CONFIG_DEBUG_OBJECTS_FREE is not set
|
||||
# CONFIG_DEBUG_OBJECTS_TIMERS is not set
|
||||
# CONFIG_DEBUG_OBJECTS_WORK is not set
|
||||
# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set
|
||||
# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
CONFIG_DEBUG_KMEMLEAK=y
|
||||
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=4000
|
||||
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=5500
|
||||
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
|
||||
CONFIG_DEBUG_STACK_USAGE=y
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
|
@ -759,3 +772,15 @@ CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
|
|||
CONFIG_CRYPTO_CRC32_ARM64=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_QMI_ENCDEC=y
|
||||
CONFIG_TRI_STATE_KEY=y
|
||||
CONFIG_RF_CABLE_DETECT=y
|
||||
#CONFIG_DEVMEM=y
|
||||
# CONFIG_DEVMEM is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_PSTORE_CONSOLE=y
|
||||
CONFIG_PSTORE_RAM=y
|
||||
CONFIG_PSTORE_DEVICE_INFO=y
|
||||
CONFIG_PSTORE_PMSG=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_KSWAPD_CPU_AFFINITY_MASK="f"
|
||||
|
|
|
@ -117,9 +117,16 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
|
|||
LOG_BARRIER; \
|
||||
})
|
||||
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define __raw_write_logged_dash(v, a, _t) ({ \
|
||||
volatile void __iomem *_a = (a); \
|
||||
__raw_write##_t##_no_log((v), _a); \
|
||||
})
|
||||
#define __raw_writeb(v, a) __raw_write_logged((v), a, b)
|
||||
#define __raw_writew(v, a) __raw_write_logged((v), a, w)
|
||||
#define __raw_writel(v, a) __raw_write_logged((v), a, l)
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define __raw_writel_dash(v, a) __raw_write_logged_dash((v), a, l)
|
||||
#define __raw_writeq(v, a) __raw_write_logged((v), a, q)
|
||||
|
||||
#define __raw_read_logged(a, _l, _t) ({ \
|
||||
|
@ -135,9 +142,17 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
|
|||
__a; \
|
||||
})
|
||||
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define __raw_read_logged_dash(a, _l, _t) ({ \
|
||||
_t __a; \
|
||||
const volatile void __iomem *_a = (const volatile void __iomem *)(a); \
|
||||
__a = __raw_read##_l##_no_log(_a); \
|
||||
})
|
||||
#define __raw_readb(a) __raw_read_logged((a), b, u8)
|
||||
#define __raw_readw(a) __raw_read_logged((a), w, u16)
|
||||
#define __raw_readl(a) __raw_read_logged((a), l, u32)
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define __raw_readl_dash(a) __raw_read_logged_dash((a), l, u32)
|
||||
#define __raw_readq(a) __raw_read_logged((a), q, u64)
|
||||
|
||||
/* IO barriers */
|
||||
|
@ -154,11 +169,19 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
|
|||
#define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; })
|
||||
#define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; })
|
||||
#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; })
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define readl_relaxed_dash(c) ({ \
|
||||
u32 __r = le32_to_cpu((__force __le32)__raw_readl_dash(c)); \
|
||||
__r; })
|
||||
#define readq_relaxed(c) ({ u64 __r = le64_to_cpu((__force __le64)__raw_readq(c)); __r; })
|
||||
|
||||
#define writeb_relaxed(v,c) ((void)__raw_writeb((v),(c)))
|
||||
#define writew_relaxed(v,c) ((void)__raw_writew((__force u16)cpu_to_le16(v),(c)))
|
||||
#define writel_relaxed(v,c) ((void)__raw_writel((__force u32)cpu_to_le32(v),(c)))
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define writel_relaxed_dash(v, c) ( \
|
||||
(void)__raw_writel_dash((__force u32)cpu_to_le32(v),\
|
||||
(c)))
|
||||
#define writeq_relaxed(v,c) ((void)__raw_writeq((__force u64)cpu_to_le64(v),(c)))
|
||||
|
||||
#define readb_relaxed_no_log(c) ({ u8 __v = __raw_readb_no_log(c); __v; })
|
||||
|
@ -179,11 +202,15 @@ static inline u64 __raw_readq_no_log(const volatile void __iomem *addr)
|
|||
#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; })
|
||||
#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
|
||||
#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; })
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define readl_dash(c) ({ u32 __v = readl_relaxed_dash(c); __v; })
|
||||
#define readq(c) ({ u64 __v = readq_relaxed(c); __iormb(); __v; })
|
||||
|
||||
#define writeb(v,c) ({ __iowmb(); writeb_relaxed((v),(c)); })
|
||||
#define writew(v,c) ({ __iowmb(); writew_relaxed((v),(c)); })
|
||||
#define writel(v,c) ({ __iowmb(); writel_relaxed((v),(c)); })
|
||||
/*2017-08-22 add for dash adapter update*/
|
||||
#define writel_dash(v, c) ({ writel_relaxed_dash((v), (c)); })
|
||||
#define writeq(v,c) ({ __iowmb(); writeq_relaxed((v),(c)); })
|
||||
|
||||
#define readb_no_log(c) ({ u8 __v = readb_relaxed_no_log(c); __iormb(); __v; })
|
||||
|
|
|
@ -214,4 +214,7 @@ source "drivers/sensors/Kconfig"
|
|||
|
||||
source "drivers/tee/Kconfig"
|
||||
|
||||
source "drivers/param_read_write/Kconfig"
|
||||
|
||||
source "drivers/oneplus/Kconfig"
|
||||
endmenu
|
||||
|
|
|
@ -184,3 +184,8 @@ obj-$(CONFIG_BIF) += bif/
|
|||
obj-$(CONFIG_SENSORS_SSC) += sensors/
|
||||
obj-$(CONFIG_ESOC) += esoc/
|
||||
obj-$(CONFIG_TEE) += tee/
|
||||
|
||||
|
||||
obj-y += param_read_write/
|
||||
|
||||
obj-$(CONFIG_OEM_DEBUG_SUPPORT) += oneplus/
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
#include <linux/pid_namespace.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
#include <uapi/linux/android/binder.h>
|
||||
#include "binder_alloc.h"
|
||||
#include "binder_trace.h"
|
||||
|
@ -5766,6 +5766,52 @@ BINDER_DEBUG_ENTRY(stats);
|
|||
BINDER_DEBUG_ENTRY(transactions);
|
||||
BINDER_DEBUG_ENTRY(transaction_log);
|
||||
|
||||
static int proc_state_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, binder_state_show, inode->i_private);
|
||||
}
|
||||
|
||||
static int proc_transactions_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, binder_transactions_show, inode->i_private);
|
||||
}
|
||||
|
||||
static int proc_transaction_log_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
return single_open(file, binder_transaction_log_show, inode->i_private);
|
||||
}
|
||||
|
||||
static const struct file_operations proc_state_operations = {
|
||||
.open = proc_state_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static const struct file_operations proc_transactions_operations = {
|
||||
.open = proc_transactions_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static const struct file_operations proc_transaction_log_operations = {
|
||||
.open = proc_transaction_log_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static int binder_proc_init(void)
|
||||
{
|
||||
proc_create("proc_state", 0, NULL,
|
||||
&proc_state_operations);
|
||||
proc_create("proc_transactions", 0, NULL,
|
||||
&proc_transactions_operations);
|
||||
proc_create("proc_transaction_log", 0, NULL,
|
||||
&proc_transaction_log_operations);
|
||||
return 0;
|
||||
}
|
||||
static int __init init_binder_device(const char *name)
|
||||
{
|
||||
int ret;
|
||||
|
@ -5861,7 +5907,7 @@ static int __init binder_init(void)
|
|||
if (ret)
|
||||
goto err_init_binder_device_failed;
|
||||
}
|
||||
|
||||
binder_proc_init();
|
||||
return ret;
|
||||
|
||||
err_init_binder_device_failed:
|
||||
|
|
|
@ -312,6 +312,7 @@ static const char * const fw_path[] = {
|
|||
"/lib/firmware/updates",
|
||||
"/lib/firmware/" UTS_RELEASE,
|
||||
"/lib/firmware",
|
||||
"/vendor/etc/firmware",
|
||||
"/lib64/firmware"
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <linux/pm_wakeirq.h>
|
||||
#include <linux/types.h>
|
||||
#include <trace/events/power.h>
|
||||
#include <linux/pm_wakeup.h>
|
||||
|
||||
#include "power.h"
|
||||
|
||||
|
@ -68,6 +69,10 @@ static struct wakeup_source deleted_ws = {
|
|||
.lock = __SPIN_LOCK_UNLOCKED(deleted_ws.lock),
|
||||
};
|
||||
|
||||
#define WORK_TIMEOUT (60*1000)
|
||||
static void ws_printk(struct work_struct *work);
|
||||
static DECLARE_DELAYED_WORK(ws_printk_work, ws_printk);
|
||||
|
||||
/**
|
||||
* wakeup_source_prepare - Prepare a new wakeup source for initialization.
|
||||
* @ws: Wakeup source to prepare.
|
||||
|
@ -866,6 +871,24 @@ void pm_print_active_wakeup_sources(void)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(pm_print_active_wakeup_sources);
|
||||
|
||||
static void ws_printk(struct work_struct *work)
|
||||
{
|
||||
pm_print_active_wakeup_sources();
|
||||
queue_delayed_work(system_freezable_wq, &ws_printk_work,
|
||||
msecs_to_jiffies(WORK_TIMEOUT));
|
||||
}
|
||||
|
||||
void pm_print_active_wakeup_sources_queue(bool on)
|
||||
{
|
||||
if (on) {
|
||||
queue_delayed_work(system_freezable_wq, &ws_printk_work,
|
||||
msecs_to_jiffies(WORK_TIMEOUT));
|
||||
} else {
|
||||
cancel_delayed_work(&ws_printk_work);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_print_active_wakeup_sources_queue);
|
||||
|
||||
/**
|
||||
* pm_wakeup_pending - Check if power transition in progress should be aborted.
|
||||
*
|
||||
|
|
|
@ -519,10 +519,11 @@ static int btfm_slim_remove(struct slim_device *slim)
|
|||
BTFMSLIM_DBG("slim_remove_device() - btfm_slim->slim_ifd");
|
||||
slim_remove_device(&btfm_slim->slim_ifd);
|
||||
|
||||
kfree(btfm_slim);
|
||||
|
||||
BTFMSLIM_DBG("slim_remove_device() - btfm_slim->slim_pgd");
|
||||
slim_remove_device(slim);
|
||||
|
||||
kfree(btfm_slim);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ static DEFINE_MUTEX(misc_mtx);
|
|||
/*
|
||||
* Assigned numbers, used for dynamic minors
|
||||
*/
|
||||
#define DYNAMIC_MINORS 96 /* like dynamic majors */
|
||||
#define DYNAMIC_MINORS 128 /* like dynamic majors */
|
||||
static DECLARE_BITMAP(misc_minors, DYNAMIC_MINORS);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
|
|
@ -73,6 +73,7 @@ static DEFINE_CLK_VOTER(bimc_msmbus_clk, &bimc_clk.c, LONG_MAX);
|
|||
static DEFINE_CLK_VOTER(bimc_msmbus_a_clk, &bimc_a_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_VOTER(cnoc_msmbus_clk, &cnoc_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_VOTER(cnoc_msmbus_a_clk, &cnoc_a_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_VOTER(uart_cnoc_msmbus_a_clk, &cnoc_a_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_BRANCH_VOTER(cxo_dwc3_clk, &cxo_clk_src.c);
|
||||
static DEFINE_CLK_BRANCH_VOTER(cxo_lpm_clk, &cxo_clk_src.c);
|
||||
static DEFINE_CLK_BRANCH_VOTER(cxo_otg_clk, &cxo_clk_src.c);
|
||||
|
@ -120,6 +121,7 @@ DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(rf_clk3_pin, rf_clk3_pin_ao,
|
|||
static DEFINE_CLK_VOTER(scm_ce1_clk, &ce1_clk.c, 85710000);
|
||||
static DEFINE_CLK_VOTER(snoc_msmbus_clk, &snoc_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_VOTER(snoc_msmbus_a_clk, &snoc_a_clk.c, LONG_MAX);
|
||||
static DEFINE_CLK_VOTER(uart_snoc_msmbus_a_clk, &snoc_a_clk.c, LONG_MAX);
|
||||
DEFINE_CLK_DUMMY(gcc_ce1_ahb_m_clk, 0);
|
||||
DEFINE_CLK_DUMMY(gcc_ce1_axi_m_clk, 0);
|
||||
|
||||
|
@ -2427,6 +2429,7 @@ static struct clk_lookup msm_clocks_rpm_8998[] = {
|
|||
CLK_LIST(ce1_a_clk),
|
||||
CLK_LIST(cnoc_msmbus_clk),
|
||||
CLK_LIST(cnoc_msmbus_a_clk),
|
||||
CLK_LIST(uart_cnoc_msmbus_a_clk),
|
||||
CLK_LIST(cxo_clk_src_ao),
|
||||
CLK_LIST(cxo_dwc3_clk),
|
||||
CLK_LIST(cxo_lpm_clk),
|
||||
|
@ -2481,6 +2484,7 @@ static struct clk_lookup msm_clocks_rpm_8998[] = {
|
|||
CLK_LIST(rf_clk3_pin_ao),
|
||||
CLK_LIST(scm_ce1_clk),
|
||||
CLK_LIST(snoc_msmbus_clk),
|
||||
CLK_LIST(uart_snoc_msmbus_a_clk),
|
||||
CLK_LIST(snoc_msmbus_a_clk),
|
||||
CLK_LIST(gcc_ce1_ahb_m_clk),
|
||||
CLK_LIST(gcc_ce1_axi_m_clk),
|
||||
|
|
|
@ -42,6 +42,32 @@ struct cpufreq_suspend_t {
|
|||
};
|
||||
|
||||
static DEFINE_PER_CPU(struct cpufreq_suspend_t, suspend_data);
|
||||
#define LITTLE_CPU_QOS_FREQ 1900800
|
||||
#define BIG_CPU_QOS_FREQ 2361600
|
||||
|
||||
unsigned int cluster1_first_cpu;
|
||||
static bool qos_cpufreq_flag;
|
||||
static bool c1_cpufreq_update_flag;
|
||||
static void c0_cpufreq_limit(struct work_struct *work);
|
||||
static void c1_cpufreq_limit(struct work_struct *work);
|
||||
static struct workqueue_struct *qos_cpufreq_work_queue;
|
||||
static DECLARE_WORK(c0_cpufreq_limit_work, c0_cpufreq_limit);
|
||||
static DECLARE_WORK(c1_cpufreq_limit_work, c1_cpufreq_limit);
|
||||
struct qos_request_value {
|
||||
bool flag;
|
||||
unsigned int max_cpufreq;
|
||||
unsigned int min_cpufreq;
|
||||
};
|
||||
static struct qos_request_value c0_qos_request_value = {
|
||||
.flag = false,
|
||||
.max_cpufreq = INT_MAX,
|
||||
.min_cpufreq = MIN_CPUFREQ,
|
||||
};
|
||||
static struct qos_request_value c1_qos_request_value = {
|
||||
.flag = false,
|
||||
.max_cpufreq = INT_MAX,
|
||||
.min_cpufreq = MIN_CPUFREQ,
|
||||
};
|
||||
|
||||
static int set_cpu_freq(struct cpufreq_policy *policy, unsigned int new_freq,
|
||||
unsigned int index)
|
||||
|
@ -77,14 +103,22 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
|
|||
|
||||
mutex_lock(&per_cpu(suspend_data, policy->cpu).suspend_mutex);
|
||||
|
||||
if (target_freq == policy->cur)
|
||||
goto done;
|
||||
if (target_freq == policy->cur) {
|
||||
if (c1_cpufreq_update_flag)
|
||||
c1_cpufreq_update_flag = false;
|
||||
else
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (per_cpu(suspend_data, policy->cpu).device_suspended) {
|
||||
pr_debug("cpufreq: cpu%d scheduling frequency change "
|
||||
if (likely(qos_cpufreq_flag)) {
|
||||
qos_cpufreq_flag = false;
|
||||
} else {
|
||||
pr_debug("cpufreq: cpu%d scheduling frequency change "
|
||||
"in suspend.\n", policy->cpu);
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
ret = -EFAULT;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
table = cpufreq_frequency_get_table(policy->cpu);
|
||||
|
@ -94,6 +128,17 @@ static int msm_cpufreq_target(struct cpufreq_policy *policy,
|
|||
ret = -ENODEV;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (cluster1_first_cpu) {
|
||||
if (policy->cpu >= cluster1_first_cpu) {
|
||||
target_freq = min(c1_qos_request_value.max_cpufreq, target_freq);
|
||||
target_freq = max(c1_qos_request_value.min_cpufreq, target_freq);
|
||||
}else {
|
||||
target_freq = min(c0_qos_request_value.max_cpufreq, target_freq);
|
||||
target_freq = max(c0_qos_request_value.min_cpufreq, target_freq);
|
||||
}
|
||||
}
|
||||
|
||||
if (cpufreq_frequency_table_target(policy, table, target_freq, relation,
|
||||
&index)) {
|
||||
pr_err("cpufreq: invalid target_freq: %d\n", target_freq);
|
||||
|
@ -443,6 +488,10 @@ static int __init msm_cpufreq_probe(struct platform_device *pdev)
|
|||
devm_kfree(dev, ftbl);
|
||||
}
|
||||
ftbl = per_cpu(freq_table, cpu - 1);
|
||||
} else {
|
||||
if(!IS_ERR(ftbl))
|
||||
cluster1_first_cpu = cpu;
|
||||
//pr_info("cluster1_first_cpu: %d",cluster1_first_cpu);
|
||||
}
|
||||
per_cpu(freq_table, cpu) = ftbl;
|
||||
}
|
||||
|
@ -463,6 +512,231 @@ static struct platform_driver msm_cpufreq_plat_driver = {
|
|||
},
|
||||
};
|
||||
|
||||
static int get_c0_available_cpufreq(void)
|
||||
{
|
||||
unsigned int max_cpufreq_index, min_cpufreq_index;
|
||||
unsigned int max_index;
|
||||
unsigned int index_max, index_min;
|
||||
struct cpufreq_frequency_table *table, *pos;
|
||||
|
||||
table = cpufreq_frequency_get_table(0);
|
||||
if (!table) {
|
||||
pr_err("cpufreq: Failed to get frequency table for CPU%u\n",0);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
max_cpufreq_index = (unsigned int)pm_qos_request(PM_QOS_C0_CPUFREQ_MAX);
|
||||
min_cpufreq_index = (unsigned int)pm_qos_request(PM_QOS_C0_CPUFREQ_MIN);
|
||||
/* you can limit the min cpufreq*/
|
||||
if (min_cpufreq_index > max_cpufreq_index)
|
||||
max_cpufreq_index = min_cpufreq_index;
|
||||
|
||||
/*get the available cpufreq*/
|
||||
/* lock for the max available cpufreq*/
|
||||
cpufreq_for_each_valid_entry(pos, table) {
|
||||
max_index = pos - table;
|
||||
}
|
||||
if (max_cpufreq_index & MASK_CPUFREQ) {
|
||||
index_max = MAX_CPUFREQ - max_cpufreq_index;
|
||||
if (index_max> max_index)
|
||||
index_max = 0;
|
||||
index_max = max_index - index_max;
|
||||
} else {
|
||||
if (max_cpufreq_index > max_index)
|
||||
index_max = max_index;
|
||||
}
|
||||
if (min_cpufreq_index & MASK_CPUFREQ) {
|
||||
index_min = MAX_CPUFREQ - min_cpufreq_index;
|
||||
if (index_min > max_index)
|
||||
index_min = 0;
|
||||
index_min = max_index - index_min;
|
||||
} else {
|
||||
if (min_cpufreq_index > max_index)
|
||||
index_min = max_index;
|
||||
}
|
||||
c0_qos_request_value.max_cpufreq = table[index_max].frequency;
|
||||
c0_qos_request_value.min_cpufreq = table[index_min].frequency;
|
||||
pr_debug("::: m:%d, ii:%d-, mm:%d-",max_index, index_min,index_max);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_c1_available_cpufreq(void)
|
||||
{
|
||||
unsigned int max_cpufreq_index, min_cpufreq_index;
|
||||
unsigned int max_index;
|
||||
unsigned int index_max, index_min;
|
||||
struct cpufreq_frequency_table *table, *pos;
|
||||
|
||||
table = cpufreq_frequency_get_table(cluster1_first_cpu);
|
||||
if (!table) {
|
||||
pr_err("cpufreq: Failed to get frequency table for CPU%u\n",
|
||||
cluster1_first_cpu);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
max_cpufreq_index = (unsigned int)pm_qos_request(PM_QOS_C1_CPUFREQ_MAX);
|
||||
min_cpufreq_index = (unsigned int)pm_qos_request(PM_QOS_C1_CPUFREQ_MIN);
|
||||
/* you can limit the min cpufreq*/
|
||||
if (min_cpufreq_index > max_cpufreq_index)
|
||||
max_cpufreq_index = min_cpufreq_index;
|
||||
|
||||
/*get the available cpufreq*/
|
||||
/* lock for the max available cpufreq*/
|
||||
cpufreq_for_each_valid_entry(pos, table) {
|
||||
max_index = pos - table;
|
||||
}
|
||||
/* add limits */
|
||||
if (max_cpufreq_index & MASK_CPUFREQ) {
|
||||
index_max = MAX_CPUFREQ - max_cpufreq_index;
|
||||
if (index_max> max_index)
|
||||
index_max = 0;
|
||||
index_max = max_index - index_max;
|
||||
} else {
|
||||
if (max_cpufreq_index > max_index)
|
||||
index_max = max_index;
|
||||
}
|
||||
if (min_cpufreq_index & MASK_CPUFREQ) {
|
||||
index_min = MAX_CPUFREQ - min_cpufreq_index;
|
||||
if (index_min > max_index)
|
||||
index_min = 0;
|
||||
index_min = max_index - index_min;
|
||||
} else {
|
||||
if (min_cpufreq_index > max_index)
|
||||
index_min = max_index;
|
||||
}
|
||||
c1_qos_request_value.max_cpufreq = table[index_max].frequency;
|
||||
c1_qos_request_value.min_cpufreq = table[index_min].frequency;
|
||||
pr_debug("::: m:%d, ii:%d-, mm:%d-",max_index, index_min,index_max);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int c0_cpufreq_qos_handler(struct notifier_block *b, unsigned long val, void *v)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
int ret = -1;
|
||||
|
||||
//get_online_cpus();
|
||||
policy = cpufreq_cpu_get(0);
|
||||
|
||||
if (!policy)
|
||||
return NOTIFY_BAD;
|
||||
|
||||
if (!policy->governor) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_BAD;
|
||||
}
|
||||
|
||||
if (strcmp(policy->governor->name, "interactive")) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
ret = get_c0_available_cpufreq();
|
||||
if (!ret) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_BAD;
|
||||
}
|
||||
|
||||
__cpufreq_driver_target(policy,
|
||||
c0_qos_request_value.min_cpufreq, CPUFREQ_RELATION_H);
|
||||
|
||||
cpufreq_cpu_put(policy);
|
||||
//put_online_cpus();
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block c0_cpufreq_qos_notifier = {
|
||||
.notifier_call = c0_cpufreq_qos_handler,
|
||||
};
|
||||
|
||||
static int c1_cpufreq_qos_handler(struct notifier_block *b, unsigned long val, void *v)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
int ret = -1;
|
||||
|
||||
pr_info(":::update_policy\n");
|
||||
/* in use, policy may be NULL, because hotplug can close first cpu core*/
|
||||
//get_online_cpus();
|
||||
policy = cpufreq_cpu_get(cluster1_first_cpu);
|
||||
|
||||
if (!policy)
|
||||
return NOTIFY_BAD;
|
||||
|
||||
if (!policy->governor) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_BAD;
|
||||
}
|
||||
|
||||
if (strcmp(policy->governor->name, "interactive")) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
ret = get_c1_available_cpufreq();
|
||||
if (ret) {
|
||||
cpufreq_cpu_put(policy);
|
||||
return NOTIFY_BAD;
|
||||
}
|
||||
|
||||
c1_cpufreq_update_flag = true;
|
||||
__cpufreq_driver_target(policy,
|
||||
c1_qos_request_value.min_cpufreq, CPUFREQ_RELATION_H);
|
||||
|
||||
//__cpufreq_driver_target(policy, val, CPUFREQ_RELATION_H);
|
||||
cpufreq_cpu_put(policy);
|
||||
|
||||
//put_online_cpus();
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block c1_cpufreq_qos_notifier = {
|
||||
.notifier_call = c1_cpufreq_qos_handler,
|
||||
};
|
||||
|
||||
static void c0_cpufreq_limit(struct work_struct *work)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
|
||||
policy = cpufreq_cpu_get(0);
|
||||
if (policy) {
|
||||
qos_cpufreq_flag = true;
|
||||
cpufreq_driver_target(policy,
|
||||
LITTLE_CPU_QOS_FREQ, CPUFREQ_RELATION_H);
|
||||
cpufreq_cpu_put(policy);
|
||||
}
|
||||
sched_set_boost(1);
|
||||
}
|
||||
|
||||
void c0_cpufreq_limit_queue(void)
|
||||
{
|
||||
if (qos_cpufreq_work_queue)
|
||||
queue_work(qos_cpufreq_work_queue, &c0_cpufreq_limit_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(c0_cpufreq_limit_queue);
|
||||
|
||||
static void c1_cpufreq_limit(struct work_struct *work)
|
||||
{
|
||||
struct cpufreq_policy *policy;
|
||||
|
||||
policy = cpufreq_cpu_get(cluster1_first_cpu);
|
||||
if (policy) {
|
||||
qos_cpufreq_flag = true;
|
||||
cpufreq_driver_target(policy,
|
||||
BIG_CPU_QOS_FREQ, CPUFREQ_RELATION_H);
|
||||
cpufreq_cpu_put(policy);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void c1_cpufreq_limit_queue(void)
|
||||
{
|
||||
if (qos_cpufreq_work_queue)
|
||||
queue_work(qos_cpufreq_work_queue, &c1_cpufreq_limit_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(c1_cpufreq_limit_queue);
|
||||
|
||||
static int __init msm_cpufreq_register(void)
|
||||
{
|
||||
int cpu, rc;
|
||||
|
@ -482,6 +756,15 @@ static int __init msm_cpufreq_register(void)
|
|||
suspend_mutex));
|
||||
return rc;
|
||||
}
|
||||
/* add cpufreq qos notify */
|
||||
pm_qos_add_notifier(PM_QOS_C0_CPUFREQ_MAX, &c0_cpufreq_qos_notifier);
|
||||
pm_qos_add_notifier(PM_QOS_C0_CPUFREQ_MIN, &c0_cpufreq_qos_notifier);
|
||||
pm_qos_add_notifier(PM_QOS_C1_CPUFREQ_MAX, &c1_cpufreq_qos_notifier);
|
||||
pm_qos_add_notifier(PM_QOS_C1_CPUFREQ_MIN, &c1_cpufreq_qos_notifier);
|
||||
|
||||
qos_cpufreq_work_queue = create_singlethread_workqueue("qos_cpufreq");
|
||||
if (qos_cpufreq_work_queue == NULL)
|
||||
pr_info("%s: failed to create work queue", __func__);
|
||||
|
||||
register_pm_notifier(&msm_cpufreq_pm_notifier);
|
||||
return cpufreq_register_driver(&msm_cpufreq_driver);
|
||||
|
|
|
@ -157,6 +157,11 @@ static bool sleep_disabled;
|
|||
module_param_named(sleep_disabled,
|
||||
sleep_disabled, bool, S_IRUGO | S_IWUSR | S_IWGRP);
|
||||
|
||||
void msm_cpuidle_set_sleep_disable(bool disable)
|
||||
{
|
||||
sleep_disabled = disable;
|
||||
}
|
||||
|
||||
s32 msm_cpuidle_get_deep_idle_latency(void)
|
||||
{
|
||||
return 10;
|
||||
|
|
|
@ -125,9 +125,6 @@ static int qti_ice_setting_config(struct request *req,
|
|||
return -EPERM;
|
||||
}
|
||||
|
||||
if (!setting)
|
||||
return -EINVAL;
|
||||
|
||||
if ((short)(crypto_data->key_index) >= 0) {
|
||||
|
||||
memcpy(&setting->crypto_data, crypto_data,
|
||||
|
@ -218,6 +215,8 @@ static int qcom_ice_bus_register(struct ice_device *ice_dev)
|
|||
}
|
||||
err = 0;
|
||||
|
||||
/* register again only if we didn't register previously */
|
||||
if (!ice_dev->bus_vote.client_handle) {
|
||||
ice_dev->bus_vote.client_handle =
|
||||
msm_bus_scale_register_client(bus_pdata);
|
||||
if (!ice_dev->bus_vote.client_handle) {
|
||||
|
@ -225,6 +224,7 @@ static int qcom_ice_bus_register(struct ice_device *ice_dev)
|
|||
__func__);
|
||||
err = -EFAULT;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/* cache the vote index for minimum and maximum bandwidth */
|
||||
|
@ -1615,8 +1615,6 @@ static struct ice_device *get_ice_device_from_storage_type
|
|||
|
||||
list_for_each_entry(ice_dev, &ice_devices, list) {
|
||||
if (!strcmp(ice_dev->ice_instance_type, storage_type)) {
|
||||
pr_debug("%s: found ice device %pK\n",
|
||||
__func__, ice_dev);
|
||||
return ice_dev;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,20 @@
|
|||
#define MAX_PATHS 2
|
||||
#define DBL_BUF 2
|
||||
|
||||
#include <linux/pm_qos.h>
|
||||
struct qos_request_v {
|
||||
int max_state;
|
||||
int max_devfreq;
|
||||
int min_devfreq;
|
||||
};
|
||||
|
||||
static bool cpubw_flag = false;
|
||||
static struct qos_request_v qos_request_value = {
|
||||
.max_state = 0,
|
||||
.max_devfreq = INT_MAX,
|
||||
.min_devfreq = 0,
|
||||
};
|
||||
|
||||
struct dev_data {
|
||||
struct msm_bus_vectors vectors[MAX_PATHS * DBL_BUF];
|
||||
struct msm_bus_paths bw_levels[DBL_BUF];
|
||||
|
@ -106,6 +120,53 @@ static void find_freq(struct devfreq_dev_profile *p, unsigned long *freq,
|
|||
*freq = atleast;
|
||||
}
|
||||
|
||||
static void find_freq_cpubw(struct devfreq_dev_profile *p, unsigned long *freq,
|
||||
u32 flags)
|
||||
{
|
||||
int i;
|
||||
unsigned long atmost, atleast, f;
|
||||
int min_index, max_index;
|
||||
|
||||
if (cpubw_flag) {
|
||||
min_index = qos_request_value.min_devfreq;
|
||||
if (p->max_state > qos_request_value.max_devfreq)
|
||||
max_index = qos_request_value.max_devfreq;
|
||||
else
|
||||
max_index = p->max_state;
|
||||
} else {
|
||||
min_index = 0;
|
||||
max_index = p->max_state;
|
||||
}
|
||||
|
||||
atmost = p->freq_table[min_index];
|
||||
atleast = p->freq_table[max_index-1];
|
||||
|
||||
for (i = min_index; i < max_index; i++) {
|
||||
f = p->freq_table[i];
|
||||
if (f <= *freq)
|
||||
atmost = max(f, atmost);
|
||||
if (f >= *freq)
|
||||
atleast = min(f, atleast);
|
||||
}
|
||||
|
||||
if (flags & DEVFREQ_FLAG_LEAST_UPPER_BOUND)
|
||||
*freq = atmost;
|
||||
else
|
||||
*freq = atleast;
|
||||
}
|
||||
|
||||
static int devbw_target_cpubw(struct device *dev, unsigned long *freq, u32 flags)
|
||||
{
|
||||
struct dev_data *d = dev_get_drvdata(dev);
|
||||
|
||||
find_freq_cpubw(&d->dp, freq, flags);
|
||||
|
||||
if (!d->gov_ab)
|
||||
return set_bw(dev, *freq, find_ab(d, freq));
|
||||
else
|
||||
return set_bw(dev, *freq, d->gov_ab);
|
||||
}
|
||||
|
||||
static int devbw_target(struct device *dev, unsigned long *freq, u32 flags)
|
||||
{
|
||||
struct dev_data *d = dev_get_drvdata(dev);
|
||||
|
@ -127,6 +188,43 @@ static int devbw_get_dev_status(struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int devfreq_qos_handler(struct notifier_block *b, unsigned long val, void *v)
|
||||
{
|
||||
unsigned int max_devfreq_index, min_devfreq_index;
|
||||
unsigned int index_max, index_min;
|
||||
|
||||
max_devfreq_index = (unsigned int)pm_qos_request(PM_QOS_DEVFREQ_MAX);
|
||||
min_devfreq_index = (unsigned int)pm_qos_request(PM_QOS_DEVFREQ_MIN);
|
||||
|
||||
/* add limit */
|
||||
if (max_devfreq_index & MASK_CPUFREQ) {
|
||||
index_max = MAX_CPUFREQ - max_devfreq_index;
|
||||
if (index_max > qos_request_value.max_state)
|
||||
index_max = 0;
|
||||
index_max = qos_request_value.max_state - index_max;
|
||||
} else {
|
||||
if (max_devfreq_index > qos_request_value.max_state)
|
||||
index_max = qos_request_value.max_state;
|
||||
}
|
||||
if (min_devfreq_index & MASK_CPUFREQ) {
|
||||
index_min = MAX_CPUFREQ - min_devfreq_index;
|
||||
if (index_min > (qos_request_value.max_state-1))
|
||||
index_min = 0;
|
||||
index_min = qos_request_value.max_state -1 - index_min;
|
||||
} else {
|
||||
if (min_devfreq_index > qos_request_value.max_state)
|
||||
index_min = qos_request_value.max_state -1;
|
||||
}
|
||||
|
||||
qos_request_value.min_devfreq = index_min;
|
||||
qos_request_value.max_devfreq = index_max;
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
static struct notifier_block devfreq_qos_notifier = {
|
||||
.notifier_call = devfreq_qos_handler,
|
||||
};
|
||||
|
||||
#define PROP_PORTS "qcom,src-dst-ports"
|
||||
#define PROP_TBL "qcom,bw-tbl"
|
||||
#define PROP_AB_PER "qcom,ab-percent"
|
||||
|
@ -182,7 +280,11 @@ int devfreq_add_devbw(struct device *dev)
|
|||
|
||||
p = &d->dp;
|
||||
p->polling_ms = 50;
|
||||
p->target = devbw_target;
|
||||
if (strstr(d->bw_data.name, "soc:qcom,cpubw") != NULL) {
|
||||
p->target = devbw_target_cpubw;
|
||||
cpubw_flag = true;
|
||||
} else
|
||||
p->target = devbw_target;
|
||||
p->get_dev_status = devbw_get_dev_status;
|
||||
|
||||
if (of_find_property(dev->of_node, PROP_TBL, &len)) {
|
||||
|
@ -231,6 +333,11 @@ int devfreq_add_devbw(struct device *dev)
|
|||
return PTR_ERR(d->df);
|
||||
}
|
||||
|
||||
if (cpubw_flag) {
|
||||
qos_request_value.max_state = len;
|
||||
qos_request_value.min_devfreq = 0;
|
||||
qos_request_value.max_devfreq = len;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -281,6 +388,10 @@ static struct platform_driver devbw_driver = {
|
|||
|
||||
static int __init devbw_init(void)
|
||||
{
|
||||
/* add cpufreq qos notify */
|
||||
cpubw_flag = false;
|
||||
pm_qos_add_notifier(PM_QOS_DEVFREQ_MAX, &devfreq_qos_notifier);
|
||||
pm_qos_add_notifier(PM_QOS_DEVFREQ_MIN, &devfreq_qos_notifier);
|
||||
platform_driver_register(&devbw_driver);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -273,8 +273,10 @@ int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state)
|
|||
unsigned long flags;
|
||||
bool attached;
|
||||
|
||||
if (!edev)
|
||||
if (!edev) {
|
||||
dev_err(&edev->dev, "enval err\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&edev->lock, flags);
|
||||
|
||||
|
@ -284,6 +286,7 @@ int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state)
|
|||
if (check_mutually_exclusive(edev, (edev->state & ~mask) |
|
||||
(state & mask))) {
|
||||
spin_unlock_irqrestore(&edev->lock, flags);
|
||||
dev_err(&edev->dev, "out because of mutually_exclusive\n");
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
|
@ -293,9 +296,12 @@ int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state)
|
|||
|
||||
for (index = 0; index < edev->max_supported; index++) {
|
||||
if (is_extcon_changed(old_state, edev->state, index,
|
||||
&attached))
|
||||
&attached)) {
|
||||
dev_err(&edev->dev, "index=%d,attached=%d\n",
|
||||
index, attached);
|
||||
raw_notifier_call_chain(&edev->nh[index],
|
||||
attached, edev);
|
||||
}
|
||||
}
|
||||
|
||||
/* This could be in interrupt handler */
|
||||
|
@ -412,15 +418,21 @@ int extcon_set_cable_state_(struct extcon_dev *edev, unsigned int id,
|
|||
u32 state;
|
||||
int index;
|
||||
|
||||
if (!edev)
|
||||
if (!edev) {
|
||||
dev_err(&edev->dev, "dev enval err\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
index = find_cable_index_by_id(edev, id);
|
||||
if (index < 0)
|
||||
if (index < 0) {
|
||||
dev_err(&edev->dev, "index is valid\n");
|
||||
return index;
|
||||
}
|
||||
|
||||
if (edev->max_supported && edev->max_supported <= index)
|
||||
if (edev->max_supported && edev->max_supported <= index) {
|
||||
dev_err(&edev->dev, "index is larger than max_supported\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
state = cable_state ? (1 << index) : 0;
|
||||
return extcon_update_state(edev, 1 << index, state);
|
||||
|
@ -592,6 +604,7 @@ int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
|
|||
return -EINVAL;
|
||||
|
||||
idx = find_cable_index_by_id(edev, id);
|
||||
dev_err(&edev->dev, "register nt id:%d(%d)\n", id, idx);
|
||||
|
||||
spin_lock_irqsave(&edev->lock, flags);
|
||||
ret = raw_notifier_chain_register(&edev->nh[idx], nb);
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <soc/qcom/qseecomi.h>
|
||||
|
||||
|
@ -942,6 +944,95 @@ err1:
|
|||
g_ion_clnt = NULL;
|
||||
}
|
||||
|
||||
static ssize_t proc_qsee_log_func(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
|
||||
{
|
||||
int len = 0;
|
||||
memcpy_fromio((void *)tzdbg.diag_buf, tzdbg.virt_iobase,
|
||||
debug_rw_buf_size);
|
||||
memcpy_fromio((void *)tzdbg.hyp_diag_buf, tzdbg.hyp_virt_iobase,
|
||||
tzdbg.hyp_debug_rw_buf_size);
|
||||
len = _disp_qsee_log_stats(count);
|
||||
*ppos = 0;
|
||||
|
||||
if (len > count)
|
||||
len = count;
|
||||
|
||||
return simple_read_from_buffer(user_buf, len, ppos, tzdbg.stat[6].data, len);
|
||||
}
|
||||
|
||||
|
||||
static const struct file_operations proc_qsee_log_fops = {
|
||||
.read = proc_qsee_log_func,
|
||||
.open = simple_open,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static ssize_t proc_tz_log_func(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
|
||||
{
|
||||
int len = 0;
|
||||
memcpy_fromio((void *)tzdbg.diag_buf, tzdbg.virt_iobase,
|
||||
debug_rw_buf_size);
|
||||
memcpy_fromio((void *)tzdbg.hyp_diag_buf, tzdbg.hyp_virt_iobase,
|
||||
tzdbg.hyp_debug_rw_buf_size);
|
||||
|
||||
if (TZBSP_DIAG_MAJOR_VERSION_LEGACY <
|
||||
(tzdbg.diag_buf->version >> 16)) {
|
||||
len = _disp_tz_log_stats(count);
|
||||
*ppos = 0;
|
||||
} else {
|
||||
len = _disp_tz_log_stats_legacy();
|
||||
}
|
||||
|
||||
if (len > count)
|
||||
len = count;
|
||||
|
||||
return simple_read_from_buffer(user_buf, len, ppos, tzdbg.stat[5].data, len);
|
||||
}
|
||||
|
||||
static const struct file_operations proc_tz_log_fops = {
|
||||
.read = proc_tz_log_func,
|
||||
.open = simple_open,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int tzprocfs_init(struct platform_device *pdev)
|
||||
{
|
||||
|
||||
int rc = 0;
|
||||
struct proc_dir_entry *prEntry_tmp = NULL;
|
||||
struct proc_dir_entry *prEntry_dir = NULL;
|
||||
|
||||
prEntry_dir = proc_mkdir("tzdbg", NULL);
|
||||
|
||||
if (prEntry_dir == NULL) {
|
||||
dev_err(&pdev->dev, "tzdbg procfs_create_dir failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
prEntry_tmp = proc_create("qsee_log", 0666, prEntry_dir, &proc_qsee_log_fops);
|
||||
|
||||
if (prEntry_tmp == NULL) {
|
||||
dev_err(&pdev->dev, "TZ procfs_create_file qsee_log failed\n");
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
prEntry_tmp = proc_create("tz_log", 0666, prEntry_dir, &proc_tz_log_fops);
|
||||
|
||||
if (prEntry_tmp == NULL) {
|
||||
dev_err(&pdev->dev, "TZ procfs_create_file tz_log failed\n");
|
||||
rc = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
proc_remove(prEntry_dir);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static int tzdbgfs_init(struct platform_device *pdev)
|
||||
{
|
||||
int rc = 0;
|
||||
|
@ -1155,6 +1246,9 @@ static int tz_log_probe(struct platform_device *pdev)
|
|||
if (tzdbgfs_init(pdev))
|
||||
goto err;
|
||||
|
||||
if (tzprocfs_init(pdev))
|
||||
goto err;
|
||||
|
||||
tzdbg_register_qsee_log_buf();
|
||||
|
||||
tzdbg_get_tz_version();
|
||||
|
|
|
@ -212,6 +212,8 @@ source "drivers/input/tablet/Kconfig"
|
|||
|
||||
source "drivers/input/touchscreen/Kconfig"
|
||||
|
||||
source "drivers/input/fingerprint/Kconfig"
|
||||
|
||||
source "drivers/input/misc/Kconfig"
|
||||
|
||||
endif
|
||||
|
|
|
@ -23,6 +23,7 @@ obj-$(CONFIG_INPUT_MOUSE) += mouse/
|
|||
obj-$(CONFIG_INPUT_JOYSTICK) += joystick/
|
||||
obj-$(CONFIG_INPUT_TABLET) += tablet/
|
||||
obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/
|
||||
obj-$(CONFIG_INPUT_FINGERPRINT) += fingerprint/
|
||||
obj-$(CONFIG_INPUT_MISC) += misc/
|
||||
|
||||
obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o
|
||||
|
|
24
drivers/input/fingerprint/Kconfig
Normal file
24
drivers/input/fingerprint/Kconfig
Normal file
|
@ -0,0 +1,24 @@
|
|||
menuconfig INPUT_FINGERPRINT
|
||||
bool "Fingerprint"
|
||||
default y
|
||||
help
|
||||
Say Y here, and a list of supported fingerprint will be displayed.
|
||||
This option doesn't affect the kernel.
|
||||
|
||||
If unsure, say Y.
|
||||
|
||||
if INPUT_FINGERPRINT
|
||||
|
||||
config FINGERPRINT_DETECT
|
||||
tristate "fingerprint detect support"
|
||||
depends on SPI_MASTER
|
||||
|
||||
config FINGERPRINT_FPC
|
||||
tristate "fpc fingerprint sensor support"
|
||||
depends on SPI_MASTER
|
||||
|
||||
config FINGERPRINT_GOODIX
|
||||
tristate "goodix fingerprint sensor support"
|
||||
depends on SPI_MASTER
|
||||
|
||||
endif
|
4
drivers/input/fingerprint/Makefile
Normal file
4
drivers/input/fingerprint/Makefile
Normal file
|
@ -0,0 +1,4 @@
|
|||
#fingerprint_detect should before fpc1022
|
||||
obj-$(CONFIG_FINGERPRINT_DETECT) += fingerprint_detect/
|
||||
obj-$(CONFIG_FINGERPRINT_FPC) += fpc/
|
||||
obj-$(CONFIG_FINGERPRINT_GOODIX) += goodix/
|
1
drivers/input/fingerprint/fingerprint_detect/Makefile
Normal file
1
drivers/input/fingerprint/fingerprint_detect/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_FINGERPRINT_DETECT) += fingerprint_detect.o
|
|
@ -0,0 +1,251 @@
|
|||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/project_info.h>
|
||||
|
||||
#include "fingerprint_detect.h"
|
||||
int fp_version;
|
||||
|
||||
static int fingerprint_detect_request_named_gpio(
|
||||
struct fingerprint_detect_data *fp_detect,
|
||||
const char *label, int *gpio)
|
||||
{
|
||||
struct device *dev = fp_detect->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
int rc = of_get_named_gpio(np, label, 0);
|
||||
|
||||
if (rc < 0) {
|
||||
dev_err(dev, "failed to get '%s'\n", label);
|
||||
*gpio = rc;
|
||||
return rc;
|
||||
}
|
||||
*gpio = rc;
|
||||
rc = devm_gpio_request(dev, *gpio, label);
|
||||
if (rc) {
|
||||
dev_err(dev, "failed to request gpio %d\n", *gpio);
|
||||
return rc;
|
||||
}
|
||||
dev_info(dev, "%s - gpio: %d\n", label, *gpio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t sensor_version_get(struct device *device,
|
||||
struct device_attribute *attribute,
|
||||
char *buffer)
|
||||
{
|
||||
struct fingerprint_detect_data *fp_detect = dev_get_drvdata(device);
|
||||
|
||||
return scnprintf(buffer, PAGE_SIZE, "%i\n", fp_detect->sensor_version);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(sensor_version, S_IRUSR, sensor_version_get, NULL);
|
||||
|
||||
static struct attribute *attributes[] = {
|
||||
&dev_attr_sensor_version.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group attribute_group = {
|
||||
.attrs = attributes,
|
||||
};
|
||||
|
||||
int fp_pinctrl_init(struct fingerprint_detect_data *fp_dev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct device *dev = fp_dev->dev;
|
||||
|
||||
fp_dev->fp_pinctrl = devm_pinctrl_get(dev);
|
||||
if (IS_ERR_OR_NULL(fp_dev->fp_pinctrl)) {
|
||||
dev_err(dev, "Target does not use pinctrl\n");
|
||||
ret = PTR_ERR(fp_dev->fp_pinctrl);
|
||||
goto err;
|
||||
}
|
||||
|
||||
fp_dev->fp_enable =
|
||||
pinctrl_lookup_state(fp_dev->fp_pinctrl, "fp_enable");
|
||||
if (IS_ERR_OR_NULL(fp_dev->fp_enable)) {
|
||||
dev_err(dev, "Cannot get fp_enable\n");
|
||||
ret = PTR_ERR(fp_dev->fp_enable);
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = pinctrl_select_state(fp_dev->fp_pinctrl, fp_dev->fp_enable);
|
||||
if (ret) {
|
||||
dev_err(dev, "can not set %s pins\n", "fp_enable");
|
||||
goto err;
|
||||
}
|
||||
|
||||
fp_dev->id_state_init =
|
||||
pinctrl_lookup_state(fp_dev->fp_pinctrl, "fp_id_init");
|
||||
if (IS_ERR_OR_NULL(fp_dev->id_state_init)) {
|
||||
dev_err(dev, "Cannot get fp_id_init\n");
|
||||
ret = PTR_ERR(fp_dev->id_state_init);
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = pinctrl_select_state(fp_dev->fp_pinctrl, fp_dev->id_state_init);
|
||||
if (ret) {
|
||||
dev_err(dev, "can not set %s pins\n", "id_state_init");
|
||||
goto err;
|
||||
}
|
||||
|
||||
err:
|
||||
fp_dev->fp_pinctrl = NULL;
|
||||
fp_dev->id_state_init = NULL;
|
||||
fp_dev->fp_enable = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fingerprint_detect_probe(struct platform_device *pdev)
|
||||
{
|
||||
int id0, id1, id2;
|
||||
int rc = 0;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
|
||||
struct fingerprint_detect_data *fp_detect =
|
||||
devm_kzalloc(dev, sizeof(*fp_detect),
|
||||
GFP_KERNEL);
|
||||
if (!fp_detect) {
|
||||
dev_err(dev,
|
||||
"failed to allocate memory for struct fingerprint_detect_data\n");
|
||||
rc = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
pr_info("%s\n", __func__);
|
||||
|
||||
fp_detect->dev = dev;
|
||||
dev_set_drvdata(dev, fp_detect);
|
||||
|
||||
if (!np) {
|
||||
dev_err(dev, "no of node found\n");
|
||||
rc = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
if (of_property_read_bool(fp_detect->dev->of_node, "oem,dumpling"))
|
||||
fp_detect->project_version = 0x02;
|
||||
else
|
||||
fp_detect->project_version = 0x01;
|
||||
|
||||
rc = fp_pinctrl_init(fp_detect);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
rc = fingerprint_detect_request_named_gpio(fp_detect, "fp-gpio-id0",
|
||||
&fp_detect->id0_gpio);
|
||||
if (gpio_is_valid(fp_detect->id0_gpio)) {
|
||||
dev_err(dev, "%s: gpio_is_valid(fp_detect->id0_gpio=%d)\n",
|
||||
__func__, fp_detect->id0_gpio);
|
||||
}
|
||||
|
||||
rc = fingerprint_detect_request_named_gpio(fp_detect, "fp-gpio-id1",
|
||||
&fp_detect->id1_gpio);
|
||||
if (gpio_is_valid(fp_detect->id1_gpio)) {
|
||||
dev_err(dev, "%s: gpio_is_valid(fp_detect->id1_gpio=%d)\n",
|
||||
__func__, fp_detect->id1_gpio);
|
||||
}
|
||||
|
||||
rc = fingerprint_detect_request_named_gpio(fp_detect, "fp-gpio-id2",
|
||||
&fp_detect->id2_gpio);
|
||||
if (gpio_is_valid(fp_detect->id2_gpio)) {
|
||||
dev_err(dev, "%s: gpio_is_valid(fp_detect->id2_gpio=%d)\n",
|
||||
__func__, fp_detect->id2_gpio);
|
||||
}
|
||||
|
||||
rc = sysfs_create_group(&dev->kobj, &attribute_group);
|
||||
if (rc) {
|
||||
dev_err(dev, "could not create sysfs\n");
|
||||
goto exit;
|
||||
}
|
||||
/**
|
||||
* ID0(GPIO39) ID1(GPIO41) ID1(GPIO63)
|
||||
* fpc1245
|
||||
* O-film 1 1 1
|
||||
* Primax 1 0 0
|
||||
* truly 0 0 1
|
||||
*
|
||||
* fpc1263
|
||||
* O-film 1 1 0
|
||||
* Primax 0 0 0
|
||||
* truly 0 1 1
|
||||
*fingerchip/
|
||||
* qtech 0 1 0
|
||||
* Goodix 1 0 1
|
||||
*/
|
||||
id0 = gpio_get_value(fp_detect->id0_gpio);
|
||||
id1 = gpio_get_value(fp_detect->id1_gpio);
|
||||
id2 = gpio_get_value(fp_detect->id2_gpio);
|
||||
pr_info("%s:id %d%d%d\n", __func__, id0, id1, id2);
|
||||
if (id0 && id1 && id2) {
|
||||
if (0x02 == fp_detect->project_version)
|
||||
push_component_info(FINGERPRINTS, "fpc1022", "FPC(OF)");
|
||||
else
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(OF)");
|
||||
fp_detect->sensor_version = 0x01;
|
||||
} else if (id0 && !id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(Primax)");
|
||||
fp_detect->sensor_version = 0x01;
|
||||
} else if (!id0 && !id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(truly)");
|
||||
fp_detect->sensor_version = 0x01;
|
||||
} else if (id0 && id1 && !id2) {
|
||||
if (0x02 == fp_detect->project_version) {
|
||||
push_component_info(FINGERPRINTS, "goodix3268", "goodix");
|
||||
fp_detect->sensor_version = 0x03;
|
||||
} else {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(OF)");
|
||||
fp_detect->sensor_version = 0x02;
|
||||
}
|
||||
} else if (!id0 && !id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(Primax)");
|
||||
fp_detect->sensor_version = 0x02;
|
||||
} else if (!id0 && id1 && id2) {
|
||||
if (0x02 == fp_detect->project_version) {
|
||||
push_component_info(FINGERPRINTS, "gfp5288", "Goodix");
|
||||
fp_detect->sensor_version = 0x03;
|
||||
} else {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(truly)");
|
||||
fp_detect->sensor_version = 0x02;
|
||||
}
|
||||
} else if (!id0 && id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(f/p)");
|
||||
fp_detect->sensor_version = 0x02;
|
||||
} else if (id0 && !id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "gfp5288", "Goodix");
|
||||
fp_detect->sensor_version = 0x03;
|
||||
} else {
|
||||
push_component_info(FINGERPRINTS, "fpc", "PC");
|
||||
}
|
||||
|
||||
fp_version = fp_detect->sensor_version;
|
||||
dev_info(dev, "%s: ok\n", __func__);
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static const struct of_device_id fingerprint_detect_of_match[] = {
|
||||
{ .compatible = "oneplus,fpdetect", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(op, fingerprint_detect_of_match);
|
||||
|
||||
static struct platform_driver fingerprint_detect_driver = {
|
||||
.driver = {
|
||||
.name = "fingerprint_detect",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fingerprint_detect_of_match,
|
||||
},
|
||||
.probe = fingerprint_detect_probe,
|
||||
};
|
||||
module_platform_driver(fingerprint_detect_driver);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("yale liu");
|
||||
MODULE_DESCRIPTION("Fingerprint detect device driver.");
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __FINGERPRINT_DETETC_H_
|
||||
#define __FINGERPRINT_DETETC_H_
|
||||
|
||||
struct fingerprint_detect_data {
|
||||
struct device *dev;
|
||||
int id0_gpio;
|
||||
int id1_gpio;
|
||||
int id2_gpio;
|
||||
struct pinctrl *fp_pinctrl;
|
||||
struct pinctrl_state *id_state_init;
|
||||
struct pinctrl_state *fp_enable;
|
||||
int sensor_version;
|
||||
int project_version;
|
||||
};
|
||||
extern int fp_version;
|
||||
#endif
|
||||
|
1
drivers/input/fingerprint/fpc/Makefile
Normal file
1
drivers/input/fingerprint/fpc/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_FINGERPRINT_FPC) += fpc1020_tee.o
|
718
drivers/input/fingerprint/fpc/fpc1020_tee.c
Normal file
718
drivers/input/fingerprint/fpc/fpc1020_tee.c
Normal file
|
@ -0,0 +1,718 @@
|
|||
/*
|
||||
* FPC1020 Fingerprint sensor device driver
|
||||
*
|
||||
* This driver will control the platform resources that the FPC fingerprint
|
||||
* sensor needs to operate. The major things are probing the sensor to check
|
||||
* that it is actually connected and let the Kernel know this and with that also
|
||||
* enabling and disabling of regulators, enabling and disabling of platform
|
||||
* clocks, controlling GPIOs such as SPI chip select, sensor reset line, sensor
|
||||
* IRQ line, MISO and MOSI lines.
|
||||
*
|
||||
* The driver will expose most of its available functionality in sysfs which
|
||||
* enables dynamic control of these features from eg. a user space process.
|
||||
*
|
||||
* The sensor's IRQ events will be pushed to Kernel's event handling system and
|
||||
* are exposed in the drivers event node. This makes it possible for a user
|
||||
* space process to poll the input node and receive IRQ events easily. Usually
|
||||
* this node is available under /dev/input/eventX where 'X' is a number given by
|
||||
* the event system. A user space process will need to traverse all the event
|
||||
* nodes and ask for its parent's name (through EVIOCGNAME) which should match
|
||||
* the value in device tree named input-device-name.
|
||||
*
|
||||
* This driver will NOT send any SPI commands to the sensor it only controls the
|
||||
* electrical parts.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2015 Fingerprint Cards AB <tech@fingerprints.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License Version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <soc/qcom/scm.h>
|
||||
|
||||
#include <linux/wakelock.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifdef CONFIG_FB
|
||||
#include <linux/fb.h>
|
||||
#include <linux/notifier.h>
|
||||
#endif
|
||||
|
||||
#include <linux/project_info.h>
|
||||
#include "../fingerprint_detect/fingerprint_detect.h"
|
||||
|
||||
static unsigned int ignor_home_for_ESD = 0;
|
||||
module_param(ignor_home_for_ESD, uint, S_IRUGO | S_IWUSR);
|
||||
|
||||
#define FPC1020_RESET_LOW_US 1000
|
||||
#define FPC1020_RESET_HIGH1_US 100
|
||||
#define FPC1020_RESET_HIGH2_US 1250
|
||||
#define FPC_TTW_HOLD_TIME 1000
|
||||
|
||||
#define ONEPLUS_EDIT //Onplus modify for msm8996 platform and 15801 HW
|
||||
|
||||
struct fpc1020_data {
|
||||
struct device *dev;
|
||||
struct wake_lock ttw_wl;
|
||||
int irq_gpio;
|
||||
int rst_gpio;
|
||||
int irq_num;
|
||||
struct mutex lock;
|
||||
bool prepared;
|
||||
|
||||
struct pinctrl *ts_pinctrl;
|
||||
struct pinctrl_state *gpio_state_active;
|
||||
struct pinctrl_state *gpio_state_suspend;
|
||||
|
||||
#ifdef ONEPLUS_EDIT
|
||||
int EN_VDD_gpio;
|
||||
int id0_gpio;
|
||||
int id1_gpio;
|
||||
int id2_gpio;
|
||||
struct input_dev *input_dev;
|
||||
int screen_state;
|
||||
/*int sensor_version;*/
|
||||
int project_version;
|
||||
#endif
|
||||
#if defined(CONFIG_FB)
|
||||
struct notifier_block fb_notif;
|
||||
#endif
|
||||
};
|
||||
|
||||
static int fpc1020_request_named_gpio(struct fpc1020_data *fpc1020,
|
||||
const char *label, int *gpio)
|
||||
{
|
||||
struct device *dev = fpc1020->dev;
|
||||
struct device_node *np = dev->of_node;
|
||||
int rc = of_get_named_gpio(np, label, 0);
|
||||
if (rc < 0) {
|
||||
dev_err(dev, "failed to get '%s'\n", label);
|
||||
*gpio = rc;
|
||||
return rc;
|
||||
}
|
||||
*gpio = rc;
|
||||
rc = devm_gpio_request(dev, *gpio, label);
|
||||
if (rc) {
|
||||
dev_err(dev, "failed to request gpio %d\n", *gpio);
|
||||
return rc;
|
||||
}
|
||||
dev_info(dev, "%s - gpio: %d\n", label, *gpio);
|
||||
return 0;
|
||||
}
|
||||
#ifndef ONEPLUS_EDIT
|
||||
/* -------------------------------------------------------------------- */
|
||||
static int fpc1020_pinctrl_init(struct fpc1020_data *fpc1020)
|
||||
{
|
||||
int ret = 0;
|
||||
struct device *dev = fpc1020->dev;
|
||||
|
||||
fpc1020->ts_pinctrl = devm_pinctrl_get(dev);
|
||||
if (IS_ERR_OR_NULL(fpc1020->ts_pinctrl)) {
|
||||
dev_err(dev, "Target does not use pinctrl\n");
|
||||
ret = PTR_ERR(fpc1020->ts_pinctrl);
|
||||
goto err;
|
||||
}
|
||||
|
||||
fpc1020->gpio_state_active =
|
||||
pinctrl_lookup_state(fpc1020->ts_pinctrl, "pmx_fp_active");
|
||||
if (IS_ERR_OR_NULL(fpc1020->gpio_state_active)) {
|
||||
dev_err(dev, "Cannot get active pinstate\n");
|
||||
ret = PTR_ERR(fpc1020->gpio_state_active);
|
||||
goto err;
|
||||
}
|
||||
|
||||
fpc1020->gpio_state_suspend =
|
||||
pinctrl_lookup_state(fpc1020->ts_pinctrl, "pmx_fp_suspend");
|
||||
if (IS_ERR_OR_NULL(fpc1020->gpio_state_suspend)) {
|
||||
dev_err(dev, "Cannot get sleep pinstate\n");
|
||||
ret = PTR_ERR(fpc1020->gpio_state_suspend);
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
fpc1020->ts_pinctrl = NULL;
|
||||
fpc1020->gpio_state_active = NULL;
|
||||
fpc1020->gpio_state_suspend = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
static int fpc1020_pinctrl_select(struct fpc1020_data *fpc1020, bool on)
|
||||
{
|
||||
int ret = 0;
|
||||
struct pinctrl_state *pins_state;
|
||||
struct device *dev = fpc1020->dev;
|
||||
|
||||
pins_state = on ? fpc1020->gpio_state_active : fpc1020->gpio_state_suspend;
|
||||
if (!IS_ERR_OR_NULL(pins_state)) {
|
||||
ret = pinctrl_select_state(fpc1020->ts_pinctrl, pins_state);
|
||||
if (ret) {
|
||||
dev_err(dev, "can not set %s pins\n",
|
||||
on ? "pmx_ts_active" : "pmx_ts_suspend");
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
dev_err(dev, "not a valid '%s' pinstate\n",
|
||||
on ? "pmx_ts_active" : "pmx_ts_suspend");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
static int hw_reset(struct fpc1020_data *fpc1020)
|
||||
{
|
||||
int irq_gpio;
|
||||
struct device *dev = fpc1020->dev;
|
||||
|
||||
int rc = select_pin_ctl(fpc1020, "fpc1020_reset_active");
|
||||
if (rc)
|
||||
goto exit;
|
||||
usleep_range(FPC1020_RESET_HIGH1_US, FPC1020_RESET_HIGH1_US + 100);
|
||||
|
||||
rc = select_pin_ctl(fpc1020, "fpc1020_reset_reset");
|
||||
if (rc)
|
||||
goto exit;
|
||||
usleep_range(FPC1020_RESET_LOW_US, FPC1020_RESET_LOW_US + 100);
|
||||
|
||||
rc = select_pin_ctl(fpc1020, "fpc1020_reset_active");
|
||||
if (rc)
|
||||
goto exit;
|
||||
usleep_range(FPC1020_RESET_HIGH1_US, FPC1020_RESET_HIGH1_US + 100);
|
||||
|
||||
irq_gpio = gpio_get_value(fpc1020->irq_gpio);
|
||||
dev_info(dev, "IRQ after reset %d\n", irq_gpio);
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int hw_reset(struct fpc1020_data *fpc1020)
|
||||
{
|
||||
int irq_gpio;
|
||||
struct device *dev = fpc1020->dev;
|
||||
int counter = 2;
|
||||
|
||||
gpio_set_value(fpc1020->EN_VDD_gpio, 0);
|
||||
mdelay(3);
|
||||
gpio_set_value(fpc1020->EN_VDD_gpio, 1);
|
||||
mdelay(3);
|
||||
//gpio_direction_output(fpc1020->EN_VDD_gpio,1);
|
||||
|
||||
while (counter) {
|
||||
counter--;
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 1);
|
||||
udelay(FPC1020_RESET_HIGH1_US);
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 0);
|
||||
udelay(FPC1020_RESET_LOW_US);
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 1);
|
||||
udelay(FPC1020_RESET_HIGH2_US);
|
||||
|
||||
irq_gpio = gpio_get_value(fpc1020->irq_gpio);
|
||||
dev_err(dev, "IRQ after reset %d\n", irq_gpio);
|
||||
if (irq_gpio) {
|
||||
//printk(KERN_INFO "%s OK !\n", __func__);
|
||||
counter = 0;
|
||||
} else {
|
||||
dev_err(dev, "%s timed out,retrying ...\n",
|
||||
__func__);
|
||||
|
||||
udelay(1250);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static ssize_t hw_reset_set(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
int rc;
|
||||
struct fpc1020_data *fpc1020 = dev_get_drvdata(dev);
|
||||
|
||||
if (!strncmp(buf, "reset", strlen("reset")))
|
||||
rc = hw_reset(fpc1020);
|
||||
else
|
||||
return -EINVAL;
|
||||
return rc ? rc : count;
|
||||
}
|
||||
static DEVICE_ATTR(hw_reset, S_IWUSR, NULL, hw_reset_set);
|
||||
|
||||
*/
|
||||
/**
|
||||
* sysf node to check the interrupt status of the sensor, the interrupt
|
||||
* handler should perform sysf_notify to allow userland to poll the node.
|
||||
*/
|
||||
static ssize_t irq_get(struct device* device,
|
||||
struct device_attribute* attribute,
|
||||
char* buffer)
|
||||
{
|
||||
struct fpc1020_data* fpc1020 = dev_get_drvdata(device);
|
||||
int irq = gpio_get_value(fpc1020->irq_gpio);
|
||||
return scnprintf(buffer, PAGE_SIZE, "%i\n", irq);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* writing to the irq node will just drop a printk message
|
||||
* and return success, used for latency measurement.
|
||||
*/
|
||||
static ssize_t irq_ack(struct device* device,
|
||||
struct device_attribute* attribute,
|
||||
const char* buffer, size_t count)
|
||||
{
|
||||
struct fpc1020_data* fpc1020 = dev_get_drvdata(device);
|
||||
dev_dbg(fpc1020->dev, "%s\n", __func__);
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(irq, S_IRUSR | S_IWUSR, irq_get, irq_ack);
|
||||
|
||||
|
||||
static ssize_t report_home_set(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct fpc1020_data *fpc1020 = dev_get_drvdata(dev);
|
||||
//unsigned long time;
|
||||
|
||||
if(ignor_home_for_ESD)
|
||||
return -EINVAL;
|
||||
if (!strncmp(buf, "down", strlen("down")))
|
||||
{
|
||||
input_report_key(fpc1020->input_dev,
|
||||
KEY_HOME, 1);
|
||||
input_sync(fpc1020->input_dev);
|
||||
}
|
||||
else if (!strncmp(buf, "up", strlen("up")))
|
||||
{
|
||||
input_report_key(fpc1020->input_dev,
|
||||
KEY_HOME, 0);
|
||||
input_sync(fpc1020->input_dev);
|
||||
}
|
||||
else if (!strncmp(buf, "timeout", strlen("timeout")))
|
||||
{
|
||||
input_report_key(fpc1020->input_dev,KEY_F2,1);
|
||||
input_sync(fpc1020->input_dev);
|
||||
input_report_key(fpc1020->input_dev,KEY_F2,0);
|
||||
input_sync(fpc1020->input_dev);
|
||||
}
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(report_home, S_IWUSR, NULL, report_home_set);
|
||||
|
||||
static ssize_t report_key_set(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
struct input_event *ev = (struct input_event *)buf;
|
||||
struct fpc1020_data *fpc1020 = dev_get_drvdata(dev);
|
||||
|
||||
input_event(fpc1020->input_dev, ev->type, ev->code, ev->value);
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(report_key, S_IWUSR, NULL, report_key_set);
|
||||
static ssize_t update_info_set(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
//struct fpc1020_data *fpc1020 = dev_get_drvdata(dev);
|
||||
|
||||
if (!strncmp(buf, "n", strlen("n")))
|
||||
{
|
||||
push_component_info(FINGERPRINTS,"N/A" , "N/A");
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(update_info, S_IWUSR, NULL, update_info_set);
|
||||
|
||||
static ssize_t screen_state_get(struct device* device,
|
||||
struct device_attribute* attribute,
|
||||
char* buffer)
|
||||
{
|
||||
struct fpc1020_data* fpc1020 = dev_get_drvdata(device);
|
||||
return scnprintf(buffer, PAGE_SIZE, "%i\n", fpc1020->screen_state);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(screen_state, S_IRUSR , screen_state_get, NULL);
|
||||
/*
|
||||
static ssize_t sensor_version_get(struct device* device,
|
||||
struct device_attribute* attribute,
|
||||
char* buffer)
|
||||
{
|
||||
struct fpc1020_data* fpc1020 = dev_get_drvdata(device);
|
||||
return scnprintf(buffer, PAGE_SIZE, "%i\n", fpc1020->sensor_version);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(sensor_version, S_IRUSR , sensor_version_get, NULL);
|
||||
*/
|
||||
static struct attribute *attributes[] = {
|
||||
//&dev_attr_hw_reset.attr,
|
||||
&dev_attr_irq.attr,
|
||||
&dev_attr_report_home.attr,
|
||||
&dev_attr_update_info.attr,
|
||||
&dev_attr_screen_state.attr,
|
||||
/*&dev_attr_sensor_version.attr,*/
|
||||
&dev_attr_report_key.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct attribute_group attribute_group = {
|
||||
.attrs = attributes,
|
||||
};
|
||||
|
||||
int fpc1020_input_init(struct fpc1020_data *fpc1020)
|
||||
{
|
||||
int error = 0;
|
||||
|
||||
|
||||
dev_dbg(fpc1020->dev, "%s\n", __func__);
|
||||
|
||||
fpc1020->input_dev = input_allocate_device();
|
||||
|
||||
if (!fpc1020->input_dev) {
|
||||
dev_err(fpc1020->dev, "Input_allocate_device failed.\n");
|
||||
error = -ENOMEM;
|
||||
}
|
||||
|
||||
if (!error) {
|
||||
fpc1020->input_dev->name = "fpc1020";
|
||||
|
||||
/* Set event bits according to what events we are generating */
|
||||
set_bit(EV_KEY, fpc1020->input_dev->evbit);
|
||||
set_bit(EV_SYN, fpc1020->input_dev->evbit);
|
||||
set_bit(EV_ABS, fpc1020->input_dev->evbit);
|
||||
|
||||
set_bit(KEY_POWER, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_F2, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_HOME, fpc1020->input_dev->keybit);
|
||||
/*
|
||||
set_bit(BTN_A, fpc1020->input_dev->keybit);
|
||||
set_bit(BTN_C, fpc1020->input_dev->keybit);
|
||||
*/
|
||||
set_bit(BTN_B, fpc1020->input_dev->keybit);
|
||||
set_bit(ABS_Z, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_UP, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_DOWN, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_LEFT, fpc1020->input_dev->keybit);
|
||||
set_bit(KEY_RIGHT, fpc1020->input_dev->keybit);
|
||||
|
||||
/* Register the input device */
|
||||
error = input_register_device(fpc1020->input_dev);
|
||||
|
||||
|
||||
if (error) {
|
||||
dev_err(fpc1020->dev, "Input_register_device failed.\n");
|
||||
input_free_device(fpc1020->input_dev);
|
||||
fpc1020->input_dev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
void fpc1020_input_destroy(struct fpc1020_data *fpc1020)
|
||||
{
|
||||
dev_dbg(fpc1020->dev, "%s\n", __func__);
|
||||
|
||||
if (fpc1020->input_dev != NULL)
|
||||
input_free_device(fpc1020->input_dev);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_FB)
|
||||
static int fb_notifier_callback(struct notifier_block *self, unsigned long event, void *data)
|
||||
{
|
||||
struct fb_event *evdata = data;
|
||||
int *blank;
|
||||
|
||||
struct fpc1020_data *fpc1020 = container_of(self, struct fpc1020_data, fb_notif);
|
||||
|
||||
if(FB_EARLY_EVENT_BLANK != event && FB_EVENT_BLANK != event)
|
||||
return 0;
|
||||
if((evdata) && (evdata->data) && (fpc1020)) {
|
||||
blank = evdata->data;
|
||||
if( *blank == FB_BLANK_UNBLANK && (event == FB_EARLY_EVENT_BLANK )) {
|
||||
dev_err(fpc1020->dev, "%s screen on\n", __func__);
|
||||
fpc1020->screen_state = 1;
|
||||
sysfs_notify(&fpc1020->dev->kobj, NULL, dev_attr_screen_state.attr.name);
|
||||
|
||||
} else if( *blank == FB_BLANK_POWERDOWN && (event == FB_EARLY_EVENT_BLANK/*FB_EVENT_BLANK*/ )) {
|
||||
dev_err(fpc1020->dev, "%s screen off\n", __func__);
|
||||
fpc1020->screen_state = 0;
|
||||
sysfs_notify(&fpc1020->dev->kobj, NULL, dev_attr_screen_state.attr.name);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static irqreturn_t fpc1020_irq_handler(int irq, void *handle)
|
||||
{
|
||||
struct fpc1020_data *fpc1020 = handle;
|
||||
//dev_err(fpc1020->dev, "%s\n", __func__);
|
||||
|
||||
/* Make sure 'wakeup_enabled' is updated before using it
|
||||
** since this is interrupt context (other thread...) */
|
||||
//smp_rmb();
|
||||
/*
|
||||
if (fpc1020->wakeup_enabled ) {
|
||||
wake_lock_timeout(&fpc1020->ttw_wl, msecs_to_jiffies(FPC_TTW_HOLD_TIME));
|
||||
}
|
||||
*/
|
||||
wake_lock_timeout(&fpc1020->ttw_wl, msecs_to_jiffies(FPC_TTW_HOLD_TIME));//changhua add for KeyguardUpdateMonitor: fingerprint acquired, grabbing fp wakelock
|
||||
//dev_err(fpc1020->dev, "%s before sysfs_notify\n", __func__);
|
||||
|
||||
sysfs_notify(&fpc1020->dev->kobj, NULL, dev_attr_irq.attr.name);
|
||||
//dev_err(fpc1020->dev, "%s after sysfs_notify\n", __func__);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int fpc1020_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
int rc = 0;
|
||||
int irqf;
|
||||
/*int id0, id1, id2;*/
|
||||
struct device_node *np;
|
||||
struct fpc1020_data *fpc1020;
|
||||
|
||||
pr_info("%s: fp version %x\n", __func__, fp_version);
|
||||
if ((fp_version != 0x01) && (fp_version != 0x02))
|
||||
return 0;
|
||||
np = dev->of_node;
|
||||
fpc1020 = devm_kzalloc(dev, sizeof(*fpc1020),
|
||||
GFP_KERNEL);
|
||||
if (!fpc1020) {
|
||||
dev_err(dev,
|
||||
"failed to allocate memory for struct fpc1020_data\n");
|
||||
rc = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "%s\n", __func__);
|
||||
|
||||
fpc1020->dev = dev;
|
||||
dev_set_drvdata(dev, fpc1020);
|
||||
|
||||
if (!np) {
|
||||
dev_err(dev, "no of node found\n");
|
||||
rc = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (of_property_read_bool(fpc1020->dev->of_node, "oem,dumpling"))
|
||||
fpc1020->project_version = 0x02;
|
||||
else
|
||||
fpc1020->project_version = 0x01;
|
||||
|
||||
printk(KERN_INFO "%s 111111111111111\n", __func__);
|
||||
|
||||
|
||||
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,irq-gpio",
|
||||
&fpc1020->irq_gpio);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
|
||||
printk(KERN_INFO "%s 222222222222222\n", __func__);
|
||||
|
||||
|
||||
rc = gpio_direction_input(fpc1020->irq_gpio);
|
||||
|
||||
if (rc) {
|
||||
dev_err(fpc1020->dev,
|
||||
"gpio_direction_input (irq) failed.\n");
|
||||
goto exit;
|
||||
}
|
||||
/* in tz
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,reset-gpio",
|
||||
&fpc1020->rst_gpio);
|
||||
if (rc)
|
||||
goto exit;*/
|
||||
|
||||
#ifdef ONEPLUS_EDIT
|
||||
/*
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,gpio_id0",
|
||||
&fpc1020->id0_gpio);
|
||||
if(gpio_is_valid(fpc1020->id0_gpio))
|
||||
{
|
||||
dev_err(dev, "%s: gpio_is_valid(fpc1020->id0_gpio=%d)\n", __func__,fpc1020->id0_gpio);
|
||||
gpio_direction_input(fpc1020->id0_gpio);
|
||||
}
|
||||
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,gpio_id1",
|
||||
&fpc1020->id1_gpio);
|
||||
if(gpio_is_valid(fpc1020->id1_gpio))
|
||||
{
|
||||
dev_err(dev, "%s: gpio_is_valid(fpc1020->id1_gpio=%d)\n", __func__,fpc1020->id1_gpio);
|
||||
gpio_direction_input(fpc1020->id1_gpio);
|
||||
}
|
||||
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,gpio_id2",
|
||||
&fpc1020->id2_gpio);
|
||||
if(gpio_is_valid(fpc1020->id2_gpio))
|
||||
{
|
||||
dev_err(dev, "%s: gpio_is_valid(fpc1020->id2_gpio=%d)\n", __func__,fpc1020->id2_gpio);
|
||||
gpio_direction_input(fpc1020->id2_gpio);
|
||||
}
|
||||
*/
|
||||
/* in xbl
|
||||
rc = fpc1020_request_named_gpio(fpc1020, "fpc,gpio_1V8_EN",
|
||||
&fpc1020->EN_VDD_gpio);
|
||||
if (rc)
|
||||
goto exit;
|
||||
gpio_direction_output(fpc1020->EN_VDD_gpio,1);*/
|
||||
|
||||
#else
|
||||
rc = fpc1020_pinctrl_init(fpc1020);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
rc = fpc1020_pinctrl_select(fpc1020, true);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
#endif
|
||||
rc = fpc1020_input_init(fpc1020);
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
#if defined(CONFIG_FB)
|
||||
fpc1020->fb_notif.notifier_call = fb_notifier_callback;
|
||||
rc = fb_register_client(&fpc1020->fb_notif);
|
||||
if(rc)
|
||||
dev_err(fpc1020->dev, "Unable to register fb_notifier: %d\n", rc);
|
||||
fpc1020->screen_state = 1;
|
||||
#endif
|
||||
|
||||
irqf = IRQF_TRIGGER_RISING | IRQF_ONESHOT;
|
||||
mutex_init(&fpc1020->lock);
|
||||
rc = devm_request_threaded_irq(dev, gpio_to_irq(fpc1020->irq_gpio),
|
||||
NULL, fpc1020_irq_handler, irqf,
|
||||
dev_name(dev), fpc1020);
|
||||
if (rc) {
|
||||
dev_err(dev, "could not request irq %d\n",
|
||||
gpio_to_irq(fpc1020->irq_gpio));
|
||||
goto exit;
|
||||
}
|
||||
dev_info(dev, "requested irq %d\n", gpio_to_irq(fpc1020->irq_gpio));
|
||||
|
||||
/* Request that the interrupt should not be wakeable */
|
||||
//disable_irq_wake( gpio_to_irq( fpc1020->irq_gpio ) );
|
||||
|
||||
enable_irq_wake( gpio_to_irq( fpc1020->irq_gpio ) );
|
||||
wake_lock_init(&fpc1020->ttw_wl, WAKE_LOCK_SUSPEND, "fpc_ttw_wl");
|
||||
device_init_wakeup(fpc1020->dev, 1);
|
||||
|
||||
rc = sysfs_create_group(&dev->kobj, &attribute_group);
|
||||
if (rc) {
|
||||
dev_err(dev, "could not create sysfs\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if 0 //changhua remove HW reset here,move to HAL,after spi cs pin become high
|
||||
rc = gpio_direction_output(fpc1020->rst_gpio, 1);
|
||||
|
||||
if (rc) {
|
||||
dev_err(fpc1020->dev,
|
||||
"gpio_direction_output (reset) failed.\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 1);
|
||||
udelay(FPC1020_RESET_HIGH1_US);
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 0);
|
||||
udelay(FPC1020_RESET_LOW_US);
|
||||
|
||||
gpio_set_value(fpc1020->rst_gpio, 1);
|
||||
udelay(FPC1020_RESET_HIGH2_US);
|
||||
#endif
|
||||
/**
|
||||
* ID0(GPIO39) ID1(GPIO41) ID1(GPIO63)
|
||||
* fpc1245
|
||||
* O-film 1 1 1
|
||||
* Primax 1 0 0
|
||||
* truly 0 0 1
|
||||
*
|
||||
* fpc1263
|
||||
* O-film 1 1 0
|
||||
* Primax 0 0 0
|
||||
* truly 0 1 1
|
||||
*fingerchip/
|
||||
* qtech 0 1 0
|
||||
* Goodix 1 0 1
|
||||
*
|
||||
*/
|
||||
/*
|
||||
fpc1020->sensor_version = 0x02;
|
||||
id0 = gpio_get_value(fpc1020->id0_gpio);
|
||||
id1 = gpio_get_value(fpc1020->id1_gpio);
|
||||
id2 = gpio_get_value(fpc1020->id2_gpio);
|
||||
if (id0 && id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(OF)");
|
||||
fpc1020->sensor_version = 0x01;
|
||||
} else if (id0 && !id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(Primax)");
|
||||
fpc1020->sensor_version = 0x01;
|
||||
} else if (!id0 && !id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1245", "FPC(truly)");
|
||||
fpc1020->sensor_version = 0x01;
|
||||
} else if (id0 && id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(OF)");
|
||||
} else if (!id0 && !id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(Primax)");
|
||||
} else if (!id0 && id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(truly)");
|
||||
} else if (!id0 && id1 && !id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(f/p)");
|
||||
} else if (id0 && !id1 && id2) {
|
||||
push_component_info(FINGERPRINTS, "fpc1263", "FPC(Goodix)");
|
||||
} else {
|
||||
push_component_info(FINGERPRINTS, "fpc", "PC");
|
||||
}
|
||||
*/
|
||||
dev_info(dev, "%s: ok\n", __func__);
|
||||
exit:
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static struct of_device_id fpc1020_of_match[] = {
|
||||
{ .compatible = "fpc,fpc1020", },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fpc1020_of_match);
|
||||
|
||||
static struct platform_driver fpc1020_driver = {
|
||||
.driver = {
|
||||
.name = "fpc1020",
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = fpc1020_of_match,
|
||||
},
|
||||
.probe = fpc1020_probe,
|
||||
};
|
||||
module_platform_driver(fpc1020_driver);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Aleksej Makarov");
|
||||
MODULE_AUTHOR("Henrik Tillman <henrik.tillman@fingerprints.com>");
|
||||
MODULE_DESCRIPTION("FPC1020 Fingerprint sensor device driver.");
|
1
drivers/input/fingerprint/goodix/Makefile
Normal file
1
drivers/input/fingerprint/goodix/Makefile
Normal file
|
@ -0,0 +1 @@
|
|||
obj-$(CONFIG_FINGERPRINT_GOODIX) += gf_spi.o platform.o netlink.o
|
915
drivers/input/fingerprint/goodix/gf_spi.c
Normal file
915
drivers/input/fingerprint/goodix/gf_spi.c
Normal file
|
@ -0,0 +1,915 @@
|
|||
/*
|
||||
* TEE driver for goodix fingerprint sensor
|
||||
* Copyright (C) 2016 Goodix
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/delay.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/fb.h>
|
||||
#include <linux/pm_qos.h>
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/wakelock.h>
|
||||
#include <linux/oneplus/boot_mode.h>
|
||||
#include "gf_spi.h"
|
||||
|
||||
#if defined(USE_SPI_BUS)
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
#include <linux/platform_device.h>
|
||||
#endif
|
||||
|
||||
#include "../fingerprint_detect/fingerprint_detect.h"
|
||||
|
||||
#define VER_MAJOR 1
|
||||
#define VER_MINOR 2
|
||||
#define PATCH_LEVEL 1
|
||||
|
||||
#define WAKELOCK_HOLD_TIME 500 /* in ms */
|
||||
|
||||
#define GF_SPIDEV_NAME "goodix,fingerprint"
|
||||
/*device name after register in charater*/
|
||||
#define GF_DEV_NAME "goodix_fp"
|
||||
#define GF_INPUT_NAME "gf_input" /*"goodix_fp" */
|
||||
|
||||
#define CHRD_DRIVER_NAME "goodix_fp_spi"
|
||||
#define CLASS_NAME "goodix_fp"
|
||||
|
||||
#define N_SPI_MINORS 32 /* ... up to 256 */
|
||||
static int SPIDEV_MAJOR;
|
||||
|
||||
static DECLARE_BITMAP(minors, N_SPI_MINORS);
|
||||
static LIST_HEAD(device_list);
|
||||
static DEFINE_MUTEX(device_list_lock);
|
||||
static struct wake_lock fp_wakelock;
|
||||
static struct gf_dev gf;
|
||||
|
||||
struct gf_key_map maps[] = {
|
||||
{ EV_KEY, GF_KEY_INPUT_HOME },
|
||||
{ EV_KEY, GF_KEY_INPUT_MENU },
|
||||
{ EV_KEY, GF_KEY_INPUT_BACK },
|
||||
{ EV_KEY, GF_KEY_INPUT_POWER },
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
{ EV_KEY, GF_NAV_INPUT_UP },
|
||||
{ EV_KEY, GF_NAV_INPUT_DOWN },
|
||||
{ EV_KEY, GF_NAV_INPUT_RIGHT },
|
||||
{ EV_KEY, GF_NAV_INPUT_LEFT },
|
||||
{ EV_KEY, GF_NAV_INPUT_LONG_PRESS },
|
||||
{ EV_KEY, GF_NAV_INPUT_F2},
|
||||
#endif
|
||||
};
|
||||
|
||||
static void gf_enable_irq(struct gf_dev *gf_dev)
|
||||
{
|
||||
if (gf_dev->irq_enabled) {
|
||||
pr_warn("IRQ has been enabled.\n");
|
||||
} else {
|
||||
enable_irq(gf_dev->irq);
|
||||
gf_dev->irq_enabled = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void gf_disable_irq(struct gf_dev *gf_dev)
|
||||
{
|
||||
if (gf_dev->irq_enabled) {
|
||||
gf_dev->irq_enabled = 0;
|
||||
disable_irq(gf_dev->irq);
|
||||
} else {
|
||||
pr_warn("IRQ has been disabled.\n");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AP_CONTROL_CLK
|
||||
static long spi_clk_max_rate(struct clk *clk, unsigned long rate)
|
||||
{
|
||||
long lowest_available, nearest_low, step_size, cur;
|
||||
long step_direction = -1;
|
||||
long guess = rate;
|
||||
int max_steps = 10;
|
||||
|
||||
cur = clk_round_rate(clk, rate);
|
||||
if (cur == rate)
|
||||
return rate;
|
||||
|
||||
/* if we got here then: cur > rate */
|
||||
lowest_available = clk_round_rate(clk, 0);
|
||||
if (lowest_available > rate)
|
||||
return -EINVAL;
|
||||
|
||||
step_size = (rate - lowest_available) >> 1;
|
||||
nearest_low = lowest_available;
|
||||
|
||||
while (max_steps-- && step_size) {
|
||||
guess += step_size * step_direction;
|
||||
cur = clk_round_rate(clk, guess);
|
||||
|
||||
if ((cur < rate) && (cur > nearest_low))
|
||||
nearest_low = cur;
|
||||
/*
|
||||
* if we stepped too far, then start stepping in the other
|
||||
* direction with half the step size
|
||||
*/
|
||||
if (((cur > rate) && (step_direction > 0))
|
||||
|| ((cur < rate) && (step_direction < 0))) {
|
||||
step_direction = -step_direction;
|
||||
step_size >>= 1;
|
||||
}
|
||||
}
|
||||
return nearest_low;
|
||||
}
|
||||
|
||||
static void spi_clock_set(struct gf_dev *gf_dev, int speed)
|
||||
{
|
||||
long rate;
|
||||
int rc;
|
||||
|
||||
rate = spi_clk_max_rate(gf_dev->core_clk, speed);
|
||||
if (rate < 0) {
|
||||
pr_info("%s: no match found for requested clock frequency:%d",
|
||||
__func__, speed);
|
||||
return;
|
||||
}
|
||||
|
||||
rc = clk_set_rate(gf_dev->core_clk, rate);
|
||||
}
|
||||
|
||||
static int gfspi_ioctl_clk_init(struct gf_dev *data)
|
||||
{
|
||||
pr_debug("%s: enter\n", __func__);
|
||||
|
||||
data->clk_enabled = 0;
|
||||
data->core_clk = clk_get(&data->spi->dev, "core_clk");
|
||||
if (IS_ERR_OR_NULL(data->core_clk)) {
|
||||
pr_err("%s: fail to get core_clk\n", __func__);
|
||||
return -EPERM;
|
||||
}
|
||||
data->iface_clk = clk_get(&data->spi->dev, "iface_clk");
|
||||
if (IS_ERR_OR_NULL(data->iface_clk)) {
|
||||
pr_err("%s: fail to get iface_clk\n", __func__);
|
||||
clk_put(data->core_clk);
|
||||
data->core_clk = NULL;
|
||||
return -ENOENT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gfspi_ioctl_clk_enable(struct gf_dev *data)
|
||||
{
|
||||
int err;
|
||||
|
||||
pr_debug("%s: enter\n", __func__);
|
||||
|
||||
if (data->clk_enabled)
|
||||
return 0;
|
||||
|
||||
err = clk_prepare_enable(data->core_clk);
|
||||
if (err) {
|
||||
pr_err("%s: fail to enable core_clk\n", __func__);
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
err = clk_prepare_enable(data->iface_clk);
|
||||
if (err) {
|
||||
pr_err("%s: fail to enable iface_clk\n", __func__);
|
||||
clk_disable_unprepare(data->core_clk);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
data->clk_enabled = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gfspi_ioctl_clk_disable(struct gf_dev *data)
|
||||
{
|
||||
pr_debug("%s: enter\n", __func__);
|
||||
|
||||
if (!data->clk_enabled)
|
||||
return 0;
|
||||
|
||||
clk_disable_unprepare(data->core_clk);
|
||||
clk_disable_unprepare(data->iface_clk);
|
||||
data->clk_enabled = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gfspi_ioctl_clk_uninit(struct gf_dev *data)
|
||||
{
|
||||
pr_debug("%s: enter\n", __func__);
|
||||
|
||||
if (data->clk_enabled)
|
||||
gfspi_ioctl_clk_disable(data);
|
||||
|
||||
if (!IS_ERR_OR_NULL(data->core_clk)) {
|
||||
clk_put(data->core_clk);
|
||||
data->core_clk = NULL;
|
||||
}
|
||||
|
||||
if (!IS_ERR_OR_NULL(data->iface_clk)) {
|
||||
clk_put(data->iface_clk);
|
||||
data->iface_clk = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void nav_event_input(struct gf_dev *gf_dev, gf_nav_event_t nav_event)
|
||||
{
|
||||
uint32_t nav_input = 0;
|
||||
|
||||
switch (nav_event) {
|
||||
case GF_NAV_FINGER_DOWN:
|
||||
pr_debug("%s nav finger down\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_FINGER_UP:
|
||||
pr_debug("%s nav finger up\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_DOWN:
|
||||
nav_input = GF_NAV_INPUT_DOWN;
|
||||
pr_debug("%s nav down\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_UP:
|
||||
nav_input = GF_NAV_INPUT_UP;
|
||||
pr_debug("%s nav up\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_LEFT:
|
||||
nav_input = GF_NAV_INPUT_LEFT;
|
||||
pr_debug("%s nav left\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_RIGHT:
|
||||
nav_input = GF_NAV_INPUT_RIGHT;
|
||||
pr_debug("%s nav right\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_CLICK:
|
||||
nav_input = GF_NAV_INPUT_CLICK;
|
||||
pr_debug("%s nav click\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_HEAVY:
|
||||
nav_input = GF_NAV_INPUT_HEAVY;
|
||||
pr_debug("%s nav heavy\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_LONG_PRESS:
|
||||
nav_input = GF_NAV_INPUT_LONG_PRESS;
|
||||
pr_debug("%s nav long press\n", __func__);
|
||||
break;
|
||||
|
||||
case GF_NAV_DOUBLE_CLICK:
|
||||
nav_input = GF_NAV_INPUT_DOUBLE_CLICK;
|
||||
pr_debug("%s nav double click\n", __func__);
|
||||
break;
|
||||
case GF_NAV_F2:
|
||||
nav_input = GF_NAV_INPUT_F2;
|
||||
pr_debug("%s nav f2\n", __func__);
|
||||
break;
|
||||
default:
|
||||
pr_warn("%s unknown nav event: %d\n", __func__, nav_event);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((nav_event != GF_NAV_FINGER_DOWN) && (nav_event != GF_NAV_FINGER_UP)) {
|
||||
input_report_key(gf_dev->input, nav_input, 1);
|
||||
input_sync(gf_dev->input);
|
||||
input_report_key(gf_dev->input, nav_input, 0);
|
||||
input_sync(gf_dev->input);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void gf_kernel_key_input(struct gf_dev *gf_dev, struct gf_key *gf_key)
|
||||
{
|
||||
uint32_t key_input = 0;
|
||||
if (GF_KEY_HOME == gf_key->key) {
|
||||
key_input = GF_KEY_INPUT_HOME;
|
||||
} else if (GF_KEY_POWER == gf_key->key) {
|
||||
key_input = GF_KEY_INPUT_POWER;
|
||||
} else if (GF_KEY_CAMERA == gf_key->key) {
|
||||
key_input = GF_KEY_INPUT_CAMERA;
|
||||
} else {
|
||||
/* add special key define */
|
||||
key_input = gf_key->key;
|
||||
}
|
||||
pr_info("%s: received key event[%d], key=%d, value=%d\n",
|
||||
__func__, key_input, gf_key->key, gf_key->value);
|
||||
|
||||
if ((GF_KEY_POWER == gf_key->key || GF_KEY_CAMERA == gf_key->key)
|
||||
&& (gf_key->value == 1)) {
|
||||
input_report_key(gf_dev->input, key_input, 1);
|
||||
input_sync(gf_dev->input);
|
||||
input_report_key(gf_dev->input, key_input, 0);
|
||||
input_sync(gf_dev->input);
|
||||
}
|
||||
|
||||
if (GF_KEY_HOME == gf_key->key) {
|
||||
input_report_key(gf_dev->input, key_input, gf_key->value);
|
||||
input_sync(gf_dev->input);
|
||||
}
|
||||
}
|
||||
|
||||
static long gf_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct gf_dev *gf_dev = &gf;
|
||||
struct gf_key gf_key;
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
gf_nav_event_t nav_event = GF_NAV_NONE;
|
||||
#endif
|
||||
int retval = 0;
|
||||
u8 netlink_route = NETLINK_TEST;
|
||||
struct gf_ioc_chip_info info;
|
||||
|
||||
if (_IOC_TYPE(cmd) != GF_IOC_MAGIC)
|
||||
return -ENODEV;
|
||||
|
||||
if (_IOC_DIR(cmd) & _IOC_READ)
|
||||
retval = !access_ok(VERIFY_WRITE, (void __user *)arg, _IOC_SIZE(cmd));
|
||||
else if (_IOC_DIR(cmd) & _IOC_WRITE)
|
||||
retval = !access_ok(VERIFY_READ, (void __user *)arg, _IOC_SIZE(cmd));
|
||||
if (retval)
|
||||
return -EFAULT;
|
||||
|
||||
if (gf_dev->device_available == 0) {
|
||||
if ((cmd == GF_IOC_ENABLE_POWER) || (cmd == GF_IOC_DISABLE_POWER)) {
|
||||
pr_info("power cmd\n");
|
||||
} else {
|
||||
pr_info("Sensor is power off currently. \n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
case GF_IOC_INIT:
|
||||
pr_debug("%s GF_IOC_INIT\n", __func__);
|
||||
if (copy_to_user((void __user *)arg, (void *)&netlink_route, sizeof(u8))) {
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GF_IOC_EXIT:
|
||||
pr_debug("%s GF_IOC_EXIT\n", __func__);
|
||||
break;
|
||||
case GF_IOC_DISABLE_IRQ:
|
||||
pr_debug("%s GF_IOC_DISABEL_IRQ\n", __func__);
|
||||
gf_disable_irq(gf_dev);
|
||||
break;
|
||||
case GF_IOC_ENABLE_IRQ:
|
||||
pr_debug("%s GF_IOC_ENABLE_IRQ\n", __func__);
|
||||
gf_enable_irq(gf_dev);
|
||||
break;
|
||||
case GF_IOC_RESET:
|
||||
pr_info("%s GF_IOC_RESET. \n", __func__);
|
||||
gf_hw_reset(gf_dev, 3);
|
||||
break;
|
||||
case GF_IOC_INPUT_KEY_EVENT:
|
||||
if (copy_from_user(&gf_key, (struct gf_key *)arg, sizeof(struct gf_key))) {
|
||||
pr_info("Failed to copy input key event from user to kernel\n");
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
gf_kernel_key_input(gf_dev, &gf_key);
|
||||
break;
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
case GF_IOC_NAV_EVENT:
|
||||
pr_debug("%s GF_IOC_NAV_EVENT\n", __func__);
|
||||
if (copy_from_user(&nav_event, (gf_nav_event_t *)arg, sizeof(gf_nav_event_t))) {
|
||||
pr_info("Failed to copy nav event from user to kernel\n");
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
nav_event_input(gf_dev, nav_event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case GF_IOC_ENABLE_SPI_CLK:
|
||||
pr_debug("%s GF_IOC_ENABLE_SPI_CLK\n", __func__);
|
||||
#ifdef AP_CONTROL_CLK
|
||||
gfspi_ioctl_clk_enable(gf_dev);
|
||||
#else
|
||||
pr_debug("Doesn't support control clock.\n");
|
||||
#endif
|
||||
break;
|
||||
case GF_IOC_DISABLE_SPI_CLK:
|
||||
pr_debug("%s GF_IOC_DISABLE_SPI_CLK\n", __func__);
|
||||
#ifdef AP_CONTROL_CLK
|
||||
gfspi_ioctl_clk_disable(gf_dev);
|
||||
#else
|
||||
pr_debug("Doesn't support control clock\n");
|
||||
#endif
|
||||
break;
|
||||
case GF_IOC_ENABLE_POWER:
|
||||
pr_debug("%s GF_IOC_ENABLE_POWER\n", __func__);
|
||||
if (gf_dev->device_available == 1)
|
||||
pr_info("Sensor has already powered-on.\n");
|
||||
else
|
||||
gf_power_on(gf_dev);
|
||||
gf_dev->device_available = 1;
|
||||
break;
|
||||
case GF_IOC_DISABLE_POWER:
|
||||
pr_debug("%s GF_IOC_DISABLE_POWER\n", __func__);
|
||||
if (gf_dev->device_available == 0)
|
||||
pr_info("Sensor has already powered-off.\n");
|
||||
else
|
||||
gf_power_off(gf_dev);
|
||||
gf_dev->device_available = 0;
|
||||
break;
|
||||
case GF_IOC_ENTER_SLEEP_MODE:
|
||||
pr_debug("%s GF_IOC_ENTER_SLEEP_MODE\n", __func__);
|
||||
break;
|
||||
case GF_IOC_GET_FW_INFO:
|
||||
pr_debug("%s GF_IOC_GET_FW_INFO\n", __func__);
|
||||
break;
|
||||
case GF_IOC_REMOVE:
|
||||
pr_debug("%s GF_IOC_REMOVE\n", __func__);
|
||||
break;
|
||||
case GF_IOC_CHIP_INFO:
|
||||
pr_debug("%s GF_IOC_CHIP_INFO\n", __func__);
|
||||
if (copy_from_user(&info, (struct gf_ioc_chip_info *)arg, sizeof(struct gf_ioc_chip_info))) {
|
||||
retval = -EFAULT;
|
||||
break;
|
||||
}
|
||||
pr_info("vendor_id : 0x%x\n", info.vendor_id);
|
||||
pr_info("mode : 0x%x\n", info.mode);
|
||||
pr_info("operation: 0x%x\n", info.operation);
|
||||
break;
|
||||
default:
|
||||
pr_warn("unsupport cmd:0x%x\n", cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static long gf_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return gf_ioctl(filp, cmd, (unsigned long)compat_ptr(arg));
|
||||
}
|
||||
#endif /*CONFIG_COMPAT*/
|
||||
|
||||
static irqreturn_t gf_irq(int irq, void *handle)
|
||||
{
|
||||
#if defined(GF_NETLINK_ENABLE)
|
||||
char temp = GF_NET_EVENT_IRQ;
|
||||
|
||||
wake_lock_timeout(&fp_wakelock, msecs_to_jiffies(WAKELOCK_HOLD_TIME));
|
||||
sendnlmsg(&temp);
|
||||
#elif defined GF_FASYNC
|
||||
struct gf_dev *gf_dev = &gf;
|
||||
|
||||
if (gf_dev->async)
|
||||
kill_fasync(&gf_dev->async, SIGIO, POLL_IN);
|
||||
#endif
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int gf_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct gf_dev *gf_dev;
|
||||
int status = -ENXIO;
|
||||
|
||||
mutex_lock(&device_list_lock);
|
||||
|
||||
list_for_each_entry(gf_dev, &device_list, device_entry) {
|
||||
if (gf_dev->devt == inode->i_rdev) {
|
||||
pr_info("Found\n");
|
||||
status = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
if (status == 0) {
|
||||
gf_dev->users++;
|
||||
filp->private_data = gf_dev;
|
||||
nonseekable_open(inode, filp);
|
||||
pr_info("Succeed to open device. irq = %d\n",
|
||||
gf_dev->irq);
|
||||
if (gf_dev->users == 1)
|
||||
gf_enable_irq(gf_dev);
|
||||
gf_hw_reset(gf_dev, 3);
|
||||
gf_dev->device_available = 1;
|
||||
}
|
||||
} else {
|
||||
pr_info("No device for minor %d\n", iminor(inode));
|
||||
}
|
||||
mutex_unlock(&device_list_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef GF_FASYNC
|
||||
static int gf_fasync(int fd, struct file *filp, int mode)
|
||||
{
|
||||
struct gf_dev *gf_dev = filp->private_data;
|
||||
int ret;
|
||||
|
||||
ret = fasync_helper(fd, filp, mode, &gf_dev->async);
|
||||
pr_info("ret = %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int gf_release(struct inode *inode, struct file *filp)
|
||||
{
|
||||
struct gf_dev *gf_dev;
|
||||
int status = 0;
|
||||
|
||||
mutex_lock(&device_list_lock);
|
||||
gf_dev = filp->private_data;
|
||||
filp->private_data = NULL;
|
||||
|
||||
/*last close?? */
|
||||
gf_dev->users--;
|
||||
if (!gf_dev->users) {
|
||||
|
||||
pr_info("disble_irq. irq = %d\n", gf_dev->irq);
|
||||
gf_disable_irq(gf_dev);
|
||||
/*power off the sensor*/
|
||||
gf_dev->device_available = 0;
|
||||
gf_power_off(gf_dev);
|
||||
}
|
||||
mutex_unlock(&device_list_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
static const struct file_operations gf_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
/* REVISIT switch to aio primitives, so that userspace
|
||||
* gets more complete API coverage. It'll simplify things
|
||||
* too, except for the locking.
|
||||
*/
|
||||
.unlocked_ioctl = gf_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = gf_compat_ioctl,
|
||||
#endif /*CONFIG_COMPAT*/
|
||||
.open = gf_open,
|
||||
.release = gf_release,
|
||||
#ifdef GF_FASYNC
|
||||
.fasync = gf_fasync,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int goodix_fb_state_chg_callback(struct notifier_block *nb,
|
||||
unsigned long val, void *data)
|
||||
{
|
||||
struct gf_dev *gf_dev;
|
||||
struct fb_event *evdata = data;
|
||||
unsigned int blank;
|
||||
char temp = 0;
|
||||
|
||||
if (val != FB_EARLY_EVENT_BLANK)
|
||||
return 0;
|
||||
pr_info("[info] %s go to the goodix_fb_state_chg_callback value = %d\n",
|
||||
__func__, (int)val);
|
||||
gf_dev = container_of(nb, struct gf_dev, notifier);
|
||||
if (evdata && evdata->data && val == FB_EARLY_EVENT_BLANK && gf_dev) {
|
||||
blank = *(int *)(evdata->data);
|
||||
switch (blank) {
|
||||
case FB_BLANK_POWERDOWN:
|
||||
if (gf_dev->device_available == 1) {
|
||||
gf_dev->fb_black = 1;
|
||||
#if defined(GF_NETLINK_ENABLE)
|
||||
temp = GF_NET_EVENT_FB_BLACK;
|
||||
sendnlmsg(&temp);
|
||||
#elif defined (GF_FASYNC)
|
||||
if (gf_dev->async) {
|
||||
kill_fasync(&gf_dev->async, SIGIO, POLL_IN);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case FB_BLANK_UNBLANK:
|
||||
if (gf_dev->device_available == 1) {
|
||||
gf_dev->fb_black = 0;
|
||||
#if defined(GF_NETLINK_ENABLE)
|
||||
temp = GF_NET_EVENT_FB_UNBLACK;
|
||||
sendnlmsg(&temp);
|
||||
#elif defined (GF_FASYNC)
|
||||
if (gf_dev->async) {
|
||||
kill_fasync(&gf_dev->async, SIGIO, POLL_IN);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
pr_info("%s defalut\n", __func__);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block goodix_noti_block = {
|
||||
.notifier_call = goodix_fb_state_chg_callback,
|
||||
};
|
||||
|
||||
static struct class *gf_class;
|
||||
#if defined(USE_SPI_BUS)
|
||||
static int gf_probe(struct spi_device *spi)
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
static int gf_probe(struct platform_device *pdev)
|
||||
#endif
|
||||
{
|
||||
struct gf_dev *gf_dev = &gf;
|
||||
int status = -EINVAL;
|
||||
unsigned long minor;
|
||||
int i;
|
||||
|
||||
/* Initialize the driver data */
|
||||
INIT_LIST_HEAD(&gf_dev->device_entry);
|
||||
#if defined(USE_SPI_BUS)
|
||||
gf_dev->spi = spi;
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
gf_dev->spi = pdev;
|
||||
#endif
|
||||
gf_dev->irq_gpio = -EINVAL;
|
||||
gf_dev->reset_gpio = -EINVAL;
|
||||
gf_dev->pwr_gpio = -EINVAL;
|
||||
gf_dev->device_available = 0;
|
||||
gf_dev->fb_black = 0;
|
||||
|
||||
if (gf_parse_dts(gf_dev))
|
||||
goto error_hw;
|
||||
|
||||
/* If we can allocate a minor number, hook up this device.
|
||||
* Reusing minors is fine so long as udev or mdev is working.
|
||||
*/
|
||||
mutex_lock(&device_list_lock);
|
||||
minor = find_first_zero_bit(minors, N_SPI_MINORS);
|
||||
if (minor < N_SPI_MINORS) {
|
||||
struct device *dev;
|
||||
|
||||
gf_dev->devt = MKDEV(SPIDEV_MAJOR, minor);
|
||||
dev = device_create(gf_class, &gf_dev->spi->dev, gf_dev->devt,
|
||||
gf_dev, GF_DEV_NAME);
|
||||
status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
|
||||
} else {
|
||||
dev_dbg(&gf_dev->spi->dev, "no minor number available!\n");
|
||||
status = -ENODEV;
|
||||
mutex_unlock(&device_list_lock);
|
||||
goto error_hw;
|
||||
}
|
||||
|
||||
if (status == 0) {
|
||||
set_bit(minor, minors);
|
||||
list_add(&gf_dev->device_entry, &device_list);
|
||||
} else {
|
||||
gf_dev->devt = 0;
|
||||
}
|
||||
mutex_unlock(&device_list_lock);
|
||||
|
||||
if (0x02 == gf_dev->project_version) {
|
||||
status = gf_pinctrl_init(gf_dev);
|
||||
if (status)
|
||||
goto error_hw;
|
||||
if (get_boot_mode() != MSM_BOOT_MODE__FACTORY) {
|
||||
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
||||
gf_dev->gpio_state_enable);
|
||||
if (status) {
|
||||
pr_err("can not set %s pins\n", "fp_en_init");
|
||||
goto error_hw;
|
||||
}
|
||||
} else {
|
||||
status = pinctrl_select_state(gf_dev->gf_pinctrl,
|
||||
gf_dev->gpio_state_disable);
|
||||
if (status) {
|
||||
pr_err("can not set %s pins\n", "fp_dis_init");
|
||||
goto error_hw;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status == 0) {
|
||||
/*input device subsystem */
|
||||
gf_dev->input = input_allocate_device();
|
||||
if (gf_dev->input == NULL) {
|
||||
pr_err("%s, failed to allocate input device\n", __func__);
|
||||
status = -ENOMEM;
|
||||
goto error_dev;
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(maps); i++)
|
||||
input_set_capability(gf_dev->input, maps[i].type, maps[i].code);
|
||||
|
||||
gf_dev->input->name = GF_INPUT_NAME;
|
||||
status = input_register_device(gf_dev->input);
|
||||
if (status) {
|
||||
pr_err("failed to register input device\n");
|
||||
goto error_input;
|
||||
}
|
||||
}
|
||||
#ifdef AP_CONTROL_CLK
|
||||
pr_info("Get the clk resource.\n");
|
||||
/* Enable spi clock */
|
||||
if (gfspi_ioctl_clk_init(gf_dev))
|
||||
goto gfspi_probe_clk_init_failed:
|
||||
|
||||
if (gfspi_ioctl_clk_enable(gf_dev))
|
||||
goto gfspi_probe_clk_enable_failed;
|
||||
|
||||
spi_clock_set(gf_dev, 1000000);
|
||||
#endif
|
||||
|
||||
gf_dev->notifier = goodix_noti_block;
|
||||
fb_register_client(&gf_dev->notifier);
|
||||
|
||||
gf_dev->irq = gf_irq_num(gf_dev);
|
||||
|
||||
wake_lock_init(&fp_wakelock, WAKE_LOCK_SUSPEND, "fp_wakelock");
|
||||
status = request_threaded_irq(gf_dev->irq, NULL, gf_irq,
|
||||
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
|
||||
"gf_fp", gf_dev);
|
||||
|
||||
if (status) {
|
||||
pr_err("failed to request IRQ:%d\n", gf_dev->irq);
|
||||
goto err_irq;
|
||||
}
|
||||
enable_irq_wake(gf_dev->irq);
|
||||
gf_dev->irq_enabled = 1;
|
||||
gf_disable_irq(gf_dev);
|
||||
gpio_set_value(gf_dev->reset_gpio, 0);
|
||||
|
||||
pr_info("version V%d.%d.%02d\n", VER_MAJOR, VER_MINOR, PATCH_LEVEL);
|
||||
|
||||
return status;
|
||||
|
||||
err_irq:
|
||||
input_unregister_device(gf_dev->input);
|
||||
#ifdef AP_CONTROL_CLK
|
||||
gfspi_probe_clk_enable_failed:
|
||||
gfspi_ioctl_clk_uninit(gf_dev);
|
||||
gfspi_probe_clk_init_failed:
|
||||
#endif
|
||||
|
||||
error_input:
|
||||
if (gf_dev->input != NULL)
|
||||
input_free_device(gf_dev->input);
|
||||
error_dev:
|
||||
if (gf_dev->devt != 0) {
|
||||
pr_info("Err: status = %d\n", status);
|
||||
mutex_lock(&device_list_lock);
|
||||
list_del(&gf_dev->device_entry);
|
||||
device_destroy(gf_class, gf_dev->devt);
|
||||
clear_bit(MINOR(gf_dev->devt), minors);
|
||||
mutex_unlock(&device_list_lock);
|
||||
}
|
||||
error_hw:
|
||||
gf_cleanup(gf_dev);
|
||||
gf_dev->device_available = 0;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#if defined(USE_SPI_BUS)
|
||||
static int gf_remove(struct spi_device *spi)
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
static int gf_remove(struct platform_device *pdev)
|
||||
#endif
|
||||
{
|
||||
struct gf_dev *gf_dev = &gf;
|
||||
|
||||
wake_lock_destroy(&fp_wakelock);
|
||||
/* make sure ops on existing fds can abort cleanly */
|
||||
if (gf_dev->irq)
|
||||
free_irq(gf_dev->irq, gf_dev);
|
||||
|
||||
if (gf_dev->input != NULL)
|
||||
input_unregister_device(gf_dev->input);
|
||||
input_free_device(gf_dev->input);
|
||||
|
||||
/* prevent new opens */
|
||||
mutex_lock(&device_list_lock);
|
||||
list_del(&gf_dev->device_entry);
|
||||
device_destroy(gf_class, gf_dev->devt);
|
||||
clear_bit(MINOR(gf_dev->devt), minors);
|
||||
if (gf_dev->users == 0)
|
||||
gf_cleanup(gf_dev);
|
||||
|
||||
|
||||
fb_unregister_client(&gf_dev->notifier);
|
||||
mutex_unlock(&device_list_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct of_device_id gx_match_table[] = {
|
||||
{ .compatible = GF_SPIDEV_NAME },
|
||||
{},
|
||||
};
|
||||
|
||||
#if defined(USE_SPI_BUS)
|
||||
static struct spi_driver gf_driver = {
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
static struct platform_driver gf_driver = {
|
||||
#endif
|
||||
.driver = {
|
||||
.name = GF_DEV_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = gx_match_table,
|
||||
},
|
||||
.probe = gf_probe,
|
||||
.remove = gf_remove,
|
||||
};
|
||||
|
||||
static int __init gf_init(void)
|
||||
{
|
||||
int status;
|
||||
|
||||
/* Claim our 256 reserved device numbers. Then register a class
|
||||
* that will key udev/mdev to add/remove /dev nodes. Last, register
|
||||
* the driver which manages those device numbers.
|
||||
*/
|
||||
pr_info("%s:fp version %x\n", __func__, fp_version);
|
||||
if(0x03 != fp_version)
|
||||
return 0;
|
||||
BUILD_BUG_ON(N_SPI_MINORS > 256);
|
||||
status = register_chrdev(SPIDEV_MAJOR, CHRD_DRIVER_NAME, &gf_fops);
|
||||
if (status < 0) {
|
||||
pr_warn("Failed to register char device!\n");
|
||||
return status;
|
||||
}
|
||||
SPIDEV_MAJOR = status;
|
||||
gf_class = class_create(THIS_MODULE, CLASS_NAME);
|
||||
if (IS_ERR(gf_class)) {
|
||||
unregister_chrdev(SPIDEV_MAJOR, gf_driver.driver.name);
|
||||
pr_warn("Failed to create class.\n");
|
||||
return PTR_ERR(gf_class);
|
||||
}
|
||||
#if defined(USE_PLATFORM_BUS)
|
||||
status = platform_driver_register(&gf_driver);
|
||||
#elif defined(USE_SPI_BUS)
|
||||
status = spi_register_driver(&gf_driver);
|
||||
#endif
|
||||
if (status < 0) {
|
||||
class_destroy(gf_class);
|
||||
unregister_chrdev(SPIDEV_MAJOR, gf_driver.driver.name);
|
||||
pr_warn("Failed to register SPI driver.\n");
|
||||
}
|
||||
|
||||
#ifdef GF_NETLINK_ENABLE
|
||||
netlink_init();
|
||||
#endif
|
||||
pr_info("status = 0x%x\n", status);
|
||||
return 0;
|
||||
}
|
||||
module_init(gf_init);
|
||||
|
||||
static void __exit gf_exit(void)
|
||||
{
|
||||
#ifdef GF_NETLINK_ENABLE
|
||||
netlink_exit();
|
||||
#endif
|
||||
#if defined(USE_PLATFORM_BUS)
|
||||
platform_driver_unregister(&gf_driver);
|
||||
#elif defined(USE_SPI_BUS)
|
||||
spi_unregister_driver(&gf_driver);
|
||||
#endif
|
||||
class_destroy(gf_class);
|
||||
unregister_chrdev(SPIDEV_MAJOR, gf_driver.driver.name);
|
||||
}
|
||||
module_exit(gf_exit);
|
||||
|
||||
MODULE_AUTHOR("Jiangtao Yi, <yijiangtao@goodix.com>");
|
||||
MODULE_AUTHOR("Jandy Gou, <gouqingsong@goodix.com>");
|
||||
MODULE_DESCRIPTION("goodix fingerprint sensor device driver");
|
||||
MODULE_LICENSE("GPL");
|
161
drivers/input/fingerprint/goodix/gf_spi.h
Normal file
161
drivers/input/fingerprint/goodix/gf_spi.h
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* driver definition for sensor driver
|
||||
*
|
||||
* Coypright (c) 2017 Goodix
|
||||
*/
|
||||
#ifndef __GF_SPI_H
|
||||
#define __GF_SPI_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/notifier.h>
|
||||
/**********************************************************/
|
||||
enum FP_MODE{
|
||||
GF_IMAGE_MODE = 0,
|
||||
GF_KEY_MODE,
|
||||
GF_SLEEP_MODE,
|
||||
GF_FF_MODE,
|
||||
GF_DEBUG_MODE = 0x56
|
||||
};
|
||||
|
||||
#define SUPPORT_NAV_EVENT
|
||||
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
#define GF_NAV_INPUT_UP KEY_UP
|
||||
#define GF_NAV_INPUT_DOWN KEY_DOWN
|
||||
#define GF_NAV_INPUT_LEFT KEY_LEFT
|
||||
#define GF_NAV_INPUT_RIGHT KEY_RIGHT
|
||||
#define GF_NAV_INPUT_CLICK KEY_VOLUMEDOWN
|
||||
#define GF_NAV_INPUT_DOUBLE_CLICK KEY_VOLUMEUP
|
||||
#define GF_NAV_INPUT_LONG_PRESS BTN_B
|
||||
#define GF_NAV_INPUT_F2 KEY_F2
|
||||
#define GF_NAV_INPUT_HEAVY KEY_CHAT
|
||||
#endif
|
||||
|
||||
#define GF_KEY_INPUT_HOME KEY_HOME
|
||||
#define GF_KEY_INPUT_MENU KEY_MENU
|
||||
#define GF_KEY_INPUT_BACK KEY_BACK
|
||||
#define GF_KEY_INPUT_POWER KEY_POWER
|
||||
#define GF_KEY_INPUT_CAMERA KEY_CAMERA
|
||||
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
typedef enum gf_nav_event {
|
||||
GF_NAV_NONE = 0,
|
||||
GF_NAV_FINGER_UP,
|
||||
GF_NAV_FINGER_DOWN,
|
||||
GF_NAV_UP,
|
||||
GF_NAV_DOWN,
|
||||
GF_NAV_LEFT,
|
||||
GF_NAV_RIGHT,
|
||||
GF_NAV_CLICK,
|
||||
GF_NAV_HEAVY,
|
||||
GF_NAV_LONG_PRESS,
|
||||
GF_NAV_DOUBLE_CLICK,
|
||||
GF_NAV_F2,
|
||||
} gf_nav_event_t;
|
||||
#endif
|
||||
|
||||
typedef enum gf_key_event {
|
||||
GF_KEY_NONE = 0,
|
||||
GF_KEY_HOME,
|
||||
GF_KEY_POWER,
|
||||
GF_KEY_MENU,
|
||||
GF_KEY_BACK,
|
||||
GF_KEY_CAMERA,
|
||||
} gf_key_event_t;
|
||||
|
||||
struct gf_key {
|
||||
enum gf_key_event key;
|
||||
uint32_t value; /* key down = 1, key up = 0 */
|
||||
};
|
||||
|
||||
struct gf_key_map {
|
||||
unsigned int type;
|
||||
unsigned int code;
|
||||
};
|
||||
|
||||
struct gf_ioc_chip_info {
|
||||
unsigned char vendor_id;
|
||||
unsigned char mode;
|
||||
unsigned char operation;
|
||||
unsigned char reserved[5];
|
||||
};
|
||||
|
||||
#define GF_IOC_MAGIC 'g' //define magic number
|
||||
#define GF_IOC_INIT _IOR(GF_IOC_MAGIC, 0, uint8_t)
|
||||
#define GF_IOC_EXIT _IO(GF_IOC_MAGIC, 1)
|
||||
#define GF_IOC_RESET _IO(GF_IOC_MAGIC, 2)
|
||||
#define GF_IOC_ENABLE_IRQ _IO(GF_IOC_MAGIC, 3)
|
||||
#define GF_IOC_DISABLE_IRQ _IO(GF_IOC_MAGIC, 4)
|
||||
#define GF_IOC_ENABLE_SPI_CLK _IOW(GF_IOC_MAGIC, 5, uint32_t)
|
||||
#define GF_IOC_DISABLE_SPI_CLK _IO(GF_IOC_MAGIC, 6)
|
||||
#define GF_IOC_ENABLE_POWER _IO(GF_IOC_MAGIC, 7)
|
||||
#define GF_IOC_DISABLE_POWER _IO(GF_IOC_MAGIC, 8)
|
||||
#define GF_IOC_INPUT_KEY_EVENT _IOW(GF_IOC_MAGIC, 9, struct gf_key)
|
||||
#define GF_IOC_ENTER_SLEEP_MODE _IO(GF_IOC_MAGIC, 10)
|
||||
#define GF_IOC_GET_FW_INFO _IOR(GF_IOC_MAGIC, 11, uint8_t)
|
||||
#define GF_IOC_REMOVE _IO(GF_IOC_MAGIC, 12)
|
||||
#define GF_IOC_CHIP_INFO _IOW(GF_IOC_MAGIC, 13, struct gf_ioc_chip_info)
|
||||
|
||||
#if defined(SUPPORT_NAV_EVENT)
|
||||
#define GF_IOC_NAV_EVENT _IOW(GF_IOC_MAGIC, 14, gf_nav_event_t)
|
||||
#define GF_IOC_MAXNR 15 /* THIS MACRO IS NOT USED NOW... */
|
||||
#else
|
||||
#define GF_IOC_MAXNR 14 /* THIS MACRO IS NOT USED NOW... */
|
||||
#endif
|
||||
|
||||
//#define AP_CONTROL_CLK 1
|
||||
#define USE_PLATFORM_BUS 1
|
||||
//#define USE_SPI_BUS 1
|
||||
//#define GF_FASYNC 1 /*If support fasync mechanism.*/
|
||||
#define GF_NETLINK_ENABLE 1
|
||||
#define GF_NET_EVENT_IRQ 1
|
||||
#define GF_NET_EVENT_FB_BLACK 2
|
||||
#define GF_NET_EVENT_FB_UNBLACK 3
|
||||
#define NETLINK_TEST 25
|
||||
|
||||
struct gf_dev {
|
||||
dev_t devt;
|
||||
struct list_head device_entry;
|
||||
#if defined(USE_SPI_BUS)
|
||||
struct spi_device *spi;
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
struct platform_device *spi;
|
||||
#endif
|
||||
struct clk *core_clk;
|
||||
struct clk *iface_clk;
|
||||
|
||||
struct input_dev *input;
|
||||
/* buffer is NULL unless this device is open (users > 0) */
|
||||
unsigned users;
|
||||
signed irq_gpio;
|
||||
signed reset_gpio;
|
||||
signed pwr_gpio;
|
||||
int irq;
|
||||
int irq_enabled;
|
||||
int clk_enabled;
|
||||
#ifdef GF_FASYNC
|
||||
struct fasync_struct *async;
|
||||
#endif
|
||||
struct notifier_block notifier;
|
||||
char device_available;
|
||||
char fb_black;
|
||||
struct pinctrl *gf_pinctrl;
|
||||
struct pinctrl_state *gpio_state_enable;
|
||||
struct pinctrl_state *gpio_state_disable;
|
||||
signed enable_gpio;
|
||||
int project_version;
|
||||
};
|
||||
int gf_pinctrl_init(struct gf_dev* gf_dev);
|
||||
int gf_parse_dts(struct gf_dev* gf_dev);
|
||||
void gf_cleanup(struct gf_dev *gf_dev);
|
||||
|
||||
int gf_power_on(struct gf_dev *gf_dev);
|
||||
int gf_power_off(struct gf_dev *gf_dev);
|
||||
|
||||
int gf_hw_reset(struct gf_dev *gf_dev, unsigned int delay_ms);
|
||||
int gf_irq_num(struct gf_dev *gf_dev);
|
||||
|
||||
void sendnlmsg(char *message);
|
||||
int netlink_init(void);
|
||||
void netlink_exit(void);
|
||||
#endif /*__GF_SPI_H*/
|
98
drivers/input/fingerprint/goodix/netlink.c
Normal file
98
drivers/input/fingerprint/goodix/netlink.c
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* netlink interface
|
||||
*
|
||||
* Copyright (c) 2017 Goodix
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/time.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/sock.h>
|
||||
#include <net/netlink.h>
|
||||
|
||||
#define NETLINK_TEST 25
|
||||
#define MAX_MSGSIZE 32
|
||||
static int pid = -1;
|
||||
struct sock *gf_nl_sk = NULL;
|
||||
|
||||
void sendnlmsg(char *message)
|
||||
{
|
||||
struct sk_buff *skb_1;
|
||||
struct nlmsghdr *nlh;
|
||||
int len = NLMSG_SPACE(MAX_MSGSIZE);
|
||||
int slen = 0;
|
||||
int ret = 0;
|
||||
if (!message || !gf_nl_sk || !pid)
|
||||
return ;
|
||||
|
||||
skb_1 = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb_1) {
|
||||
pr_err("alloc_skb error\n");
|
||||
return;
|
||||
}
|
||||
slen = strlen(message);
|
||||
nlh = nlmsg_put(skb_1, 0, 0, 0, MAX_MSGSIZE, 0);
|
||||
|
||||
NETLINK_CB(skb_1).portid = 0;
|
||||
NETLINK_CB(skb_1).dst_group = 0;
|
||||
|
||||
message[slen] = '\0';
|
||||
memcpy(NLMSG_DATA(nlh), message, slen+1);
|
||||
|
||||
ret = netlink_unicast(gf_nl_sk, skb_1, pid, MSG_DONTWAIT);
|
||||
if (!ret)
|
||||
pr_err("send msg failed ret 0x%x\n", ret);
|
||||
}
|
||||
|
||||
|
||||
void nl_data_ready(struct sk_buff *__skb)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct nlmsghdr *nlh;
|
||||
char str[100];
|
||||
skb = skb_get (__skb);
|
||||
if(skb->len >= NLMSG_SPACE(0))
|
||||
{
|
||||
nlh = nlmsg_hdr(skb);
|
||||
|
||||
memcpy(str, NLMSG_DATA(nlh), sizeof(str));
|
||||
pid = nlh->nlmsg_pid;
|
||||
|
||||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int netlink_init(void)
|
||||
{
|
||||
struct netlink_kernel_cfg netlink_cfg;
|
||||
memset(&netlink_cfg, 0, sizeof(struct netlink_kernel_cfg));
|
||||
|
||||
netlink_cfg.groups = 0;
|
||||
netlink_cfg.flags = 0;
|
||||
netlink_cfg.input = nl_data_ready;
|
||||
netlink_cfg.cb_mutex = NULL;
|
||||
|
||||
gf_nl_sk = netlink_kernel_create(&init_net, NETLINK_TEST,
|
||||
&netlink_cfg);
|
||||
|
||||
if(!gf_nl_sk){
|
||||
pr_err("create netlink socket error\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void netlink_exit(void)
|
||||
{
|
||||
if(gf_nl_sk != NULL){
|
||||
netlink_kernel_release(gf_nl_sk);
|
||||
gf_nl_sk = NULL;
|
||||
}
|
||||
|
||||
pr_info("self module exited\n");
|
||||
}
|
||||
|
165
drivers/input/fingerprint/goodix/platform.c
Normal file
165
drivers/input/fingerprint/goodix/platform.c
Normal file
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
* platform indepent driver interface
|
||||
*
|
||||
* Coypritht (c) 2017 Goodix
|
||||
*/
|
||||
#include <linux/delay.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
#include "gf_spi.h"
|
||||
|
||||
#if defined(USE_SPI_BUS)
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
#elif defined(USE_PLATFORM_BUS)
|
||||
#include <linux/platform_device.h>
|
||||
#endif
|
||||
int gf_pinctrl_init(struct gf_dev* gf_dev)
|
||||
{
|
||||
int ret = 0;
|
||||
struct device *dev = &gf_dev->spi->dev;
|
||||
|
||||
gf_dev->gf_pinctrl = devm_pinctrl_get(dev);
|
||||
if (IS_ERR_OR_NULL(gf_dev->gf_pinctrl)) {
|
||||
dev_err(dev, "Target does not use pinctrl\n");
|
||||
ret = PTR_ERR(gf_dev->gf_pinctrl);
|
||||
goto err;
|
||||
}
|
||||
|
||||
gf_dev->gpio_state_enable =
|
||||
pinctrl_lookup_state(gf_dev->gf_pinctrl, "fp_en_init");
|
||||
if (IS_ERR_OR_NULL(gf_dev->gpio_state_enable)) {
|
||||
dev_err(dev, "Cannot get active pinstate\n");
|
||||
ret = PTR_ERR(gf_dev->gpio_state_enable);
|
||||
goto err;
|
||||
}
|
||||
|
||||
gf_dev->gpio_state_disable =
|
||||
pinctrl_lookup_state(gf_dev->gf_pinctrl, "fp_dis_init");
|
||||
if (IS_ERR_OR_NULL(gf_dev->gpio_state_disable)) {
|
||||
dev_err(dev, "Cannot get active pinstate\n");
|
||||
ret = PTR_ERR(gf_dev->gpio_state_disable);
|
||||
goto err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err:
|
||||
gf_dev->gf_pinctrl = NULL;
|
||||
gf_dev->gpio_state_enable = NULL;
|
||||
gf_dev->gpio_state_disable = NULL;
|
||||
return ret;
|
||||
}
|
||||
int gf_parse_dts(struct gf_dev* gf_dev)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
/*get reset resource*/
|
||||
gf_dev->reset_gpio =
|
||||
of_get_named_gpio(gf_dev->spi->dev.of_node, "fp-gpio-reset", 0);
|
||||
if (!gpio_is_valid(gf_dev->reset_gpio)) {
|
||||
pr_info("RESET GPIO is invalid.\n");
|
||||
rc = -1;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = gpio_request(gf_dev->reset_gpio, "goodix_reset");
|
||||
if (rc) {
|
||||
dev_err(&gf_dev->spi->dev, "Failed RESET GPIO. rc = %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
gpio_direction_output(gf_dev->reset_gpio, 1);
|
||||
|
||||
/*get irq resourece*/
|
||||
gf_dev->irq_gpio =
|
||||
of_get_named_gpio(gf_dev->spi->dev.of_node, "fp-gpio-irq", 0);
|
||||
pr_info("gf::irq_gpio:%d\n", gf_dev->irq_gpio);
|
||||
if (!gpio_is_valid(gf_dev->irq_gpio)) {
|
||||
pr_info("IRQ GPIO is invalid.\n");
|
||||
rc = -1;
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = gpio_request(gf_dev->irq_gpio, "goodix_irq");
|
||||
if (rc) {
|
||||
dev_err(&gf_dev->spi->dev, "Failed IRQ GPIO. rc = %d\n", rc);
|
||||
rc = -1;
|
||||
return rc;
|
||||
}
|
||||
gpio_direction_input(gf_dev->irq_gpio);
|
||||
if (of_property_read_bool(gf_dev->spi->dev.of_node, "oem,dumpling")) {
|
||||
gf_dev->project_version = 0x02;
|
||||
rc = devm_gpio_request(&gf_dev->spi->dev,
|
||||
gf_dev->enable_gpio, "goodix_en");
|
||||
if (rc) {
|
||||
pr_err("failed to request enable gpio, rc = %d\n", rc);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
gf_dev->project_version = 0x01;
|
||||
return rc;
|
||||
}
|
||||
|
||||
void gf_cleanup(struct gf_dev *gf_dev)
|
||||
{
|
||||
pr_info("[info] %s\n",__func__);
|
||||
if (gpio_is_valid(gf_dev->irq_gpio))
|
||||
{
|
||||
gpio_free(gf_dev->irq_gpio);
|
||||
pr_info("remove irq_gpio success\n");
|
||||
}
|
||||
if (gpio_is_valid(gf_dev->reset_gpio))
|
||||
{
|
||||
gpio_free(gf_dev->reset_gpio);
|
||||
pr_info("remove reset_gpio success\n");
|
||||
}
|
||||
}
|
||||
|
||||
int gf_power_on(struct gf_dev* gf_dev)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
msleep(10);
|
||||
pr_info("---- power on ok ----\n");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int gf_power_off(struct gf_dev* gf_dev)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
pr_info("---- power off ----\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
int gf_hw_reset(struct gf_dev *gf_dev, unsigned int delay_ms)
|
||||
{
|
||||
if(gf_dev == NULL) {
|
||||
pr_info("Input buff is NULL.\n");
|
||||
return -1;
|
||||
}
|
||||
gpio_direction_output(gf_dev->reset_gpio, 1);
|
||||
gpio_set_value(gf_dev->reset_gpio, 0);
|
||||
mdelay(3);
|
||||
gpio_set_value(gf_dev->reset_gpio, 1);
|
||||
mdelay(delay_ms);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gf_irq_num(struct gf_dev *gf_dev)
|
||||
{
|
||||
if(gf_dev == NULL) {
|
||||
pr_info("Input buff is NULL.\n");
|
||||
return -1;
|
||||
} else {
|
||||
return gpio_to_irq(gf_dev->irq_gpio);
|
||||
}
|
||||
}
|
||||
|
|
@ -358,6 +358,7 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
if (type == EV_ABS) {
|
||||
if (state)
|
||||
input_event(input, type, button->code, button->value);
|
||||
|
|
|
@ -832,6 +832,13 @@ config INPUT_DRV2667_HAPTICS
|
|||
To compile this driver as a module, choose M here: the
|
||||
module will be called drv2667-haptics.
|
||||
|
||||
config TRI_STATE_KEY
|
||||
default n
|
||||
tristate "switch Profiles by this triple key"
|
||||
help
|
||||
Say Y here if you want to enable the feature.
|
||||
|
||||
|
||||
source "drivers/input/misc/ots_pat9125/Kconfig"
|
||||
|
||||
config INPUT_STMVL53L0
|
||||
|
|
|
@ -79,5 +79,6 @@ obj-$(CONFIG_INPUT_WM831X_ON) += wm831x-on.o
|
|||
obj-$(CONFIG_INPUT_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o
|
||||
obj-$(CONFIG_INPUT_YEALINK) += yealink.o
|
||||
obj-$(CONFIG_INPUT_IDEAPAD_SLIDEBAR) += ideapad_slidebar.o
|
||||
obj-$(CONFIG_TRI_STATE_KEY) += tri_state_key.o
|
||||
obj-$(CONFIG_INPUT_PIXART_OTS_PAT9125_SWITCH) += ots_pat9125/
|
||||
obj-$(CONFIG_INPUT_STMVL53L0) += vl53L0/
|
||||
|
|
|
@ -32,7 +32,16 @@
|
|||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/input/qpnp-power-on.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/syscalls.h>
|
||||
#include <linux/power/oem_external_fg.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/param_rw.h>
|
||||
#include <linux/oneplus/boot_mode.h>
|
||||
|
||||
#define CREATE_MASK(NUM_BITS, POS) \
|
||||
((unsigned char) (((1 << (NUM_BITS)) - 1) << (POS)))
|
||||
#define PON_MASK(MSB_BIT, LSB_BIT) \
|
||||
CREATE_MASK(MSB_BIT - LSB_BIT + 1, LSB_BIT)
|
||||
#define PMIC_VER_8941 0x01
|
||||
#define PMIC_VERSION_REG 0x0105
|
||||
#define PMIC_VERSION_REV4_REG 0x0103
|
||||
|
@ -193,36 +202,9 @@ struct pon_regulator {
|
|||
u32 bit;
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
struct qpnp_pon {
|
||||
struct platform_device *pdev;
|
||||
struct regmap *regmap;
|
||||
struct input_dev *pon_input;
|
||||
struct qpnp_pon_config *pon_cfg;
|
||||
struct pon_regulator *pon_reg_cfg;
|
||||
struct list_head list;
|
||||
struct delayed_work bark_work;
|
||||
struct dentry *debugfs;
|
||||
int pon_trigger_reason;
|
||||
int pon_power_off_reason;
|
||||
int num_pon_reg;
|
||||
int num_pon_config;
|
||||
u32 dbc_time_us;
|
||||
u32 uvlo;
|
||||
int warm_reset_poff_type;
|
||||
int hard_reset_poff_type;
|
||||
int shutdown_poff_type;
|
||||
u16 base;
|
||||
u8 subtype;
|
||||
u8 pon_ver;
|
||||
u8 warm_reset_reason1;
|
||||
u8 warm_reset_reason2;
|
||||
bool is_spon;
|
||||
bool store_hard_reset_reason;
|
||||
bool kpdpwr_dbc_enable;
|
||||
ktime_t kpdpwr_last_release_time;
|
||||
};
|
||||
|
||||
struct delayed_work press_work;
|
||||
struct work_struct up_work;
|
||||
atomic_t press_count;
|
||||
static int pon_ship_mode_en;
|
||||
module_param_named(
|
||||
ship_mode_en, pon_ship_mode_en, int, 0600
|
||||
|
@ -830,6 +812,18 @@ qpnp_pon_input_dispatch(struct qpnp_pon *pon, u32 pon_type)
|
|||
switch (cfg->pon_type) {
|
||||
case PON_KPDPWR:
|
||||
pon_rt_bit = QPNP_PON_KPDPWR_N_SET;
|
||||
|
||||
if ((pon_rt_sts & pon_rt_bit) == 0)
|
||||
{
|
||||
printk("Power-Key UP\n");
|
||||
schedule_work(&pon->up_work);
|
||||
cancel_delayed_work(&pon->press_work);
|
||||
}else{
|
||||
printk("Power-Key DOWN\n");
|
||||
schedule_delayed_work(&pon->press_work,
|
||||
msecs_to_jiffies(3000));
|
||||
}
|
||||
|
||||
break;
|
||||
case PON_RESIN:
|
||||
pon_rt_bit = QPNP_PON_RESIN_N_SET;
|
||||
|
@ -857,16 +851,12 @@ qpnp_pon_input_dispatch(struct qpnp_pon *pon, u32 pon_type)
|
|||
* simulate press event in case release event occurred
|
||||
* without a press event
|
||||
*/
|
||||
if (!cfg->old_state && !key_status) {
|
||||
input_report_key(pon->pon_input, cfg->key_code, 1);
|
||||
input_sync(pon->pon_input);
|
||||
}
|
||||
|
||||
input_report_key(pon->pon_input, cfg->key_code, key_status);
|
||||
input_sync(pon->pon_input);
|
||||
|
||||
cfg->old_state = !!key_status;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1020,6 +1010,87 @@ err_return:
|
|||
return;
|
||||
}
|
||||
|
||||
int check_powerkey_count(int press)
|
||||
{
|
||||
int ret=0;
|
||||
int param_poweroff_count=0;
|
||||
|
||||
ret = get_param_by_index_and_offset(13, 0x30, ¶m_poweroff_count,
|
||||
sizeof(param_poweroff_count));
|
||||
|
||||
if(press)
|
||||
param_poweroff_count ++ ;
|
||||
else
|
||||
param_poweroff_count -- ;
|
||||
|
||||
ret = set_param_by_index_and_offset(13, 0x30, ¶m_poweroff_count,
|
||||
sizeof(param_poweroff_count));
|
||||
pr_info("param_poweroff_count=%d \n",param_poweroff_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qpnp_powerkey_state_check(struct qpnp_pon *pon,int up)
|
||||
{
|
||||
int rc =0;
|
||||
|
||||
if (get_boot_mode() != MSM_BOOT_MODE__NORMAL)
|
||||
return 0;
|
||||
|
||||
if ( up ) {
|
||||
rc = atomic_read(&pon->press_count);
|
||||
if (rc < 1) {
|
||||
atomic_inc(&pon->press_count);
|
||||
check_powerkey_count(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
rc = atomic_read(&pon->press_count);
|
||||
if(rc > 0) {
|
||||
atomic_dec(&pon->press_count);
|
||||
check_powerkey_count(0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void up_work_func(struct work_struct *work)
|
||||
{
|
||||
struct qpnp_pon *pon =
|
||||
container_of(work, struct qpnp_pon, up_work);
|
||||
|
||||
qpnp_powerkey_state_check(pon,0);
|
||||
return;
|
||||
}
|
||||
|
||||
static void press_work_func(struct work_struct *work)
|
||||
{
|
||||
int rc;
|
||||
uint pon_rt_sts = 0;
|
||||
struct qpnp_pon_config *cfg;
|
||||
struct qpnp_pon *pon =
|
||||
container_of(work, struct qpnp_pon, press_work.work);
|
||||
|
||||
cfg = qpnp_get_cfg(pon, PON_KPDPWR);
|
||||
if (!cfg) {
|
||||
dev_err(&pon->pdev->dev, "Invalid config pointer\n");
|
||||
goto err_return;
|
||||
}
|
||||
/* check the RT status to get the current status of the line */
|
||||
rc = regmap_read(pon->regmap, QPNP_PON_RT_STS(pon), &pon_rt_sts);
|
||||
if (rc) {
|
||||
dev_err(&pon->pdev->dev, "Unable to read PON RT status\n");
|
||||
goto err_return;
|
||||
}
|
||||
if ((pon_rt_sts & QPNP_PON_KPDPWR_N_SET) == 1) {
|
||||
qpnp_powerkey_state_check(pon,1);
|
||||
dev_err(&pon->pdev->dev, "after 3s Power-Key is still DOWN\n");
|
||||
}
|
||||
msleep(20);
|
||||
sys_sync();
|
||||
err_return:
|
||||
return;
|
||||
}
|
||||
|
||||
static irqreturn_t qpnp_resin_bark_irq(int irq, void *_pon)
|
||||
{
|
||||
int rc;
|
||||
|
@ -1051,6 +1122,93 @@ static irqreturn_t qpnp_resin_bark_irq(int irq, void *_pon)
|
|||
err_exit:
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
/*20151106,wujialong add for power dump capture*/
|
||||
static int qpnp_config_reset(struct qpnp_pon *pon, struct qpnp_pon_config *cfg);
|
||||
|
||||
static unsigned int pwr_dump_enabled = -1;
|
||||
static unsigned int long_pwr_dump_enabled = -1;
|
||||
|
||||
static int param_set_pwr_dump_enabled(const char *val, struct kernel_param *kp)
|
||||
{
|
||||
unsigned long enable;
|
||||
struct qpnp_pon *pon = sys_reset_dev;
|
||||
struct qpnp_pon_config *cfg = NULL;
|
||||
int rc;
|
||||
|
||||
if (!val || kstrtoul(val, 0, &enable) || enable > 1)
|
||||
return -EINVAL;
|
||||
|
||||
cfg = qpnp_get_cfg(pon, 0); /*0 means pwr key */
|
||||
if (!cfg)
|
||||
return -EINVAL;
|
||||
pr_info("pwr_dump_enabled = %d and request enable = %d\n",
|
||||
pwr_dump_enabled, (unsigned int)enable);
|
||||
if (pwr_dump_enabled != enable) {
|
||||
cfg->s1_timer = 1352; /*reduce this time */
|
||||
cfg->s2_type = 1;/*change s2 type to warm reset*/
|
||||
rc = qpnp_config_reset(pon, cfg);
|
||||
|
||||
/*if we need enable this feature, */
|
||||
/*we should disable wakeup capability */
|
||||
if (enable)
|
||||
disable_irq_wake(cfg->state_irq);
|
||||
else
|
||||
enable_irq_wake(cfg->state_irq);
|
||||
pwr_dump_enabled = enable;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int param_set_long_press_pwr_dump_enabled
|
||||
(const char *val, struct kernel_param *kp)
|
||||
{
|
||||
unsigned long enable;
|
||||
struct qpnp_pon *pon = sys_reset_dev;
|
||||
struct qpnp_pon_config *cfg = NULL;
|
||||
int rc;
|
||||
u32 s1_timer_bak;
|
||||
u32 s2_type_bak;
|
||||
|
||||
if (!val || kstrtoul(val, 0, &enable) || enable > 1)
|
||||
return -EINVAL;
|
||||
|
||||
cfg = qpnp_get_cfg(pon, PON_KPDPWR); /*0 means pwr key*/
|
||||
if (!cfg)
|
||||
return -EINVAL;
|
||||
|
||||
pr_info("long_pwr_dump_enabled = %d enable = %d s1_timer =%d\n",
|
||||
long_pwr_dump_enabled,
|
||||
(unsigned int)enable, cfg->s1_timer);
|
||||
|
||||
if (long_pwr_dump_enabled != enable) {
|
||||
|
||||
if (enable) {
|
||||
s1_timer_bak = cfg->s1_timer;
|
||||
s2_type_bak = cfg->s2_type;
|
||||
|
||||
cfg->s1_timer = 1352; /*reduce this time */
|
||||
cfg->s2_type = 1; /*change s2 type to warm reset*/
|
||||
|
||||
rc = qpnp_config_reset(pon, cfg);
|
||||
|
||||
cfg->s1_timer = s1_timer_bak;
|
||||
cfg->s2_type = s2_type_bak;
|
||||
|
||||
} else
|
||||
rc = qpnp_config_reset(pon, cfg);
|
||||
long_pwr_dump_enabled = enable;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_param_call(pwr_dump_enabled,
|
||||
param_set_pwr_dump_enabled, param_get_uint, &pwr_dump_enabled, 0644);
|
||||
|
||||
module_param_call(long_pwr_dump_enabled,
|
||||
param_set_long_press_pwr_dump_enabled,
|
||||
param_get_uint, &long_pwr_dump_enabled, 0644);
|
||||
|
||||
/*20151106,wujialong add for power dump capture*/
|
||||
|
||||
static int
|
||||
qpnp_config_pull(struct qpnp_pon *pon, struct qpnp_pon_config *cfg)
|
||||
|
@ -1986,6 +2144,190 @@ static int read_gen2_pon_off_reason(struct qpnp_pon *pon, u16 *reason,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool created_pwr_on_off_obj;
|
||||
|
||||
#define PMIC_SID_NUM 3
|
||||
#define QPNP_PON_POFF_BUFFER_SIZE 128
|
||||
|
||||
static struct qpnp_pon *g_pon[PMIC_SID_NUM];
|
||||
static bool g_is_cold_boot[PMIC_SID_NUM];
|
||||
|
||||
static ssize_t pwron_reason_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
int i;
|
||||
int index;
|
||||
u32 pon_sts = 0;
|
||||
int rc;
|
||||
char *pbuf = buf;
|
||||
int ret = 0;
|
||||
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE, "qpnp_pon_reason :\n");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
|
||||
for (i = 0 ; i < ARRAY_SIZE(qpnp_pon_reason) ; i++) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"[%d] : %s\n", i, qpnp_pon_reason[i]);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
|
||||
for (i = 0 ; i < PMIC_SID_NUM ; i++) {
|
||||
/* PON reason */
|
||||
if (g_pon[i] == NULL || g_pon[i]->regmap == NULL)
|
||||
continue;
|
||||
|
||||
/* PON reason */
|
||||
rc = regmap_read(g_pon[i]->regmap,
|
||||
QPNP_PON_REASON1(g_pon[i]), &pon_sts);
|
||||
if (rc) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"PMIC@SID%d Unable to read PON_RESASON1 reg and rc: %d\n",
|
||||
to_spmi_device(g_pon[i]->pdev->dev.parent)->usid,
|
||||
rc);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
continue;
|
||||
}
|
||||
|
||||
index = ffs(pon_sts) - 1;
|
||||
cold_boot = !qpnp_pon_is_warm_reset();
|
||||
if (index >= ARRAY_SIZE(qpnp_pon_reason) || index < 0) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"PMIC@SID%d PON_REASON1 regs :[0x%x] and Power-on reason: Unknown and '%s' boot\n",
|
||||
to_spmi_device(g_pon[i]->pdev->dev.parent)->usid,
|
||||
pon_sts,
|
||||
cold_boot ? "cold" : "warm");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
continue;
|
||||
} else {
|
||||
g_pon[i]->pon_trigger_reason = index;
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"PMIC@SID%d PON_REASON1 regs :[0x%x] and Power-on reason: '%s' boot and ",
|
||||
to_spmi_device(g_pon[i]->pdev->dev.parent)->usid,
|
||||
pon_sts,
|
||||
cold_boot ? "cold" : "warm");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
|
||||
for_each_set_bit(index, (unsigned long *)&pon_sts,
|
||||
ARRAY_SIZE(qpnp_pon_reason)) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"[%d] ", index);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE, "\n");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
*(buf+ret-1) = '\n';
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ssize_t pwroff_reason_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
int index;
|
||||
int rc;
|
||||
u8 temp_buf[2];
|
||||
u16 poff_sts = 0;
|
||||
char *pbuf = buf;
|
||||
int ret = 0;
|
||||
int reason_index_offset = 0;
|
||||
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE, "qpnp_poff_reason :\n");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
|
||||
for (j = 0; j < ARRAY_SIZE(qpnp_poff_reason); j++) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"[%d] : %s\n", j, qpnp_poff_reason[j]);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
|
||||
for (i = 0; i < PMIC_SID_NUM; i++) {
|
||||
/* POFF reason */
|
||||
if (g_pon[i] == NULL || g_pon[i]->regmap == NULL)
|
||||
continue;
|
||||
|
||||
/* POFF reason */
|
||||
if (!is_pon_gen1(g_pon[i]) && g_pon[i]->subtype != PON_1REG) {
|
||||
rc = read_gen2_pon_off_reason(g_pon[i], &poff_sts,
|
||||
&reason_index_offset);
|
||||
if (rc)
|
||||
return rc;
|
||||
} else {
|
||||
rc = regmap_bulk_read(g_pon[i]->regmap,
|
||||
QPNP_POFF_REASON1(g_pon[i]),
|
||||
temp_buf, 2);
|
||||
if (rc) {
|
||||
dev_err(&g_pon[i]->pdev->dev, "Unable to read POFF_REASON regs rc:%d\n",
|
||||
rc);
|
||||
return rc;
|
||||
}
|
||||
poff_sts = temp_buf[0] | (temp_buf[1] << 8);
|
||||
}
|
||||
index = ffs(poff_sts) - 1 + reason_index_offset;
|
||||
if (index >= ARRAY_SIZE(qpnp_poff_reason) || index < 0) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"PMIC@SID%d POFF_REASON regs :[0x%x] and Power-off reason: Unknown\n",
|
||||
to_spmi_device(g_pon[i]->pdev->dev.parent)->usid,
|
||||
poff_sts);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
continue;
|
||||
} else {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"PMIC@SID%d POFF_REASON regs :[0x%x] and Power-off reason: ",
|
||||
to_spmi_device(g_pon[i]->pdev->dev.parent)->usid,
|
||||
poff_sts);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
if (index < ARRAY_SIZE(qpnp_poff_reason) && index >= 0) {
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE,
|
||||
"[%d] ", index);
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
snprintf(pbuf, QPNP_PON_POFF_BUFFER_SIZE, "\n");
|
||||
ret += strlen(pbuf);
|
||||
pbuf += strlen(pbuf);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
*(buf+ret-1) = '\n';
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct kobj_attribute pwron_reason_attribute =
|
||||
__ATTR(pwron_reason, 0444, pwron_reason_show, NULL);
|
||||
static struct kobj_attribute pwroff_reason_attribute =
|
||||
__ATTR(pwroff_reason, 0444, pwroff_reason_show, NULL);
|
||||
|
||||
static struct attribute *pwr_on_off_attrs[] = {
|
||||
&pwron_reason_attribute.attr,
|
||||
&pwroff_reason_attribute.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct attribute_group pwr_on_off_attrs_group = {
|
||||
.attrs = pwr_on_off_attrs,
|
||||
};
|
||||
static struct kobject *pwr_on_off_kobj;
|
||||
static int qpnp_pon_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct qpnp_pon *pon;
|
||||
|
@ -2001,7 +2343,7 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
u8 s3_src_reg;
|
||||
unsigned long flags;
|
||||
uint temp = 0;
|
||||
|
||||
int i, reg;
|
||||
pon = devm_kzalloc(&pdev->dev, sizeof(struct qpnp_pon), GFP_KERNEL);
|
||||
if (!pon)
|
||||
return -ENOMEM;
|
||||
|
@ -2064,6 +2406,17 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
sizeof(struct qpnp_pon_config) *
|
||||
pon->num_pon_config, GFP_KERNEL);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
rc = regmap_read(pon->regmap, ((pon)->base + 0xC0+i), ®);
|
||||
dev_info(&pdev->dev, "(0x%x:0x%x)\n",
|
||||
((pon)->base + 0xC0+i), reg);
|
||||
if (rc) {
|
||||
dev_err(&pon->pdev->dev, "Unable to read addr=0x%x, rc(%d)\n",
|
||||
((pon)->base + 0xC0+i), rc);
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read PON_PERPH_SUBTYPE register to get PON type */
|
||||
rc = regmap_read(pon->regmap,
|
||||
QPNP_PON_PERPH_SUBTYPE(pon),
|
||||
|
@ -2128,18 +2481,23 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
|
||||
index = ffs(pon_sts) - 1;
|
||||
cold_boot = !qpnp_pon_is_warm_reset();
|
||||
for_each_set_bit(index, (unsigned long *)&pon_sts,
|
||||
ARRAY_SIZE(qpnp_pon_reason)) {
|
||||
if (index >= ARRAY_SIZE(qpnp_pon_reason) || index < 0) {
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d Power-on reason: Unknown and '%s' boot\n",
|
||||
"PMIC@SID%d PON_REASON1 regs :[0x%x] and Power-on reason: Unknown and '%s' boot\n",
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid,
|
||||
cold_boot ? "cold" : "warm");
|
||||
pon_sts,
|
||||
cold_boot ? "cold" : "warm");
|
||||
} else {
|
||||
pon->pon_trigger_reason = index;
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d Power-on reason: %s and '%s' boot\n",
|
||||
"PMIC@SID%d PON_REASON1 regs :[0x%x] and Power-on reason: %s and '%s' boot\n",
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid,
|
||||
qpnp_pon_reason[index],
|
||||
pon_sts,
|
||||
qpnp_pon_reason[index],
|
||||
cold_boot ? "cold" : "warm");
|
||||
}
|
||||
}
|
||||
|
||||
/* POFF reason */
|
||||
|
@ -2158,17 +2516,29 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
}
|
||||
poff_sts = buf[0] | (buf[1] << 8);
|
||||
}
|
||||
|
||||
index = ffs(poff_sts) - 1 + reason_index_offset;
|
||||
if (index >= ARRAY_SIZE(qpnp_poff_reason) || index < 0) {
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d: Unknown power-off reason\n",
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid);
|
||||
} else {
|
||||
pon->pon_power_off_reason = index;
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d: Power-off reason: %s\n",
|
||||
if (index >= ARRAY_SIZE(qpnp_poff_reason) || index < 0) {
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d: POFF_REASON regs :[0x%x] and Unknown Power-off reason\n",
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid,
|
||||
poff_sts);
|
||||
} else {
|
||||
pon->pon_power_off_reason = index;
|
||||
dev_info(&pon->pdev->dev,
|
||||
"PMIC@SID%d: POFF_REASON regs :[0x%x] and Power-off reason: %s\n",
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid,
|
||||
poff_sts,
|
||||
qpnp_poff_reason[index]);
|
||||
}
|
||||
|
||||
if (to_spmi_device(pon->pdev->dev.parent)->usid >= 0 &&
|
||||
to_spmi_device(pon->pdev->dev.parent)->usid < PMIC_SID_NUM) {
|
||||
g_pon[to_spmi_device(pon->pdev->dev.parent)->usid] = pon;
|
||||
g_is_cold_boot[to_spmi_device(pon->pdev->dev.parent)->usid] =
|
||||
cold_boot;
|
||||
if (!to_spmi_device(pon->pdev->dev.parent)->usid)
|
||||
op_pm8998_regmap_register(pon);
|
||||
}
|
||||
|
||||
if (pon->pon_trigger_reason == PON_SMPL ||
|
||||
|
@ -2253,7 +2623,8 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
dev_set_drvdata(&pdev->dev, pon);
|
||||
|
||||
INIT_DELAYED_WORK(&pon->bark_work, bark_work_func);
|
||||
|
||||
INIT_DELAYED_WORK(&pon->press_work, press_work_func);
|
||||
INIT_WORK(&pon->up_work, up_work_func);
|
||||
/* register the PON configurations */
|
||||
rc = qpnp_pon_config_init(pon);
|
||||
if (rc) {
|
||||
|
@ -2359,6 +2730,19 @@ static int qpnp_pon_probe(struct platform_device *pdev)
|
|||
pon->store_hard_reset_reason = of_property_read_bool(pdev->dev.of_node,
|
||||
"qcom,store-hard-reset-reason");
|
||||
|
||||
if (!created_pwr_on_off_obj) {
|
||||
pwr_on_off_kobj = kobject_create_and_add("pwr_on_off_reason",
|
||||
NULL);
|
||||
if (!pwr_on_off_kobj)
|
||||
dev_err(&pdev->dev, "kobject_create_and_add for pwr_on_off_reason failed.\n");
|
||||
else if (sysfs_create_group(pwr_on_off_kobj,
|
||||
&pwr_on_off_attrs_group)) {
|
||||
dev_err(&pdev->dev, "sysfs_create_group for pwr_on_off_reason failed.\n");
|
||||
kobject_put(pwr_on_off_kobj);
|
||||
}
|
||||
created_pwr_on_off_obj = true;
|
||||
}
|
||||
|
||||
qpnp_pon_debugfs_init(pdev);
|
||||
return 0;
|
||||
}
|
||||
|
|
386
drivers/input/misc/tri_state_key.c
Normal file
386
drivers/input/misc/tri_state_key.c
Normal file
|
@ -0,0 +1,386 @@
|
|||
/*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_gpio.h>
|
||||
|
||||
#include <linux/switch.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <linux/timer.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define DRV_NAME "tri-state-key"
|
||||
|
||||
/*
|
||||
KEY1(GPIO1) KEY2(GPIO92)
|
||||
pin1 connect to pin4 0 1 | MUTE
|
||||
pin2 connect to pin5 1 1 | Do Not Disturb
|
||||
pin4 connect to pin3 1 0 | Normal
|
||||
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
MODE_UNKNOWN,
|
||||
MODE_MUTE,
|
||||
MODE_DO_NOT_DISTURB,
|
||||
MODE_NORMAL,
|
||||
MODE_MAX_NUM
|
||||
} tri_mode_t;
|
||||
|
||||
struct switch_dev_data
|
||||
{
|
||||
int irq_key3;
|
||||
int irq_key2;
|
||||
int irq_key1;
|
||||
int key1_gpio;
|
||||
int key2_gpio;
|
||||
int key3_gpio;
|
||||
|
||||
struct regulator *vdd_io;
|
||||
|
||||
struct work_struct work;
|
||||
struct switch_dev sdev;
|
||||
struct device *dev;
|
||||
|
||||
struct timer_list s_timer;
|
||||
struct pinctrl * key_pinctrl;
|
||||
struct pinctrl_state * set_state;
|
||||
|
||||
};
|
||||
|
||||
static struct switch_dev_data *switch_data;
|
||||
static DEFINE_MUTEX(sem);
|
||||
static int set_gpio_by_pinctrl(void)
|
||||
{
|
||||
return pinctrl_select_state(switch_data->key_pinctrl, switch_data->set_state);
|
||||
}
|
||||
|
||||
/*set 3 gpio default state high */
|
||||
static int key_pre[3] = {1, 1, 1};
|
||||
static int delay_time;
|
||||
|
||||
static void switch_dev_work(struct work_struct *work)
|
||||
{
|
||||
int key[3];
|
||||
int i, j;
|
||||
bool have_wrong_key = false;
|
||||
int state_same = 0;
|
||||
|
||||
msleep(delay_time);
|
||||
key[0] = gpio_get_value(switch_data->key1_gpio);
|
||||
key[1] = gpio_get_value(switch_data->key2_gpio);
|
||||
key[2] = gpio_get_value(switch_data->key3_gpio);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
/*if 3 gpio status is the same as before ,ignore them*/
|
||||
if (key_pre[i] == key[i])
|
||||
state_same++;
|
||||
if (state_same == 3)
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
/*
|
||||
* 1,if the gpio key is low ,and previous status is low ,
|
||||
* we suspect that the gpio is in wrong states
|
||||
*/
|
||||
if (key[i] + key_pre[i] == 0) {
|
||||
pr_err("[sk]key[%d] is in wrong state\n", i);
|
||||
have_wrong_key = true;
|
||||
delay_time = 300;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_lock(&sem);
|
||||
if (have_wrong_key == true) {
|
||||
if (key[0]+key[1]+key[2] == 2) {
|
||||
if (i == 0)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_MUTE);
|
||||
if (i == 1)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_DO_NOT_DISTURB);
|
||||
if (i == 2)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_NORMAL);
|
||||
}
|
||||
else {
|
||||
for (j = 0; j < 3; j++) {
|
||||
/* we got the gpio is wrong state,
|
||||
* then check which gpio
|
||||
*/
|
||||
if ((key[j] == 0) && (i != j)) {
|
||||
if (j == 0)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_MUTE);
|
||||
if (j == 1)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_DO_NOT_DISTURB);
|
||||
if (j == 2)
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!key[0])
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_MUTE);
|
||||
if (!key[1])
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_DO_NOT_DISTURB);
|
||||
if (!key[2])
|
||||
switch_set_state(
|
||||
&switch_data->sdev,
|
||||
MODE_NORMAL);
|
||||
}
|
||||
for (i = 0; i < 3; i++)
|
||||
key_pre[i] = key[i];
|
||||
|
||||
mutex_unlock(&sem);
|
||||
}
|
||||
|
||||
static irqreturn_t switch_dev_interrupt(int irq, void *_dev)
|
||||
{
|
||||
schedule_work(&switch_data->work);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void timer_handle(unsigned long arg)
|
||||
{
|
||||
schedule_work(&switch_data->work);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static int switch_dev_get_devtree_pdata(struct device *dev)
|
||||
{
|
||||
struct device_node *node;
|
||||
|
||||
node = dev->of_node;
|
||||
if (!node)
|
||||
return -EINVAL;
|
||||
|
||||
switch_data->key3_gpio= of_get_named_gpio(node, "tristate,gpio_key3", 0);
|
||||
if ((!gpio_is_valid(switch_data->key3_gpio)))
|
||||
return -EINVAL;
|
||||
pr_err("switch_data->key3_gpio=%d \n", switch_data->key3_gpio);
|
||||
|
||||
switch_data->key2_gpio= of_get_named_gpio(node, "tristate,gpio_key2", 0);
|
||||
if ((!gpio_is_valid(switch_data->key2_gpio)))
|
||||
return -EINVAL;
|
||||
pr_err("switch_data->key2_gpio=%d \n", switch_data->key2_gpio);
|
||||
|
||||
switch_data->key1_gpio= of_get_named_gpio(node, "tristate,gpio_key1", 0);
|
||||
if ((!gpio_is_valid(switch_data->key1_gpio)))
|
||||
return -EINVAL;
|
||||
pr_err("switch_data->key1_gpio=%d \n", switch_data->key1_gpio);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
static inline int
|
||||
switch_dev_get_devtree_pdata(struct device *dev)
|
||||
{
|
||||
pr_info("%s inline function", __func__);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int tristate_dev_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev;
|
||||
int ret = 0;
|
||||
|
||||
dev= &pdev->dev;
|
||||
|
||||
switch_data = kzalloc(sizeof(struct switch_dev_data), GFP_KERNEL);
|
||||
if (!switch_data)
|
||||
return -ENOMEM;
|
||||
|
||||
switch_data->dev = dev;
|
||||
switch_data->sdev.name = DRV_NAME;
|
||||
|
||||
switch_data->key_pinctrl = devm_pinctrl_get(switch_data->dev);
|
||||
if (IS_ERR_OR_NULL(switch_data->key_pinctrl)) {
|
||||
dev_err(switch_data->dev, "Failed to get pinctrl \n");
|
||||
goto err_switch_dev_register;
|
||||
}
|
||||
switch_data->set_state = pinctrl_lookup_state(switch_data->key_pinctrl,
|
||||
"pmx_tri_state_key_active");
|
||||
if (IS_ERR_OR_NULL(switch_data->set_state)) {
|
||||
dev_err(switch_data->dev, "Failed to lookup_state \n");
|
||||
goto err_switch_dev_register;
|
||||
}
|
||||
|
||||
set_gpio_by_pinctrl();
|
||||
|
||||
ret = switch_dev_get_devtree_pdata(dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "parse device tree fail!!!\n");
|
||||
goto err_switch_dev_register;
|
||||
}
|
||||
|
||||
ret = switch_dev_register(&switch_data->sdev);
|
||||
if (ret < 0)
|
||||
goto err_switch_dev_register;
|
||||
|
||||
//config irq gpio and request irq
|
||||
ret = gpio_request(switch_data->key1_gpio, "tristate_key1");
|
||||
if (ret < 0)
|
||||
goto err_request_gpio;
|
||||
|
||||
ret = gpio_direction_input(switch_data->key1_gpio);
|
||||
if (ret < 0)
|
||||
goto err_set_gpio_input;
|
||||
|
||||
switch_data->irq_key1 = gpio_to_irq(switch_data->key1_gpio);
|
||||
if (switch_data->irq_key1 < 0) {
|
||||
ret = switch_data->irq_key1;
|
||||
goto err_detect_irq_num_failed;
|
||||
}
|
||||
|
||||
ret = request_irq(switch_data->irq_key1, switch_dev_interrupt,
|
||||
IRQF_TRIGGER_FALLING|IRQF_TRIGGER_RISING,
|
||||
"tristate_key1", switch_data);
|
||||
if (ret < 0)
|
||||
goto err_request_irq;
|
||||
|
||||
ret = gpio_request(switch_data->key2_gpio,
|
||||
"tristate_key2");
|
||||
if (ret < 0)
|
||||
goto err_request_gpio;
|
||||
|
||||
ret = gpio_direction_input(switch_data->key2_gpio);
|
||||
if (ret < 0)
|
||||
goto err_set_gpio_input;
|
||||
|
||||
switch_data->irq_key2 = gpio_to_irq(switch_data->key2_gpio);
|
||||
if (switch_data->irq_key2 < 0) {
|
||||
ret = switch_data->irq_key2;
|
||||
goto err_detect_irq_num_failed;
|
||||
}
|
||||
|
||||
ret = request_irq(switch_data->irq_key2, switch_dev_interrupt,
|
||||
IRQF_TRIGGER_FALLING|IRQF_TRIGGER_RISING,
|
||||
"tristate_key2", switch_data);
|
||||
if (ret < 0)
|
||||
goto err_request_irq;
|
||||
|
||||
ret = gpio_request(switch_data->key3_gpio,
|
||||
"tristate_key3");
|
||||
if (ret < 0)
|
||||
goto err_request_gpio;
|
||||
|
||||
ret = gpio_direction_input(switch_data->key3_gpio);
|
||||
if (ret < 0)
|
||||
goto err_set_gpio_input;
|
||||
|
||||
switch_data->irq_key3 = gpio_to_irq(switch_data->key3_gpio);
|
||||
if (switch_data->irq_key3 < 0) {
|
||||
ret = switch_data->irq_key3;
|
||||
goto err_detect_irq_num_failed;
|
||||
}
|
||||
|
||||
ret = request_irq(switch_data->irq_key3, switch_dev_interrupt,
|
||||
IRQF_TRIGGER_FALLING|IRQF_TRIGGER_RISING,
|
||||
"tristate_key3", switch_data);
|
||||
if (ret < 0)
|
||||
goto err_request_irq;
|
||||
|
||||
INIT_WORK(&switch_data->work, switch_dev_work);
|
||||
|
||||
init_timer(&switch_data->s_timer);
|
||||
switch_data->s_timer.function = &timer_handle;
|
||||
switch_data->s_timer.expires = jiffies + 5*HZ;
|
||||
|
||||
add_timer(&switch_data->s_timer);
|
||||
|
||||
enable_irq_wake(switch_data->irq_key1);
|
||||
enable_irq_wake(switch_data->irq_key2);
|
||||
enable_irq_wake(switch_data->irq_key3);
|
||||
|
||||
return 0;
|
||||
|
||||
err_request_gpio:
|
||||
switch_dev_unregister(&switch_data->sdev);
|
||||
err_request_irq:
|
||||
err_detect_irq_num_failed:
|
||||
err_set_gpio_input:
|
||||
gpio_free(switch_data->key2_gpio);
|
||||
gpio_free(switch_data->key1_gpio);
|
||||
gpio_free(switch_data->key3_gpio);
|
||||
err_switch_dev_register:
|
||||
kfree(switch_data);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int tristate_dev_remove(struct platform_device *pdev)
|
||||
{
|
||||
cancel_work_sync(&switch_data->work);
|
||||
gpio_free(switch_data->key1_gpio);
|
||||
gpio_free(switch_data->key2_gpio);
|
||||
gpio_free(switch_data->key3_gpio);
|
||||
switch_dev_unregister(&switch_data->sdev);
|
||||
kfree(switch_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#ifdef CONFIG_OF
|
||||
static struct of_device_id tristate_dev_of_match[] =
|
||||
{
|
||||
{ .compatible = "oneplus,tri-state-key", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tristate_dev_of_match);
|
||||
#endif
|
||||
|
||||
static struct platform_driver tristate_dev_driver = {
|
||||
.probe = tristate_dev_probe,
|
||||
.remove = tristate_dev_remove,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = tristate_dev_of_match,
|
||||
},
|
||||
};
|
||||
static int __init oem_tristate_init(void)
|
||||
{
|
||||
return platform_driver_register(&tristate_dev_driver);
|
||||
}
|
||||
module_init(oem_tristate_init);
|
||||
|
||||
static void __exit oem_tristate_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&tristate_dev_driver);
|
||||
}
|
||||
module_exit(oem_tristate_exit);
|
||||
MODULE_DESCRIPTION("oem tri_state_key driver");
|
||||
MODULE_LICENSE("GPL v2");
|
19
drivers/input/touchscreen/Kconfig
Normal file → Executable file
19
drivers/input/touchscreen/Kconfig
Normal file → Executable file
|
@ -1215,6 +1215,25 @@ config TOUCHSCREEN_IT7260_I2C
|
|||
To compile this driver as a module, choose M here: the
|
||||
module will be called it7258_ts_i2c.
|
||||
|
||||
|
||||
config TOUCHSCREEN_GT9XX
|
||||
bool "Goodix touchpanel GT9xx series"
|
||||
depends on I2C
|
||||
help
|
||||
Say Y here if you have a Goodix GT9xx touchscreen.
|
||||
Gt9xx controllers are multi touch controllers which can
|
||||
report 5 touches at a time.
|
||||
|
||||
If unsure, say N.
|
||||
config TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI
|
||||
tristate "Synaptics s3320 i2c touchscreen"
|
||||
depends on I2C
|
||||
help
|
||||
Say Y here if you have a Synaptics s3320 Touchscreen.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
|
||||
config TOUCHSCREEN_ST
|
||||
bool "STMicroelectronics Touchscreen Driver"
|
||||
depends on I2C
|
||||
|
|
2
drivers/input/touchscreen/Makefile
Normal file → Executable file
2
drivers/input/touchscreen/Makefile
Normal file → Executable file
|
@ -97,4 +97,6 @@ obj-$(CONFIG_TOUCHSCREEN_TPS6507X) += tps6507x-ts.o
|
|||
obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_COLIBRI_VF50) += colibri-vf50-ts.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI) += synaptics_driver_s3320.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_S3320_I2C_RMI) += synaptics_s3320_redremote.o
|
||||
obj-$(CONFIG_TOUCHSCREEN_ST) += st/
|
||||
|
|
1877
drivers/input/touchscreen/fw_update_v7.if
Executable file
1877
drivers/input/touchscreen/fw_update_v7.if
Executable file
File diff suppressed because it is too large
Load diff
657
drivers/input/touchscreen/synaptics_baseline.h
Executable file
657
drivers/input/touchscreen/synaptics_baseline.h
Executable file
|
@ -0,0 +1,657 @@
|
|||
#ifndef SYNAPTICS_BASELINE_H
|
||||
#define SYNAPTICS_BASELINE_H
|
||||
|
||||
#define TX_NUMBER (17)
|
||||
#define TX_17801_NUMBER (15)
|
||||
#define RX_NUMBER (30)
|
||||
|
||||
extern bool virtual_key_enable;
|
||||
|
||||
const int16_t baseline_cap_data[2][TX_NUMBER][RX_NUMBER*2] = {
|
||||
/*enable cbc*/
|
||||
{
|
||||
{403, 748, 441, 819, 451, 837, 451, 837, 450, 836, 459, 852,
|
||||
450, 836, 448, 832, 456, 846, 451, 837, 454, 844, 458, 850,
|
||||
463, 861, 498, 926, 499, 927, 501, 930, 515, 956, 526, 978,
|
||||
529, 982, 528, 980, 531, 987, 544, 1010, 554, 1030, 557,
|
||||
1034, 561, 1041, 568, 1056, 568, 1056, 587, 1091, 741, 1375,
|
||||
776, 1440},
|
||||
{424, 787, 460, 854, 468, 870, 468, 870, 468, 870, 476, 884,
|
||||
468, 868, 468, 868, 472, 876, 470, 872, 473, 879, 485, 901,
|
||||
485, 901, 522, 969, 522, 969, 522, 969, 531, 987, 534, 992,
|
||||
547, 1017, 545, 1013, 557, 1034, 561, 1041, 574, 1066, 592,
|
||||
1099, 576, 1070, 592, 1099, 592, 1099, 601, 1115, 774, 1437,
|
||||
791, 1469},
|
||||
{419, 779, 456, 846, 464, 862, 464, 862, 463, 861, 471, 875,
|
||||
464, 862, 462, 858, 470, 872, 466, 865, 470, 872, 473, 879,
|
||||
477, 887, 522, 969, 522, 969, 522, 969, 526, 978, 530, 984,
|
||||
542, 1006, 540, 1002, 545, 1013, 557, 1034, 566, 1052, 568,
|
||||
1056, 571, 1060, 580, 1076, 578, 1074, 592, 1099, 757, 1405,
|
||||
783, 1455},
|
||||
{420, 780, 456, 846, 466, 865, 466, 865, 464, 862, 473, 879,
|
||||
466, 865, 463, 861, 470, 872, 468, 868, 470, 872, 473, 879,
|
||||
477, 887, 522, 969, 522, 969, 522, 969, 528, 980, 530, 984,
|
||||
543, 1009, 541, 1005, 544, 1010, 566, 1052, 566, 1052, 566,
|
||||
1052, 571, 1060, 578, 1074, 578, 1073, 592, 1099, 756, 1404,
|
||||
783, 1453},
|
||||
{421, 783, 454, 844, 464, 862, 464, 862, 464, 862, 473, 879,
|
||||
464, 862, 463, 861, 470, 872, 466, 865, 468, 870, 472, 876,
|
||||
476, 884, 512, 952, 510, 948, 522, 969, 526, 978, 529, 982,
|
||||
541, 1005, 540, 1002, 552, 1024, 557, 1034, 564, 1048, 565,
|
||||
1049, 567, 1053, 575, 1067, 574, 1066, 592, 1099, 756, 1404,
|
||||
777, 1443},
|
||||
{421, 783, 454, 844, 464, 862, 464, 862, 464, 862, 473, 879,
|
||||
464, 862, 463, 861, 470, 872, 468, 868, 468, 870, 473, 879,
|
||||
477, 887, 522, 970, 511, 949, 522, 969, 526, 976, 528, 980,
|
||||
540, 1002, 539, 1001, 543, 1009, 557, 1034, 565, 1049, 565,
|
||||
1049, 567, 1053, 575, 1067, 574, 1066, 582, 1082, 752, 1396,
|
||||
774, 1437},
|
||||
{418, 776, 453, 841, 464, 862, 466, 865, 463, 861, 472, 876,
|
||||
463, 861, 462, 858, 479, 889, 466, 865, 468, 870, 472, 876,
|
||||
476, 884, 510, 948, 510, 948, 512, 952, 524, 974, 528, 980,
|
||||
540, 1002, 539, 1001, 540, 1002, 552, 1024, 562, 1044, 563,
|
||||
1045, 565, 1049, 572, 1062, 572, 1062, 578, 1074, 750, 1394,
|
||||
774, 1437},
|
||||
{415, 771, 456, 846, 468, 868, 468, 868, 466, 865, 474, 880,
|
||||
466, 865, 463, 861, 472, 876, 468, 868, 471, 875, 473, 879,
|
||||
477, 887, 511, 949, 511, 949, 522, 969, 526, 976, 530, 984,
|
||||
540, 1002, 547, 1017, 540, 1002, 552, 1024, 562, 1044, 562,
|
||||
1044, 563, 1045, 574, 1066, 571, 1060, 578, 1073, 752, 1396,
|
||||
774, 1437},
|
||||
{405, 751, 456, 846, 468, 868, 468, 870, 468, 868, 474, 880,
|
||||
468, 868, 466, 865, 473, 879, 479, 889, 472, 876, 475, 883,
|
||||
480, 891, 522, 969, 522, 969, 522, 969, 526, 978, 530, 984,
|
||||
542, 1006, 539, 1001, 542, 1006, 557, 1034, 565, 1049, 561,
|
||||
1041, 563, 1045, 572, 1062, 572, 1062, 575, 1067, 752, 1396,
|
||||
774, 1437},
|
||||
{415, 771, 460, 854, 472, 876, 472, 876, 471, 875, 480, 891,
|
||||
471, 875, 470, 872, 476, 884, 472, 876, 476, 884, 479, 889,
|
||||
485, 901, 522, 969, 522, 969, 526, 978, 530, 984, 533, 991,
|
||||
544, 1010, 541, 1005, 543, 1009, 557, 1034, 566, 1052, 565,
|
||||
1049, 566, 1052, 574, 1066, 574, 1066, 576, 1070, 750, 1394,
|
||||
774, 1437},
|
||||
{428, 794, 463, 861, 473, 879, 474, 880, 473, 879, 485, 901,
|
||||
474, 880, 473, 879, 480, 891, 476, 884, 477, 887, 485, 901,
|
||||
485, 901, 522, 969, 522, 969, 522, 969, 532, 988, 534, 992,
|
||||
545, 1013, 542, 1006, 544, 1010, 557, 1034, 565, 1049, 565,
|
||||
1049, 566, 1052, 574, 1066, 582, 1082, 574, 1066, 760, 1412,
|
||||
762, 1416},
|
||||
{442, 822, 468, 868, 477, 887, 479, 889, 476, 884, 485, 901,
|
||||
477, 887, 475, 883, 485, 901, 477, 887, 491, 913, 485, 901,
|
||||
489, 907, 522, 969, 522, 969, 522, 969, 534, 992, 536, 996,
|
||||
551, 1023, 543, 1009, 547, 1017, 557, 1035, 584, 1084, 565,
|
||||
1049, 566, 1052, 574, 1066, 574, 1066, 570, 1058, 750, 1394,
|
||||
762, 1416},
|
||||
{450, 836, 470, 872, 479, 889, 479, 889, 476, 884, 487, 904,
|
||||
479, 889, 476, 884, 485, 901, 485, 901, 485, 901, 485, 901,
|
||||
489, 909, 524, 972, 522, 969, 522, 970, 544, 1010, 536, 996,
|
||||
547, 1017, 544, 1010, 547, 1017, 557, 1035, 565, 1049, 565,
|
||||
1049, 567, 1053, 574, 1066, 574, 1066, 568, 1056, 753, 1398,
|
||||
774, 1437},
|
||||
{454, 844, 472, 876, 485, 901, 485, 901, 480, 891, 487, 905,
|
||||
485, 901, 479, 889, 487, 904, 485, 901, 485, 901, 487, 905,
|
||||
491, 913, 524, 974, 522, 970, 522, 970, 536, 995, 536, 996,
|
||||
549, 1019, 544, 1010, 547, 1017, 559, 1037, 567, 1053, 566,
|
||||
1052, 578, 1073, 575, 1067, 575, 1067, 574, 1066, 756, 1404,
|
||||
774, 1437},
|
||||
{463, 861, 476, 884, 485, 901, 487, 905, 485, 901, 489, 909,
|
||||
485, 901, 485, 901, 489, 907, 485, 901, 487, 904, 494, 918,
|
||||
494, 918, 528, 980, 526, 976, 526, 978, 539, 1001, 540, 1002,
|
||||
557, 1034, 547, 1017, 551, 1023, 562, 1044, 574, 1066, 574,
|
||||
1066, 574, 1066, 582, 1082, 584, 1084, 595, 1105, 762, 1414,
|
||||
791, 1469},
|
||||
{498, 926, 498, 926, 498, 926, 498, 926, 494, 918, 498, 926,
|
||||
494, 918, 498, 926, 494, 918, 489, 909, 489, 909, 494, 918,
|
||||
498, 926, 534, 992, 534, 992, 530, 984, 543, 1009, 543, 1009,
|
||||
570, 1058, 547, 1017, 552, 1024, 561, 1041, 589, 1095, 570,
|
||||
1058, 574, 1066, 582, 1082, 582, 1082, 596, 1106, 769, 1429,
|
||||
800, 1486},
|
||||
{498, 926, 498, 926, 498, 926, 498, 926, 494, 918, 498, 926,
|
||||
494, 918, 498, 926, 494, 918, 489, 909, 489, 909, 494, 918,
|
||||
498, 926, 534, 992, 534, 992, 530, 984, 543, 1009, 543, 1009,
|
||||
570, 1058, 547, 1017, 552, 1024, 561, 1041, 589, 1095, 570,
|
||||
1058, 574, 1066, 582, 1082, 582, 1082, 596, 1106, 500, 3000,
|
||||
500, 3000},
|
||||
},
|
||||
/*disable cbc*/
|
||||
{
|
||||
{608, 1130, 650, 1208, 655, 1216, 652, 1210, 652, 1212, 658,
|
||||
1222, 652, 1212, 655, 1216, 650, 1208, 655, 1216, 656, 1218,
|
||||
668, 1240, 677, 1257, 673, 1249, 681, 1265, 691, 1283, 685,
|
||||
1273, 713, 1325, 713, 1325, 723, 1343, 725, 1347, 731, 1357,
|
||||
734, 1362, 739, 1372, 734, 1362, 747, 1387, 741, 1375, 776,
|
||||
1440, 741, 1375, 776, 1440},
|
||||
{633, 1175, 670, 1244, 677, 1257, 671, 1247, 673, 1249, 678,
|
||||
1258, 673, 1251, 677, 1257, 668, 1240, 677, 1257, 677, 1257,
|
||||
704, 1307, 704, 1307, 704, 1307, 704, 1307, 712, 1322, 706,
|
||||
1310, 723, 1343, 739, 1372, 743, 1379, 747, 1387, 756, 1404,
|
||||
756, 1404, 774, 1437, 756, 1404, 774, 1437, 774, 1437, 791,
|
||||
1469, 774, 1437, 791, 1469},
|
||||
{633, 1175, 668, 1240, 673, 1249, 669, 1243, 670, 1244, 675,
|
||||
1253, 671, 1247, 673, 1251, 668, 1240, 673, 1249, 673, 1251,
|
||||
685, 1273, 704, 1307, 704, 1307, 710, 1318, 708, 1316, 704,
|
||||
1307, 721, 1339, 731, 1357, 741, 1375, 743, 1379, 747, 1387,
|
||||
750, 1394, 756, 1404, 749, 1391, 762, 1416, 757, 1405, 783,
|
||||
1455, 757, 1405, 783, 1455},
|
||||
{633, 1175, 668, 1240, 673, 1249, 669, 1243, 671, 1247, 678,
|
||||
1258, 673, 1249, 675, 1253, 668, 1240, 673, 1251, 676, 1255,
|
||||
688, 1278, 704, 1307, 704, 1307, 704, 1307, 710, 1318, 704,
|
||||
1307, 722, 1340, 732, 1359, 741, 1375, 743, 1379, 757, 1405,
|
||||
752, 1396, 753, 1398, 748, 1390, 762, 1414, 756, 1404, 783,
|
||||
1453, 756, 1404, 783, 1453},
|
||||
{633, 1175, 668, 1240, 670, 1244, 668, 1240, 670, 1244, 675,
|
||||
1253, 673, 1249, 673, 1251, 668, 1240, 671, 1247, 675, 1253,
|
||||
687, 1275, 704, 1307, 704, 1307, 704, 1307, 708, 1314, 704,
|
||||
1307, 721, 1339, 729, 1355, 739, 1372, 752, 1396, 745, 1383,
|
||||
748, 1390, 752, 1396, 745, 1383, 760, 1411, 756, 1404, 777,
|
||||
1443, 756, 1404, 777, 1443},
|
||||
{633, 1175, 664, 1232, 669, 1243, 668, 1240, 668, 1240, 673,
|
||||
1251, 670, 1244, 671, 1247, 668, 1240, 670, 1244, 673, 1249,
|
||||
685, 1273, 704, 1307, 704, 1307, 704, 1307, 706, 1310, 704,
|
||||
1307, 718, 1333, 727, 1351, 739, 1372, 739, 1372, 743, 1379,
|
||||
747, 1387, 748, 1390, 743, 1379, 756, 1404, 752, 1396, 774,
|
||||
1437, 752, 1396, 774, 1437},
|
||||
{621, 1153, 662, 1229, 668, 1240, 668, 1240, 668, 1240, 673,
|
||||
1251, 670, 1244, 671, 1247, 675, 1253, 670, 1244, 673, 1249,
|
||||
685, 1273, 704, 1307, 704, 1307, 704, 1307, 706, 1310, 704,
|
||||
1307, 718, 1333, 727, 1351, 739, 1372, 739, 1372, 743, 1379,
|
||||
747, 1387, 748, 1390, 743, 1379, 757, 1405, 750, 1394, 774,
|
||||
1437, 750, 1394, 774, 1437},
|
||||
{620, 1151, 668, 1240, 671, 1247, 668, 1240, 670, 1244, 677,
|
||||
1257, 673, 1249, 673, 1251, 668, 1240, 673, 1251, 675, 1253,
|
||||
688, 1278, 704, 1307, 704, 1307, 704, 1307, 708, 1314, 704,
|
||||
1307, 721, 1339, 729, 1355, 747, 1387, 739, 1372, 743, 1379,
|
||||
747, 1387, 750, 1394, 744, 1382, 757, 1405, 752, 1396, 774,
|
||||
1437, 752, 1396, 774, 1437},
|
||||
{621, 1153, 668, 1240, 675, 1253, 670, 1244, 673, 1251, 678,
|
||||
1258, 673, 1251, 677, 1257, 669, 1243, 685, 1273, 678, 1258,
|
||||
704, 1307, 704, 1307, 704, 1307, 704, 1307, 710, 1318, 704,
|
||||
1308, 721, 1339, 731, 1357, 739, 1372, 739, 1373, 743, 1379,
|
||||
749, 1391, 750, 1394, 744, 1382, 757, 1405, 752, 1396, 774,
|
||||
1437, 752, 1396, 774, 1437},
|
||||
{633, 1175, 668, 1240, 676, 1255, 673, 1251, 676, 1255, 681,
|
||||
1265, 677, 1257, 679, 1261, 673, 1249, 677, 1257, 679, 1261,
|
||||
704, 1307, 704, 1307, 704, 1307, 704, 1308, 723, 1343, 706,
|
||||
1312, 723, 1343, 732, 1359, 739, 1373, 741, 1375, 745, 1383,
|
||||
750, 1394, 752, 1396, 744, 1382, 756, 1404, 750, 1394, 774,
|
||||
1437, 750, 1394, 774, 1437},
|
||||
{639, 1187, 671, 1247, 678, 1258, 675, 1253, 677, 1257, 683,
|
||||
1268, 679, 1261, 680, 1264, 673, 1251, 679, 1261, 681, 1265,
|
||||
704, 1307, 704, 1307, 704, 1307, 706, 1310, 713, 1325, 708,
|
||||
1314, 723, 1343, 732, 1359, 741, 1375, 741, 1377, 745, 1383,
|
||||
747, 1387, 749, 1391, 743, 1379, 756, 1404, 760, 1412, 762,
|
||||
1416, 760, 1412, 762, 1416},
|
||||
{647, 1201, 675, 1253, 679, 1261, 677, 1257, 679, 1261, 685,
|
||||
1273, 681, 1265, 683, 1268, 677, 1257, 681, 1265, 704, 1307,
|
||||
704, 1307, 704, 1307, 704, 1307, 708, 1314, 716, 1330, 710,
|
||||
1318, 725, 1347, 739, 1372, 741, 1377, 743, 1379, 747, 1387,
|
||||
774, 1437, 750, 1394, 744, 1382, 756, 1404, 750, 1394, 762,
|
||||
1416, 750, 1394, 762, 1416},
|
||||
{655, 1216, 678, 1258, 683, 1269, 680, 1264, 681, 1265, 688,
|
||||
1278, 683, 1268, 685, 1273, 679, 1261, 685, 1273, 685, 1273,
|
||||
704, 1307, 706, 1310, 704, 1307, 710, 1318, 718, 1333, 722,
|
||||
1340, 727, 1351, 739, 1372, 744, 1382, 744, 1382, 748, 1390,
|
||||
750, 1394, 752, 1396, 746, 1386, 758, 1408, 753, 1398, 774,
|
||||
1437, 753, 1398, 774, 1437},
|
||||
{660, 1226, 681, 1265, 685, 1273, 681, 1265, 683, 1268, 704,
|
||||
1307, 685, 1273, 687, 1275, 680, 1264, 685, 1273, 688, 1278,
|
||||
704, 1307, 706, 1312, 704, 1307, 710, 1318, 718, 1333, 712,
|
||||
1322, 727, 1351, 739, 1372, 744, 1382, 744, 1382, 748, 1390,
|
||||
752, 1396, 752, 1396, 756, 1404, 760, 1411, 756, 1404, 774,
|
||||
1437, 756, 1404, 774, 1437},
|
||||
{668, 1240, 685, 1273, 688, 1278, 704, 1307, 687, 1275, 704,
|
||||
1307, 687, 1275, 704, 1307, 681, 1265, 688, 1278, 704, 1307,
|
||||
706, 1312, 711, 1320, 706, 1312, 714, 1326, 721, 1339, 714,
|
||||
1326, 732, 1359, 741, 1377, 748, 1390, 747, 1387, 753, 1398,
|
||||
757, 1405, 758, 1408, 753, 1398, 774, 1437, 762, 1414, 791,
|
||||
1469, 762, 1414, 791, 1469},
|
||||
{716, 1330, 716, 1330, 716, 1330, 701, 1301, 701, 1301, 712,
|
||||
1322, 699, 1297, 716, 1330, 699, 1297, 699, 1297, 699, 1297,
|
||||
716, 1330, 725, 1347, 721, 1339, 734, 1362, 734, 1362, 725,
|
||||
1347, 734, 1362, 769, 1429, 760, 1412, 760, 1412, 764, 1420,
|
||||
787, 1461, 764, 1420, 764, 1420, 769, 1429, 769, 1429, 800,
|
||||
1486, 769, 1429, 800, 1486},
|
||||
{716, 1330, 716, 1330, 716, 1330, 701, 1301, 701, 1301, 712,
|
||||
1322, 699, 1297, 716, 1330, 699, 1297, 699, 1297, 699, 1297,
|
||||
716, 1330, 725, 1347, 721, 1339, 734, 1362, 734, 1362, 725,
|
||||
1347, 734, 1362, 769, 1429, 760, 1412, 760, 1412, 764, 1420,
|
||||
787, 1461, 764, 1420, 764, 1420, 769, 1429, 769, 1429, 800,
|
||||
1486, 500, 3000, 500, 3000},
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const int16_t baseline_cap_17801_data[2][TX_17801_NUMBER][RX_NUMBER*2] = {
|
||||
/*enable cbc*/
|
||||
{
|
||||
{662, 1544, 509, 1188, 510, 1189, 510, 1191, 510,
|
||||
1189, 511, 1192, 510, 1190, 511, 1192, 512, 1195,
|
||||
512, 1194, 514, 1199, 514, 1199, 515, 1202, 518,
|
||||
1209, 517, 1207, 521, 1215, 523, 1219, 525, 1225,
|
||||
526, 1228, 535, 1249, 528, 1233, 532, 1240, 533,
|
||||
1244, 533, 1244, 535, 1249, 538, 1255, 537, 1252,
|
||||
537, 1253, 539, 1259, 740, 1727},
|
||||
{560, 1307, 592, 1381, 593, 1384, 594, 1387, 594,
|
||||
1385, 595, 1388, 594, 1386, 595, 1387, 596, 1391,
|
||||
595, 1389, 598, 1395, 597, 1394, 599, 1398, 602,
|
||||
1405, 601, 1402, 605, 1411, 614, 1433, 609, 1421,
|
||||
610, 1424, 612, 1427, 612, 1428, 616, 1436, 617,
|
||||
1440, 617, 1441, 620, 1446, 622, 1451, 621, 1449,
|
||||
621, 1449, 623, 1453, 625, 1459},
|
||||
{562, 1311, 593, 1383, 595, 1387, 596, 1390, 595,
|
||||
1388, 596, 1391, 595, 1389, 596, 1391, 598, 1394,
|
||||
597, 1392, 599, 1398, 599, 1397, 600, 1400, 603,
|
||||
1407, 602, 1405, 613, 1430, 607, 1417, 610, 1422,
|
||||
611, 1425, 612, 1429, 613, 1429, 616, 1437, 618,
|
||||
1441, 618, 1441, 620, 1446, 622, 1451, 621, 1449,
|
||||
621, 1449, 622, 1452, 622, 1451},
|
||||
{563, 1313, 592, 1381, 594, 1386, 595, 1389, 594,
|
||||
1387, 596, 1390, 595, 1388, 595, 1389, 597, 1393,
|
||||
596, 1391, 599, 1397, 598, 1396, 600, 1399, 603,
|
||||
1406, 601, 1403, 604, 1410, 606, 1414, 609, 1421,
|
||||
610, 1424, 611, 1427, 612, 1427, 615, 1435, 617,
|
||||
1439, 624, 1457, 618, 1443, 620, 1448, 619, 1445,
|
||||
619, 1445, 621, 1448, 619, 1444},
|
||||
{563, 1314, 591, 1379, 593, 1384, 594, 1387, 594,
|
||||
1386, 595, 1389, 594, 1386, 595, 1388, 596, 1392,
|
||||
596, 1390, 598, 1395, 597, 1394, 599, 1398, 602,
|
||||
1404, 601, 1401, 604, 1408, 605, 1413, 608, 1418,
|
||||
617, 1440, 611, 1425, 611, 1425, 614, 1432, 615,
|
||||
1436, 615, 1436, 617, 1440, 619, 1445, 618, 1442,
|
||||
618, 1441, 619, 1444, 616, 1437},
|
||||
{564, 1316, 591, 1378, 593, 1383, 594, 1386, 594,
|
||||
1385, 595, 1388, 594, 1386, 594, 1387, 596, 1391,
|
||||
595, 1389, 597, 1394, 597, 1393, 599, 1397, 601,
|
||||
1403, 600, 1401, 603, 1408, 605, 1412, 608, 1418,
|
||||
609, 1420, 610, 1423, 610, 1423, 613, 1431, 615,
|
||||
1434, 615, 1434, 624, 1456, 618, 1443, 617, 1440,
|
||||
617, 1439, 618, 1442, 613, 1431},
|
||||
{565, 1319, 591, 1379, 593, 1384, 594, 1387, 594,
|
||||
1385, 595, 1388, 594, 1386, 594, 1387, 596, 1390,
|
||||
595, 1388, 597, 1394, 597, 1393, 598, 1396, 601,
|
||||
1403, 600, 1400, 603, 1408, 605, 1412, 607, 1417,
|
||||
608, 1420, 610, 1422, 617, 1441, 613, 1430, 614,
|
||||
1433, 614, 1433, 616, 1437, 618, 1442, 617, 1439,
|
||||
616, 1438, 617, 1440, 611, 1426},
|
||||
{568, 1324, 591, 1380, 593, 1385, 595, 1388, 594,
|
||||
1386, 595, 1389, 594, 1386, 595, 1388, 596, 1391,
|
||||
595, 1389, 598, 1394, 597, 1393, 599, 1397, 601,
|
||||
1403, 600, 1401, 603, 1408, 605, 1412, 615, 1436,
|
||||
609, 1420, 610, 1422, 610, 1422, 613, 1429, 614,
|
||||
1432, 614, 1432, 616, 1436, 618, 1441, 616, 1438,
|
||||
616, 1437, 617, 1439, 610, 1423},
|
||||
{570, 1330, 592, 1382, 594, 1386, 595, 1389, 595,
|
||||
1388, 596, 1390, 595, 1388, 595, 1389, 597, 1393,
|
||||
596, 1391, 598, 1396, 598, 1395, 599, 1399, 602,
|
||||
1405, 609, 1420, 604, 1409, 605, 1413, 608, 1418,
|
||||
609, 1420, 610, 1423, 610, 1423, 613, 1429, 614,
|
||||
1432, 614, 1432, 615, 1436, 617, 1440, 616, 1437,
|
||||
616, 1437, 617, 1439, 610, 1424},
|
||||
{572, 1335, 593, 1383, 595, 1388, 596, 1391, 595,
|
||||
1389, 596, 1392, 596, 1390, 596, 1391, 598, 1395,
|
||||
597, 1393, 599, 1398, 599, 1397, 600, 1400, 603,
|
||||
1406, 601, 1403, 604, 1410, 606, 1414, 608, 1419,
|
||||
609, 1421, 610, 1424, 610, 1424, 613, 1430, 614,
|
||||
1433, 614, 1432, 616, 1436, 617, 1440, 616, 1437,
|
||||
616, 1437, 624, 1457, 607, 1417},
|
||||
{576, 1345, 595, 1387, 596, 1392, 598, 1395, 597,
|
||||
1393, 598, 1396, 598, 1394, 598, 1396, 600, 1399,
|
||||
599, 1397, 601, 1402, 601, 1401, 602, 1404, 612,
|
||||
1428, 603, 1407, 606, 1413, 607, 1417, 609, 1422,
|
||||
610, 1424, 611, 1427, 611, 1426, 614, 1433, 615,
|
||||
1435, 615, 1434, 616, 1438, 618, 1442, 616, 1438,
|
||||
616, 1438, 617, 1440, 606, 1413},
|
||||
{578, 1349, 594, 1387, 596, 1391, 597, 1394, 597,
|
||||
1392, 598, 1395, 597, 1393, 598, 1395, 599, 1398,
|
||||
598, 1396, 601, 1402, 600, 1401, 602, 1404, 604,
|
||||
1409, 603, 1406, 605, 1413, 607, 1416, 609, 1421,
|
||||
610, 1423, 611, 1426, 611, 1425, 614, 1432, 615,
|
||||
1434, 614, 1434, 616, 1437, 625, 1459, 616, 1438,
|
||||
616, 1438, 617, 1440, 605, 1411},
|
||||
{582, 1357, 594, 1387, 596, 1391, 597, 1393, 596,
|
||||
1392, 598, 1395, 597, 1393, 598, 1394, 599, 1398,
|
||||
598, 1396, 601, 1401, 600, 1400, 601, 1403, 604,
|
||||
1409, 603, 1406, 606, 1413, 607, 1416, 609, 1421,
|
||||
610, 1423, 611, 1425, 611, 1425, 622, 1450, 615,
|
||||
1434, 615, 1434, 616, 1438, 618, 1443, 617, 1440,
|
||||
617, 1440, 619, 1445, 612, 1429},
|
||||
{587, 1370, 594, 1385, 595, 1388, 596, 1390, 595,
|
||||
1388, 596, 1391, 596, 1390, 596, 1392, 598, 1396,
|
||||
598, 1394, 600, 1400, 600, 1400, 602, 1405, 604,
|
||||
1410, 603, 1407, 606, 1415, 608, 1418, 610, 1424,
|
||||
611, 1427, 612, 1429, 613, 1429, 616, 1437, 625,
|
||||
1458, 617, 1441, 620, 1446, 622, 1452, 622, 1451,
|
||||
623, 1453, 626, 1461, 615, 1435},
|
||||
{738, 1721, 599, 1398, 595, 1388, 592, 1381, 597,
|
||||
1392, 588, 1373, 586, 1367, 585, 1365, 586, 1366,
|
||||
584, 1362, 585, 1365, 584, 1363, 585, 1364, 587,
|
||||
1369, 585, 1365, 587, 1370, 588, 1373, 590, 1376,
|
||||
591, 1378, 591, 1380, 591, 1378, 593, 1385, 594,
|
||||
1387, 598, 1396, 596, 1391, 598, 1396, 598, 1395,
|
||||
599, 1399, 613, 1431, 762, 1777},
|
||||
},
|
||||
/*disable cbc*/
|
||||
{
|
||||
{821, 1915, 491, 1145, 491, 1146, 492, 1148, 492,
|
||||
1148, 492, 1149, 492, 1147, 492, 1149, 494, 1152,
|
||||
494, 1153, 496, 1158, 496, 1157, 498, 1161, 501,
|
||||
1168, 500, 1166, 503, 1174, 505, 1179, 508, 1185,
|
||||
509, 1188, 518, 1209, 511, 1192, 514, 1200, 516,
|
||||
1204, 516, 1204, 518, 1209, 521, 1216, 519, 1211,
|
||||
519, 1212, 523, 1220, 901, 2103},
|
||||
{598, 1395, 630, 1470, 631, 1473, 633, 1476, 632,
|
||||
1475, 633, 1477, 632, 1475, 633, 1476, 634, 1480,
|
||||
634, 1480, 637, 1486, 636, 1485, 638, 1488, 641,
|
||||
1496, 640, 1494, 644, 1502, 653, 1525, 648, 1512,
|
||||
650, 1516, 651, 1519, 651, 1520, 655, 1528, 657,
|
||||
1532, 657, 1533, 659, 1538, 662, 1544, 660, 1539,
|
||||
660, 1539, 662, 1546, 665, 1551},
|
||||
{598, 1394, 629, 1467, 631, 1472, 632, 1475, 632,
|
||||
1474, 632, 1476, 632, 1474, 632, 1475, 634, 1479,
|
||||
634, 1479, 636, 1485, 636, 1483, 637, 1487, 640,
|
||||
1494, 639, 1491, 650, 1518, 644, 1504, 647, 1510,
|
||||
648, 1513, 650, 1516, 650, 1517, 654, 1525, 655,
|
||||
1529, 655, 1529, 657, 1534, 660, 1539, 658, 1535,
|
||||
658, 1535, 660, 1540, 660, 1540},
|
||||
{598, 1395, 627, 1463, 629, 1469, 631, 1472, 631,
|
||||
1472, 631, 1473, 631, 1471, 631, 1473, 633, 1476,
|
||||
633, 1476, 635, 1482, 634, 1480, 636, 1484, 639,
|
||||
1491, 638, 1488, 641, 1496, 643, 1500, 646, 1506,
|
||||
647, 1510, 648, 1513, 649, 1513, 652, 1521, 654,
|
||||
1525, 661, 1543, 655, 1529, 658, 1534, 655, 1529,
|
||||
655, 1529, 658, 1535, 656, 1531},
|
||||
{598, 1395, 626, 1461, 629, 1467, 630, 1470, 630,
|
||||
1470, 631, 1471, 630, 1469, 630, 1471, 632, 1474,
|
||||
632, 1475, 634, 1480, 634, 1479, 635, 1482, 638,
|
||||
1489, 637, 1486, 640, 1494, 642, 1498, 645, 1504,
|
||||
654, 1526, 647, 1510, 648, 1511, 651, 1519, 652,
|
||||
1522, 652, 1522, 654, 1526, 656, 1531, 654, 1526,
|
||||
654, 1526, 656, 1531, 653, 1523},
|
||||
{599, 1398, 626, 1461, 628, 1466, 630, 1470, 630,
|
||||
1469, 630, 1471, 629, 1469, 630, 1470, 631, 1473,
|
||||
631, 1473, 634, 1479, 633, 1478, 635, 1481, 638,
|
||||
1488, 637, 1485, 640, 1493, 642, 1497, 644, 1503,
|
||||
645, 1506, 647, 1509, 647, 1509, 650, 1517, 652,
|
||||
1520, 652, 1520, 661, 1543, 655, 1529, 653, 1524,
|
||||
653, 1524, 655, 1529, 650, 1518},
|
||||
{601, 1401, 626, 1461, 629, 1467, 630, 1470, 630,
|
||||
1469, 630, 1470, 629, 1469, 630, 1470, 631, 1473,
|
||||
631, 1473, 634, 1479, 633, 1477, 635, 1481, 638,
|
||||
1488, 637, 1485, 640, 1493, 642, 1497, 644, 1503,
|
||||
645, 1505, 646, 1508, 654, 1526, 650, 1516, 651,
|
||||
1519, 651, 1519, 653, 1523, 655, 1528, 653, 1523,
|
||||
652, 1522, 654, 1527, 648, 1513},
|
||||
{603, 1406, 627, 1463, 629, 1468, 631, 1471, 630,
|
||||
1471, 631, 1472, 630, 1470, 630, 1471, 632, 1474,
|
||||
632, 1474, 634, 1479, 634, 1478, 635, 1482, 638,
|
||||
1489, 637, 1486, 640, 1494, 642, 1497, 652, 1522,
|
||||
645, 1506, 646, 1508, 647, 1509, 650, 1516, 651,
|
||||
1519, 651, 1519, 653, 1523, 655, 1528, 653, 1523,
|
||||
652, 1522, 654, 1526, 647, 1510},
|
||||
{605, 1411, 627, 1464, 630, 1469, 631, 1473, 631,
|
||||
1472, 631, 1473, 630, 1471, 631, 1473, 632, 1476,
|
||||
632, 1476, 635, 1481, 634, 1480, 636, 1483, 638,
|
||||
1490, 645, 1505, 640, 1494, 642, 1498, 644, 1504,
|
||||
646, 1506, 647, 1509, 647, 1509, 650, 1516, 651,
|
||||
1519, 651, 1518, 652, 1522, 654, 1527, 652, 1522,
|
||||
652, 1521, 654, 1526, 648, 1511},
|
||||
{607, 1417, 628, 1466, 630, 1471, 632, 1474, 632,
|
||||
1474, 632, 1475, 631, 1473, 632, 1475, 633, 1478,
|
||||
633, 1478, 636, 1483, 635, 1482, 636, 1485, 639,
|
||||
1492, 638, 1489, 641, 1495, 643, 1499, 645, 1505,
|
||||
646, 1507, 647, 1510, 647, 1510, 650, 1517, 651,
|
||||
1519, 651, 1519, 653, 1523, 654, 1527, 652, 1522,
|
||||
652, 1521, 662, 1544, 644, 1504},
|
||||
{612, 1427, 630, 1470, 632, 1475, 634, 1479, 633,
|
||||
1478, 634, 1479, 633, 1478, 634, 1479, 635, 1483,
|
||||
635, 1482, 637, 1487, 637, 1486, 638, 1489, 649,
|
||||
1514, 640, 1492, 642, 1499, 644, 1503, 646, 1508,
|
||||
647, 1510, 648, 1513, 648, 1513, 651, 1519, 652,
|
||||
1522, 652, 1521, 653, 1524, 655, 1528, 653, 1523,
|
||||
653, 1523, 655, 1528, 643, 1500},
|
||||
{614, 1432, 630, 1470, 632, 1475, 634, 1478, 633,
|
||||
1478, 634, 1479, 633, 1477, 634, 1479, 635, 1482,
|
||||
635, 1482, 638, 1488, 637, 1486, 638, 1489, 641,
|
||||
1495, 639, 1492, 642, 1499, 644, 1502, 646, 1508,
|
||||
647, 1510, 648, 1512, 648, 1512, 651, 1519, 652,
|
||||
1521, 652, 1521, 653, 1524, 663, 1547, 653, 1523,
|
||||
653, 1523, 655, 1528, 642, 1499},
|
||||
{617, 1440, 630, 1470, 632, 1474, 633, 1477, 633,
|
||||
1477, 634, 1478, 633, 1477, 634, 1478, 635, 1482,
|
||||
635, 1482, 637, 1487, 637, 1486, 638, 1489, 641,
|
||||
1495, 640, 1492, 643, 1499, 644, 1503, 646, 1508,
|
||||
647, 1510, 648, 1512, 648, 1512, 659, 1537, 652,
|
||||
1522, 652, 1521, 653, 1525, 656, 1530, 654, 1525,
|
||||
654, 1525, 657, 1533, 650, 1517},
|
||||
{622, 1452, 629, 1469, 630, 1471, 632, 1474, 631,
|
||||
1473, 632, 1475, 631, 1473, 632, 1475, 634, 1479,
|
||||
634, 1480, 637, 1486, 636, 1485, 639, 1491, 641,
|
||||
1496, 640, 1493, 643, 1501, 645, 1505, 647, 1510,
|
||||
648, 1513, 650, 1516, 650, 1516, 653, 1523, 662,
|
||||
1546, 655, 1528, 657, 1533, 660, 1539, 658, 1536,
|
||||
659, 1538, 664, 1549, 653, 1523},
|
||||
{892, 2082, 636, 1484, 632, 1474, 629, 1468, 634,
|
||||
1480, 625, 1459, 623, 1453, 622, 1452, 623, 1453,
|
||||
622, 1451, 623, 1453, 622, 1451, 622, 1452, 624,
|
||||
1457, 623, 1453, 625, 1459, 626, 1461, 628, 1465,
|
||||
629, 1467, 629, 1468, 629, 1467, 631, 1473, 633,
|
||||
1476, 636, 1485, 634, 1479, 637, 1485, 635, 1483,
|
||||
637, 1486, 652, 1520, 918, 2143},
|
||||
}
|
||||
};
|
||||
|
||||
const int16_t baseline_cap_data_old[2][TX_NUMBER][RX_NUMBER*2] = {
|
||||
/*enable cbc*/
|
||||
{
|
||||
{557, 1035, 604, 1122, 605, 1123, 604, 1122, 608, 1130, 601,
|
||||
1117, 608, 1130, 615, 1141, 613, 1139, 614, 1140, 610, 1132,
|
||||
609, 1131, 620, 1151, 625, 1161, 638, 1184, 641, 1191, 648,
|
||||
1203, 669, 1243, 661, 1227, 671, 1245, 676, 1256, 685, 1273,
|
||||
690, 1282, 694, 1288, 689, 1279, 696, 1292, 696, 1292, 724,
|
||||
1344, 682, 1266, 724, 1344},
|
||||
{574, 1066, 622, 1154, 622, 1156, 620, 1151, 624, 1158, 618,
|
||||
1148, 625, 1161, 631, 1173, 630, 1170, 630, 1170, 627, 1164,
|
||||
624, 1160, 636, 1180, 641, 1191, 653, 1213, 656, 1218, 662,
|
||||
1230, 676, 1255, 676, 1255, 687, 1275, 694, 1288, 703, 1305,
|
||||
707, 1313, 721, 1339, 706, 1310, 711, 1321, 711, 1321, 734,
|
||||
1364, 671, 1245, 694, 1288},
|
||||
{573, 1065, 619, 1149, 618, 1148, 617, 1147, 620, 1152, 614,
|
||||
1140, 622, 1154, 628, 1166, 629, 1167, 628, 1166, 623, 1157,
|
||||
622, 1154, 633, 1175, 638, 1186, 661, 1227, 653, 1213, 660,
|
||||
1226, 673, 1249, 673, 1249, 684, 1270, 690, 1282, 701, 1301,
|
||||
704, 1307, 707, 1313, 701, 1303, 707, 1313, 707, 1313, 729,
|
||||
1355, 666, 1238, 687, 1277},
|
||||
{573, 1063, 616, 1144, 616, 1144, 614, 1140, 618, 1148, 611,
|
||||
1135, 619, 1149, 624, 1160, 625, 1161, 625, 1161, 622, 1154,
|
||||
620, 1152, 630, 1170, 637, 1183, 650, 1206, 652, 1210, 659,
|
||||
1223, 670, 1244, 671, 1247, 683, 1268, 688, 1278, 706, 1312,
|
||||
701, 1301, 704, 1308, 699, 1297, 704, 1308, 703, 1305, 724,
|
||||
1344, 659, 1223, 673, 1249},
|
||||
{573, 1063, 615, 1141, 615, 1141, 613, 1138, 616, 1144, 610,
|
||||
1132, 618, 1148, 624, 1158, 624, 1158, 624, 1160, 622, 1154,
|
||||
620, 1151, 630, 1170, 636, 1182, 648, 1204, 651, 1209, 659,
|
||||
1223, 670, 1244, 671, 1245, 680, 1264, 696, 1292, 694, 1290,
|
||||
699, 1297, 701, 1303, 696, 1292, 701, 1301, 699, 1297, 718,
|
||||
1333, 649, 1205, 663, 1231},
|
||||
{574, 1066, 615, 1143, 615, 1143, 613, 1139, 616, 1144, 610,
|
||||
1134, 617, 1147, 624, 1158, 625, 1161, 625, 1161, 622, 1156,
|
||||
622, 1154, 631, 1173, 646, 1200, 650, 1206, 651, 1209, 659,
|
||||
1223, 671, 1247, 671, 1245, 681, 1265, 687, 1275, 694, 1288,
|
||||
697, 1295, 699, 1297, 694, 1288, 699, 1297, 697, 1295, 713,
|
||||
1325, 645, 1199, 658, 1222},
|
||||
{578, 1073, 617, 1147, 616, 1144, 615, 1141, 618, 1148, 611,
|
||||
1135, 619, 1149, 625, 1161, 636, 1180, 628, 1166, 624, 1158,
|
||||
624, 1158, 634, 1177, 638, 1186, 651, 1209, 652, 1212, 660,
|
||||
1226, 673, 1249, 673, 1249, 681, 1265, 687, 1275, 694, 1288,
|
||||
697, 1295, 699, 1299, 694, 1290, 699, 1297, 697, 1294, 713,
|
||||
1323, 643, 1193, 654, 1214},
|
||||
{582, 1080, 619, 1149, 619, 1149, 616, 1144, 619, 1149, 613,
|
||||
1139, 620, 1152, 627, 1165, 628, 1166, 629, 1167, 625, 1161,
|
||||
624, 1160, 636, 1180, 641, 1191, 652, 1212, 655, 1216, 661,
|
||||
1227, 673, 1251, 673, 1251, 692, 1284, 687, 1275, 693, 1287,
|
||||
697, 1294, 699, 1299, 694, 1288, 699, 1297, 698, 1296, 713,
|
||||
1325, 645, 1197, 655, 1216},
|
||||
{583, 1083, 619, 1149, 618, 1148, 615, 1143, 620, 1151, 613,
|
||||
1138, 620, 1152, 627, 1164, 627, 1165, 638, 1184, 624, 1160,
|
||||
624, 1158, 634, 1178, 638, 1186, 652, 1210, 653, 1213, 660,
|
||||
1226, 671, 1245, 671, 1245, 679, 1261, 683, 1269, 690, 1282,
|
||||
694, 1288, 696, 1292, 690, 1281, 694, 1290, 693, 1287, 707,
|
||||
1313, 649, 1205, 655, 1217},
|
||||
{589, 1095, 623, 1157, 622, 1156, 619, 1149, 623, 1157, 616,
|
||||
1144, 624, 1158, 630, 1170, 631, 1173, 631, 1173, 629, 1167,
|
||||
627, 1165, 638, 1186, 643, 1193, 655, 1216, 666, 1236, 662,
|
||||
1230, 673, 1251, 673, 1249, 680, 1264, 684, 1270, 692, 1284,
|
||||
697, 1294, 697, 1295, 692, 1286, 697, 1295, 696, 1292, 707,
|
||||
1313, 650, 1206, 655, 1216},
|
||||
{594, 1104, 628, 1166, 624, 1160, 622, 1156, 627, 1164, 618,
|
||||
1148, 627, 1164, 632, 1174, 634, 1177, 634, 1178, 630, 1170,
|
||||
629, 1169, 641, 1190, 644, 1196, 656, 1218, 659, 1223, 664,
|
||||
1234, 675, 1253, 673, 1251, 681, 1265, 685, 1271, 693, 1287,
|
||||
694, 1290, 697, 1295, 693, 1287, 699, 1299, 708, 1316, 710,
|
||||
1318, 649, 1205, 652, 1210},
|
||||
{597, 1109, 629, 1169, 628, 1166, 624, 1160, 628, 1166, 620,
|
||||
1152, 627, 1165, 633, 1175, 634, 1178, 634, 1178, 641, 1191,
|
||||
631, 1173, 641, 1191, 646, 1200, 659, 1223, 661, 1227, 666,
|
||||
1236, 676, 1255, 676, 1256, 681, 1265, 685, 1273, 692, 1286,
|
||||
713, 1325, 699, 1297, 694, 1288, 701, 1301, 701, 1301, 708,
|
||||
1316, 646, 1200, 649, 1205},
|
||||
{601, 1115, 630, 1170, 629, 1167, 625, 1161, 628, 1166, 620,
|
||||
1151, 628, 1166, 633, 1175, 634, 1178, 636, 1180, 631, 1173,
|
||||
630, 1170, 641, 1191, 646, 1200, 659, 1225, 660, 1226, 674,
|
||||
1252, 676, 1255, 673, 1251, 680, 1264, 685, 1271, 692, 1286,
|
||||
694, 1290, 698, 1296, 693, 1287, 699, 1299, 702, 1304, 713,
|
||||
1323, 645, 1199, 647, 1201},
|
||||
{606, 1125, 632, 1174, 629, 1169, 627, 1164, 629, 1169, 622,
|
||||
1154, 629, 1167, 634, 1178, 634, 1178, 637, 1183, 633, 1175,
|
||||
630, 1170, 642, 1192, 647, 1201, 659, 1223, 660, 1226, 666,
|
||||
1236, 676, 1255, 673, 1251, 681, 1265, 685, 1271, 693, 1287,
|
||||
697, 1294, 701, 1301, 704, 1308, 702, 1304, 706, 1310, 718,
|
||||
1334, 638, 1184, 641, 1190},
|
||||
{613, 1138, 634, 1177, 631, 1173, 630, 1170, 632, 1174, 624,
|
||||
1158, 633, 1175, 637, 1183, 638, 1186, 641, 1190, 636, 1180,
|
||||
637, 1183, 645, 1199, 651, 1209, 662, 1229, 664, 1232, 670,
|
||||
1244, 680, 1262, 680, 1262, 688, 1278, 692, 1284, 699, 1297,
|
||||
704, 1307, 707, 1313, 704, 1307, 712, 1322, 715, 1329, 743,
|
||||
1379, 643, 1193, 644, 1196},
|
||||
{629, 1169, 639, 1187, 634, 1178, 629, 1169, 629, 1169, 620,
|
||||
1152, 627, 1165, 641, 1191, 630, 1170, 633, 1175, 627, 1165,
|
||||
624, 1160, 634, 1178, 639, 1187, 656, 1218, 652, 1210, 657,
|
||||
1221, 667, 1239, 678, 1258, 673, 1251, 678, 1258, 685, 1271,
|
||||
706, 1310, 692, 1284, 689, 1279, 697, 1294, 701, 1301, 727,
|
||||
1349, 643, 1193, 644, 1196},
|
||||
{757, 1407, 748, 1388, 705, 1309, 698, 1296, 686, 1274, 678,
|
||||
1260, 685, 1271, 683, 1269, 661, 1227, 671, 1245, 655, 1217,
|
||||
669, 1242, 659, 1223, 665, 1235, 665, 1235, 661, 1227, 649,
|
||||
1205, 646, 1200, 641, 1191, 649, 1205, 664, 1232, 629, 1167,
|
||||
645, 1199, 629, 1167, 645, 1199, 622, 1154, 629, 1167, 629,
|
||||
1167, 500, 3000, 500, 3000},
|
||||
},
|
||||
/*disable cbc*/
|
||||
{
|
||||
{557, 1035, 604, 1122, 605, 1123, 604, 1122, 608, 1130, 601,
|
||||
1117, 608, 1130, 615, 1141, 613, 1139, 614, 1140, 610, 1132,
|
||||
609, 1131, 620, 1151, 625, 1161, 638, 1184, 641, 1191, 648,
|
||||
1203, 669, 1243, 661, 1227, 671, 1245, 676, 1256, 685, 1273,
|
||||
690, 1282, 694, 1288, 689, 1279, 696, 1292, 696, 1292, 724,
|
||||
1344, 682, 1266, 724, 1344},
|
||||
{574, 1066, 622, 1154, 622, 1156, 620, 1151, 624, 1158, 618,
|
||||
1148, 625, 1161, 631, 1173, 630, 1170, 630, 1170, 627, 1164,
|
||||
624, 1160, 636, 1180, 641, 1191, 653, 1213, 656, 1218, 662,
|
||||
1230, 676, 1255, 676, 1255, 687, 1275, 694, 1288, 703, 1305,
|
||||
707, 1313, 721, 1339, 706, 1310, 711, 1321, 711, 1321, 734,
|
||||
1364, 671, 1245, 694, 1288},
|
||||
{573, 1065, 619, 1149, 618, 1148, 617, 1147, 620, 1152, 614,
|
||||
1140, 622, 1154, 628, 1166, 629, 1167, 628, 1166, 623, 1157,
|
||||
622, 1154, 633, 1175, 638, 1186, 661, 1227, 653, 1213, 660,
|
||||
1226, 673, 1249, 673, 1249, 684, 1270, 690, 1282, 701, 1301,
|
||||
704, 1307, 707, 1313, 701, 1303, 707, 1313, 707, 1313, 729,
|
||||
1355, 666, 1238, 687, 1277},
|
||||
{573, 1063, 616, 1144, 616, 1144, 614, 1140, 618, 1148, 611,
|
||||
1135, 619, 1149, 624, 1160, 625, 1161, 625, 1161, 622, 1154,
|
||||
620, 1152, 630, 1170, 637, 1183, 650, 1206, 652, 1210, 659,
|
||||
1223, 670, 1244, 671, 1247, 683, 1268, 688, 1278, 706, 1312,
|
||||
701, 1301, 704, 1308, 699, 1297, 704, 1308, 703, 1305, 724,
|
||||
1344, 659, 1223, 673, 1249},
|
||||
{573, 1063, 615, 1141, 615, 1141, 613, 1138, 616, 1144, 610,
|
||||
1132, 618, 1148, 624, 1158, 624, 1158, 624, 1160, 622, 1154,
|
||||
620, 1151, 630, 1170, 636, 1182, 648, 1204, 651, 1209, 659,
|
||||
1223, 670, 1244, 671, 1245, 680, 1264, 696, 1292, 694, 1290,
|
||||
699, 1297, 701, 1303, 696, 1292, 701, 1301, 699, 1297, 718,
|
||||
1333, 649, 1205, 663, 1231},
|
||||
{574, 1066, 615, 1143, 615, 1143, 613, 1139, 616, 1144, 610,
|
||||
1134, 617, 1147, 624, 1158, 625, 1161, 625, 1161, 622, 1156,
|
||||
622, 1154, 631, 1173, 646, 1200, 650, 1206, 651, 1209, 659,
|
||||
1223, 671, 1247, 671, 1245, 681, 1265, 687, 1275, 694, 1288,
|
||||
697, 1295, 699, 1297, 694, 1288, 699, 1297, 697, 1295, 713,
|
||||
1325, 645, 1199, 658, 1222},
|
||||
{578, 1073, 617, 1147, 616, 1144, 615, 1141, 618, 1148, 611,
|
||||
1135, 619, 1149, 625, 1161, 636, 1180, 628, 1166, 624, 1158,
|
||||
624, 1158, 634, 1177, 638, 1186, 651, 1209, 652, 1212, 660,
|
||||
1226, 673, 1249, 673, 1249, 681, 1265, 687, 1275, 694, 1288,
|
||||
697, 1295, 699, 1299, 694, 1290, 699, 1297, 697, 1294, 713,
|
||||
1323, 643, 1193, 654, 1214},
|
||||
{582, 1080, 619, 1149, 619, 1149, 616, 1144, 619, 1149, 613,
|
||||
1139, 620, 1152, 627, 1165, 628, 1166, 629, 1167, 625, 1161,
|
||||
624, 1160, 636, 1180, 641, 1191, 652, 1212, 655, 1216, 661,
|
||||
1227, 673, 1251, 673, 1251, 692, 1284, 687, 1275, 693, 1287,
|
||||
697, 1294, 699, 1299, 694, 1288, 699, 1297, 698, 1296, 713,
|
||||
1325, 645, 1197, 655, 1216},
|
||||
{583, 1083, 619, 1149, 618, 1148, 615, 1143, 620, 1151, 613,
|
||||
1138, 620, 1152, 627, 1164, 627, 1165, 638, 1184, 624, 1160,
|
||||
624, 1158, 634, 1178, 638, 1186, 652, 1210, 653, 1213, 660,
|
||||
1226, 671, 1245, 671, 1245, 679, 1261, 683, 1269, 690, 1282,
|
||||
694, 1288, 696, 1292, 690, 1281, 694, 1290, 693, 1287, 707,
|
||||
1313, 649, 1205, 655, 1217},
|
||||
{589, 1095, 623, 1157, 622, 1156, 619, 1149, 623, 1157, 616,
|
||||
1144, 624, 1158, 630, 1170, 631, 1173, 631, 1173, 629, 1167,
|
||||
627, 1165, 638, 1186, 643, 1193, 655, 1216, 666, 1236, 662,
|
||||
1230, 673, 1251, 673, 1249, 680, 1264, 684, 1270, 692, 1284,
|
||||
697, 1294, 697, 1295, 692, 1286, 697, 1295, 696, 1292, 707,
|
||||
1313, 650, 1206, 655, 1216},
|
||||
{594, 1104, 628, 1166, 624, 1160, 622, 1156, 627, 1164, 618,
|
||||
1148, 627, 1164, 632, 1174, 634, 1177, 634, 1178, 630, 1170,
|
||||
629, 1169, 641, 1190, 644, 1196, 656, 1218, 659, 1223, 664,
|
||||
1234, 675, 1253, 673, 1251, 681, 1265, 685, 1271, 693, 1287,
|
||||
694, 1290, 697, 1295, 693, 1287, 699, 1299, 708, 1316, 710,
|
||||
1318, 649, 1205, 652, 1210},
|
||||
{597, 1109, 629, 1169, 628, 1166, 624, 1160, 628, 1166, 620,
|
||||
1152, 627, 1165, 633, 1175, 634, 1178, 634, 1178, 641, 1191,
|
||||
631, 1173, 641, 1191, 646, 1200, 659, 1223, 661, 1227, 666,
|
||||
1236, 676, 1255, 676, 1256, 681, 1265, 685, 1273, 692, 1286,
|
||||
713, 1325, 699, 1297, 694, 1288, 701, 1301, 701, 1301, 708,
|
||||
1316, 646, 1200, 649, 1205},
|
||||
{601, 1115, 630, 1170, 629, 1167, 625, 1161, 628, 1166, 620,
|
||||
1151, 628, 1166, 633, 1175, 634, 1178, 636, 1180, 631, 1173,
|
||||
630, 1170, 641, 1191, 646, 1200, 659, 1225, 660, 1226, 674,
|
||||
1252, 676, 1255, 673, 1251, 680, 1264, 685, 1271, 692, 1286,
|
||||
694, 1290, 698, 1296, 693, 1287, 699, 1299, 702, 1304, 713,
|
||||
1323, 645, 1199, 647, 1201},
|
||||
{606, 1125, 632, 1174, 629, 1169, 627, 1164, 629, 1169, 622,
|
||||
1154, 629, 1167, 634, 1178, 634, 1178, 637, 1183, 633, 1175,
|
||||
630, 1170, 642, 1192, 647, 1201, 659, 1223, 660, 1226, 666,
|
||||
1236, 676, 1255, 673, 1251, 681, 1265, 685, 1271, 693, 1287,
|
||||
697, 1294, 701, 1301, 704, 1308, 702, 1304, 706, 1310, 718,
|
||||
1334, 638, 1184, 641, 1190},
|
||||
{613, 1138, 634, 1177, 631, 1173, 630, 1170, 632, 1174, 624,
|
||||
1158, 633, 1175, 637, 1183, 638, 1186, 641, 1190, 636, 1180,
|
||||
637, 1183, 645, 1199, 651, 1209, 662, 1229, 664, 1232, 670,
|
||||
1244, 680, 1262, 680, 1262, 688, 1278, 692, 1284, 699, 1297,
|
||||
704, 1307, 707, 1313, 704, 1307, 712, 1322, 715, 1329, 743,
|
||||
1379, 643, 1193, 644, 1196},
|
||||
{629, 1169, 639, 1187, 634, 1178, 629, 1169, 629, 1169, 620,
|
||||
1152, 627, 1165, 641, 1191, 630, 1170, 633, 1175, 627, 1165,
|
||||
624, 1160, 634, 1178, 639, 1187, 656, 1218, 652, 1210, 657,
|
||||
1221, 667, 1239, 678, 1258, 673, 1251, 678, 1258, 685, 1271,
|
||||
706, 1310, 692, 1284, 689, 1279, 697, 1294, 701, 1301, 727,
|
||||
1349, 643, 1193, 644, 1196},
|
||||
{757, 1407, 748, 1388, 705, 1309, 698, 1296, 686, 1274, 678,
|
||||
1260, 685, 1271, 683, 1269, 661, 1227, 671, 1245, 655, 1217,
|
||||
669, 1242, 659, 1223, 665, 1235, 665, 1235, 661, 1227, 649,
|
||||
1205, 646, 1200, 641, 1191, 649, 1205, 664, 1232, 629, 1167,
|
||||
645, 1199, 629, 1167, 645, 1199, 622, 1154, 629, 1167, 629,
|
||||
1167, 500, 3000, 500, 3000},
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
5287
drivers/input/touchscreen/synaptics_driver_s3320.c
Executable file
5287
drivers/input/touchscreen/synaptics_driver_s3320.c
Executable file
File diff suppressed because it is too large
Load diff
15
drivers/input/touchscreen/synaptics_redremote.h
Executable file
15
drivers/input/touchscreen/synaptics_redremote.h
Executable file
|
@ -0,0 +1,15 @@
|
|||
#ifndef _SYNAPTICS_REDREMOTE_H_
|
||||
#define _SYNAPTICS_REDREMOTE_H_
|
||||
struct remotepanel_data {
|
||||
struct i2c_client *client;
|
||||
struct input_dev *input_dev;
|
||||
struct input_dev *kpd;
|
||||
struct mutex *pmutex;
|
||||
int irq_gpio;
|
||||
unsigned int irq;
|
||||
int *enable_remote;
|
||||
};
|
||||
struct remotepanel_data *remote_alloc_panel_data(void);
|
||||
int register_remote_device(struct remotepanel_data *pdata);
|
||||
void unregister_remote_device(void);
|
||||
#endif
|
938
drivers/input/touchscreen/synaptics_s3320_redremote.c
Executable file
938
drivers/input/touchscreen/synaptics_s3320_redremote.c
Executable file
|
@ -0,0 +1,938 @@
|
|||
/*
|
||||
* Synaptics DSX touchscreen driver
|
||||
*
|
||||
* Copyright (C) 2012 Synaptics Incorporated
|
||||
*
|
||||
* Copyright (C) 2012 Alexandra Chin <alexandra.chin@tw.synaptics.com>
|
||||
* Copyright (C) 2012 Scott Lin <scott.lin@tw.synaptics.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/cdev.h>
|
||||
#include "synaptics_redremote.h"
|
||||
|
||||
|
||||
#define CHAR_DEVICE_NAME "rmi"
|
||||
#define DEVICE_CLASS_NAME "rmidev"
|
||||
#define DEV_NUMBER 1
|
||||
#define REG_ADDR_LIMIT 0xFFFF
|
||||
|
||||
|
||||
static ssize_t rmidev_sysfs_data_show(struct file *data_file,
|
||||
struct kobject *kobj, struct bin_attribute *attributes,
|
||||
char *buf, loff_t pos, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_data_store(struct file *data_file,
|
||||
struct kobject *kobj, struct bin_attribute *attributes,
|
||||
char *buf, loff_t pos, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_open_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_release_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_address_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_length_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count);
|
||||
|
||||
static ssize_t rmidev_sysfs_attn_state_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
||||
static int remote_rmi4_i2c_read(unsigned short addr,
|
||||
unsigned char *data, unsigned short length);
|
||||
static int remote_rmi4_i2c_write(unsigned short addr,
|
||||
unsigned char *data, unsigned short length);
|
||||
static int remote_rmi4_i2c_enable(bool enable);
|
||||
static int remote_rmi4_get_irq_gpio(void);
|
||||
static int remote_rmit_set_page(unsigned int address);
|
||||
static int remote_rmit_put_page(void);
|
||||
|
||||
|
||||
static struct input_dev *remote_rmi4_get_input(void);
|
||||
static struct i2c_client *remote_rmi4_get_i2c_client(void);
|
||||
static void remote_rmi4_delay_work(struct work_struct *work);
|
||||
static struct remotepanel_data *remote_free_panel_data
|
||||
(struct remotepanel_data *pdata);
|
||||
|
||||
|
||||
#define MASK_8BIT 0xFF
|
||||
#define SYN_I2C_RETRY_TIMES 3
|
||||
#define BUFFER_SIZE 252
|
||||
struct rmidev_handle {
|
||||
dev_t dev_no;
|
||||
unsigned short address;
|
||||
unsigned int length;
|
||||
struct device dev;
|
||||
struct kobject *sysfs_dir;
|
||||
void *data;
|
||||
};
|
||||
|
||||
struct rmidev_data {
|
||||
int ref_count;
|
||||
struct cdev main_dev;
|
||||
struct class *device_class;
|
||||
struct mutex file_mutex;
|
||||
struct rmidev_handle *rmi_dev;
|
||||
struct remotepanel_data *pdata;
|
||||
};
|
||||
|
||||
static struct bin_attribute attr_data = {
|
||||
.attr = {
|
||||
.name = "data",
|
||||
.mode = (S_IRUSR | S_IWUSR),
|
||||
},
|
||||
.size = 0,
|
||||
.read = rmidev_sysfs_data_show,
|
||||
.write = rmidev_sysfs_data_store,
|
||||
};
|
||||
|
||||
static struct device_attribute attrs[] = {
|
||||
__ATTR(open, S_IRUSR | S_IWUSR,
|
||||
NULL,
|
||||
rmidev_sysfs_open_store),
|
||||
__ATTR(release, S_IRUSR | S_IWUSR,
|
||||
NULL,
|
||||
rmidev_sysfs_release_store),
|
||||
__ATTR(address, S_IRUSR | S_IWUSR,
|
||||
NULL,
|
||||
rmidev_sysfs_address_store),
|
||||
__ATTR(length, S_IRUSR | S_IWUSR,
|
||||
NULL,
|
||||
rmidev_sysfs_length_store),
|
||||
__ATTR(attn_state, S_IRUSR | S_IWUSR,
|
||||
rmidev_sysfs_attn_state_show,
|
||||
NULL),
|
||||
};
|
||||
|
||||
static int rmidev_major_num;
|
||||
|
||||
static struct class *rmidev_device_class;
|
||||
|
||||
static struct rmidev_handle *rmidev;
|
||||
|
||||
|
||||
static struct device *device_ptr;
|
||||
static struct delayed_work delay_work;
|
||||
|
||||
|
||||
static ssize_t rmidev_sysfs_data_show(struct file *data_file,
|
||||
struct kobject *kobj, struct bin_attribute *attributes,
|
||||
char *buf, loff_t pos, size_t count)
|
||||
{
|
||||
int retval;
|
||||
unsigned int data_length = rmidev->length;
|
||||
|
||||
if (data_length > (REG_ADDR_LIMIT - rmidev->address))
|
||||
data_length = REG_ADDR_LIMIT - rmidev->address;
|
||||
|
||||
if (count < data_length) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Not enough space (%zd bytes) in buffer\n",
|
||||
__func__, count);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (data_length) {
|
||||
retval = remote_rmi4_i2c_read(
|
||||
rmidev->address,
|
||||
(unsigned char *)buf,
|
||||
data_length);
|
||||
if (retval < 0) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Failed to read data\n",
|
||||
__func__);
|
||||
return retval;
|
||||
}
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return data_length;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_data_store(struct file *data_file,
|
||||
struct kobject *kobj, struct bin_attribute *attributes,
|
||||
char *buf, loff_t pos, size_t count)
|
||||
{
|
||||
int retval;
|
||||
unsigned int data_length = rmidev->length;
|
||||
|
||||
if (data_length > (REG_ADDR_LIMIT - rmidev->address))
|
||||
data_length = REG_ADDR_LIMIT - rmidev->address;
|
||||
|
||||
if (data_length) {
|
||||
retval = remote_rmi4_i2c_write(
|
||||
rmidev->address,
|
||||
(unsigned char *)buf,
|
||||
data_length);
|
||||
if (retval < 0) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Failed to write data\n",
|
||||
__func__);
|
||||
return retval;
|
||||
}
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_open_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
|
||||
if (kstrtouint(buf, 10, &input) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (input != 1)
|
||||
return -EINVAL;
|
||||
|
||||
remote_rmi4_i2c_enable(false);
|
||||
dev_dbg(device_ptr,
|
||||
"%s: Attention interrupt disabled\n",
|
||||
__func__);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_release_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
|
||||
if (kstrtouint(buf, 10, &input) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (input != 1)
|
||||
return -EINVAL;
|
||||
|
||||
remote_rmi4_i2c_enable(true);
|
||||
dev_dbg(device_ptr,
|
||||
"%s: Attention interrupt enabled\n",
|
||||
__func__);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_address_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
|
||||
if (kstrtouint(buf, 10, &input) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (input > REG_ADDR_LIMIT)
|
||||
return -EINVAL;
|
||||
|
||||
rmidev->address = (unsigned short)input;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_length_store(struct device *dev,
|
||||
struct device_attribute *attr, const char *buf, size_t count)
|
||||
{
|
||||
unsigned int input;
|
||||
|
||||
if (kstrtouint(buf, 10, &input) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (input > REG_ADDR_LIMIT)
|
||||
return -EINVAL;
|
||||
|
||||
rmidev->length = input;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static ssize_t rmidev_sysfs_attn_state_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
int attn_state;
|
||||
|
||||
attn_state = gpio_get_value(remote_rmi4_get_irq_gpio());
|
||||
|
||||
return snprintf(buf, PAGE_SIZE, "%d\n", attn_state);
|
||||
}
|
||||
|
||||
static int remote_rmi4_get_irq_gpio(void)
|
||||
{
|
||||
struct rmidev_data *dev_data = (struct rmidev_data *)rmidev->data;
|
||||
|
||||
return dev_data->pdata->irq_gpio;
|
||||
}
|
||||
|
||||
static struct input_dev *remote_rmi4_get_input(void)
|
||||
{
|
||||
struct rmidev_data *dev_data = (struct rmidev_data *)rmidev->data;
|
||||
|
||||
return dev_data->pdata->input_dev;
|
||||
}
|
||||
|
||||
static struct i2c_client *remote_rmi4_get_i2c_client(void)
|
||||
{
|
||||
struct rmidev_data *dev_data = (struct rmidev_data *)rmidev->data;
|
||||
|
||||
return dev_data->pdata->client;
|
||||
}
|
||||
|
||||
static int remote_rmit_set_page(unsigned int address)
|
||||
{
|
||||
struct i2c_client *i2c_client = remote_rmi4_get_i2c_client();
|
||||
unsigned char retry;
|
||||
unsigned char buf[2];
|
||||
struct i2c_msg msg[] = {
|
||||
{
|
||||
.addr = i2c_client->addr,
|
||||
.flags = 0,
|
||||
.len = 2,
|
||||
.buf = buf,
|
||||
}
|
||||
};
|
||||
buf[0] = 0xff;
|
||||
buf[1] = ((address >> 8) & 0xFF);
|
||||
|
||||
for (retry = 0; retry < 2; retry++) {
|
||||
if (i2c_transfer(i2c_client->adapter, msg, 1) == 1)
|
||||
break;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
if (retry == 2)
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int remote_rmit_put_page(void)
|
||||
{
|
||||
struct i2c_client *i2c_client = remote_rmi4_get_i2c_client();
|
||||
unsigned char retry;
|
||||
unsigned char buf[2];
|
||||
struct i2c_msg msg[] = {
|
||||
{
|
||||
.addr = i2c_client->addr,
|
||||
.flags = 0,
|
||||
.len = 2,
|
||||
.buf = buf,
|
||||
}
|
||||
};
|
||||
buf[0] = 0xff;
|
||||
buf[1] = 0x00;
|
||||
|
||||
for (retry = 0; retry < 2; retry++) {
|
||||
if (i2c_transfer(i2c_client->adapter, msg, 1) == 1)
|
||||
break;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
if (retry == 2)
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int remote_rmi4_i2c_read(unsigned short addr,
|
||||
unsigned char *data, unsigned short length)
|
||||
{
|
||||
int retval;
|
||||
unsigned char retry;
|
||||
unsigned char buf;
|
||||
struct i2c_client *i2c_client = remote_rmi4_get_i2c_client();
|
||||
struct i2c_msg msg[] = {
|
||||
{
|
||||
.addr = i2c_client->addr,
|
||||
.flags = 0,
|
||||
.len = 1,
|
||||
.buf = &buf,
|
||||
},
|
||||
{
|
||||
.addr = i2c_client->addr,
|
||||
.flags = I2C_M_RD,
|
||||
.len = length,
|
||||
.buf = data,
|
||||
},
|
||||
};
|
||||
|
||||
buf = addr & 0xff;
|
||||
|
||||
retval = remote_rmit_set_page(addr);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
for (retry = 0; retry < 2; retry++) {
|
||||
if (i2c_transfer(i2c_client->adapter, msg, 2) == 2) {
|
||||
retval = length;
|
||||
break;
|
||||
}
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
if (retry == 2)
|
||||
retval = -EIO;
|
||||
|
||||
exit:
|
||||
remote_rmit_put_page();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int remote_rmi4_i2c_write(unsigned short addr,
|
||||
unsigned char *data, unsigned short length)
|
||||
{
|
||||
int retval;
|
||||
unsigned char retry;
|
||||
unsigned char buf[length + 1];
|
||||
struct i2c_client *i2c_client = remote_rmi4_get_i2c_client();
|
||||
struct i2c_msg msg[] = {
|
||||
{
|
||||
.addr = i2c_client->addr,
|
||||
.flags = 0,
|
||||
.len = length + 1,
|
||||
.buf = buf,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
retval = remote_rmit_set_page(addr);
|
||||
if (retval < 0)
|
||||
goto exit;
|
||||
|
||||
buf[0] = addr & 0xff;
|
||||
memcpy(&buf[1], &data[0], length);
|
||||
|
||||
for (retry = 0; retry < 2; retry++) {
|
||||
if (i2c_transfer(i2c_client->adapter, msg, 1) == 1) {
|
||||
retval = length;
|
||||
break;
|
||||
}
|
||||
msleep(20);
|
||||
}
|
||||
msleep(20);
|
||||
if (retry == 2)
|
||||
retval = -EIO;
|
||||
|
||||
exit:
|
||||
remote_rmit_put_page();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int remote_rmi4_i2c_enable(bool enable)
|
||||
{
|
||||
struct rmidev_data *dev_data = (struct rmidev_data *)rmidev->data;
|
||||
|
||||
if (enable)
|
||||
*(dev_data->pdata->enable_remote) = 0;
|
||||
else
|
||||
*(dev_data->pdata->enable_remote) = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* rmidev_llseek - used to set up register address
|
||||
*
|
||||
* @filp: file structure for seek
|
||||
* @off: offset
|
||||
* if whence == SEEK_SET,
|
||||
* high 16 bits: page address
|
||||
* low 16 bits: register address
|
||||
* if whence == SEEK_CUR,
|
||||
* offset from current position
|
||||
* if whence == SEEK_END,
|
||||
* offset from end position (0xFFFF)
|
||||
* @whence: SEEK_SET, SEEK_CUR, or SEEK_END
|
||||
*/
|
||||
static loff_t rmidev_llseek(struct file *filp, loff_t off, int whence)
|
||||
{
|
||||
loff_t newpos;
|
||||
struct rmidev_data *dev_data = filp->private_data;
|
||||
|
||||
if (IS_ERR(dev_data)) {
|
||||
pr_err("%s: Pointer of char device data is invalid", __func__);
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
|
||||
mutex_lock(&(dev_data->file_mutex));
|
||||
|
||||
switch (whence) {
|
||||
case SEEK_SET:
|
||||
newpos = off;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
newpos = filp->f_pos + off;
|
||||
break;
|
||||
case SEEK_END:
|
||||
newpos = REG_ADDR_LIMIT + off;
|
||||
break;
|
||||
default:
|
||||
newpos = -EINVAL;
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
if (newpos < 0 || newpos > REG_ADDR_LIMIT) {
|
||||
dev_err(device_ptr,
|
||||
"%s: New position 0x%04x is invalid\n",
|
||||
__func__, (unsigned int)newpos);
|
||||
newpos = -EINVAL;
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
filp->f_pos = newpos;
|
||||
|
||||
clean_up:
|
||||
mutex_unlock(&(dev_data->file_mutex));
|
||||
|
||||
return newpos;
|
||||
}
|
||||
|
||||
/*
|
||||
* rmidev_read: - use to read data from rmi device
|
||||
*
|
||||
* @filp: file structure for read
|
||||
* @buf: user space buffer pointer
|
||||
* @count: number of bytes to read
|
||||
* @f_pos: offset (starting register address)
|
||||
*/
|
||||
static ssize_t rmidev_read(struct file *filp, char __user *buf,
|
||||
size_t count, loff_t *f_pos)
|
||||
{
|
||||
ssize_t retval;
|
||||
unsigned char tmpbuf[count + 1];
|
||||
struct rmidev_data *dev_data = filp->private_data;
|
||||
|
||||
if (IS_ERR(dev_data)) {
|
||||
pr_err("%s: Pointer of char device data is invalid", __func__);
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
if (count > (REG_ADDR_LIMIT - *f_pos))
|
||||
count = REG_ADDR_LIMIT - *f_pos;
|
||||
|
||||
mutex_lock(dev_data->pdata->pmutex);
|
||||
mutex_lock(&(dev_data->file_mutex));
|
||||
|
||||
retval = remote_rmi4_i2c_read(
|
||||
*f_pos,
|
||||
tmpbuf,
|
||||
count);
|
||||
if (retval < 0)
|
||||
goto clean_up;
|
||||
|
||||
if (copy_to_user(buf, tmpbuf, count))
|
||||
retval = -EFAULT;
|
||||
else
|
||||
*f_pos += retval;
|
||||
|
||||
clean_up:
|
||||
mutex_unlock(&(dev_data->file_mutex));
|
||||
mutex_unlock(dev_data->pdata->pmutex);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* rmidev_write: - used to write data to rmi device
|
||||
*
|
||||
* @filep: file structure for write
|
||||
* @buf: user space buffer pointer
|
||||
* @count: number of bytes to write
|
||||
* @f_pos: offset (starting register address)
|
||||
*/
|
||||
static ssize_t rmidev_write(struct file *filp, const char __user *buf,
|
||||
size_t count, loff_t *f_pos)
|
||||
{
|
||||
ssize_t retval;
|
||||
unsigned char tmpbuf[count + 1];
|
||||
struct rmidev_data *dev_data = filp->private_data;
|
||||
|
||||
pr_err("synap %s\n", __func__);
|
||||
|
||||
if (IS_ERR(dev_data)) {
|
||||
pr_err("%s: Pointer of char device data is invalid", __func__);
|
||||
return -EBADF;
|
||||
}
|
||||
|
||||
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
if (count > (REG_ADDR_LIMIT - *f_pos))
|
||||
count = REG_ADDR_LIMIT - *f_pos;
|
||||
|
||||
if (copy_from_user(tmpbuf, buf, count))
|
||||
return -EFAULT;
|
||||
|
||||
mutex_lock(dev_data->pdata->pmutex);
|
||||
mutex_lock(&(dev_data->file_mutex));
|
||||
|
||||
retval = remote_rmi4_i2c_write(
|
||||
*f_pos,
|
||||
tmpbuf,
|
||||
count);
|
||||
if (retval >= 0)
|
||||
*f_pos += retval;
|
||||
|
||||
|
||||
mutex_unlock(&(dev_data->file_mutex));
|
||||
mutex_unlock(dev_data->pdata->pmutex);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int rmidev_create_attr(bool create)
|
||||
{
|
||||
int retval = 0;
|
||||
unsigned char attr_count;
|
||||
struct input_dev *input_dev = remote_rmi4_get_input();
|
||||
|
||||
pr_err("synap %s\n", __func__);
|
||||
if (!create)
|
||||
goto err_sysfs_attrs;
|
||||
|
||||
if (rmidev->sysfs_dir)
|
||||
return 0;
|
||||
|
||||
if (!input_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
rmidev->sysfs_dir = kobject_create_and_add("rmidev",
|
||||
&input_dev->dev.kobj);
|
||||
if (!rmidev->sysfs_dir) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Failed to create sysfs directory\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
retval = sysfs_create_bin_file(rmidev->sysfs_dir,
|
||||
&attr_data);
|
||||
if (retval < 0) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Failed to create sysfs bin file\n",
|
||||
__func__);
|
||||
goto err_sysfs_bin;
|
||||
}
|
||||
|
||||
|
||||
for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++) {
|
||||
retval = sysfs_create_file(rmidev->sysfs_dir,
|
||||
&attrs[attr_count].attr);
|
||||
if (retval < 0) {
|
||||
dev_err(device_ptr,
|
||||
"%s: Failed to create sysfs attributes\n",
|
||||
__func__);
|
||||
retval = -ENODEV;
|
||||
goto err_sysfs_attrs;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_sysfs_attrs:
|
||||
if (!rmidev->sysfs_dir)
|
||||
return 0;
|
||||
for (attr_count = 0; attr_count < ARRAY_SIZE(attrs); attr_count++)
|
||||
sysfs_remove_file(rmidev->sysfs_dir, &attrs[attr_count].attr);
|
||||
|
||||
sysfs_remove_bin_file(rmidev->sysfs_dir, &attr_data);
|
||||
|
||||
err_sysfs_bin:
|
||||
kobject_put(rmidev->sysfs_dir);
|
||||
rmidev->sysfs_dir = NULL;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* rmidev_open: enable access to rmi device
|
||||
* @inp: inode struture
|
||||
* @filp: file structure
|
||||
*/
|
||||
static int rmidev_open(struct inode *inp, struct file *filp)
|
||||
{
|
||||
int retval = 0;
|
||||
struct rmidev_data *dev_data =
|
||||
container_of(inp->i_cdev, struct rmidev_data, main_dev);
|
||||
pr_err("synap %s\n", __func__);
|
||||
|
||||
if (!dev_data)
|
||||
return -EACCES;
|
||||
|
||||
|
||||
rmidev_create_attr(true);
|
||||
|
||||
filp->private_data = dev_data;
|
||||
|
||||
mutex_lock(&(dev_data->file_mutex));
|
||||
*(dev_data->pdata->enable_remote) = 1;
|
||||
/*remote_rmi4_i2c_enable(false);*/
|
||||
dev_dbg(device_ptr,
|
||||
"%s: Attention interrupt disabled\n",
|
||||
__func__);
|
||||
|
||||
if (dev_data->ref_count < 1)
|
||||
dev_data->ref_count++;
|
||||
else
|
||||
retval = -EACCES;
|
||||
|
||||
mutex_unlock(&(dev_data->file_mutex));
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* rmidev_release: - release access to rmi device
|
||||
* @inp: inode structure
|
||||
* @filp: file structure
|
||||
*/
|
||||
static int rmidev_release(struct inode *inp, struct file *filp)
|
||||
{
|
||||
struct rmidev_data *dev_data =
|
||||
container_of(inp->i_cdev, struct rmidev_data, main_dev);
|
||||
|
||||
if (!dev_data)
|
||||
return -EACCES;
|
||||
|
||||
rmidev_create_attr(false);
|
||||
|
||||
mutex_lock(&(dev_data->file_mutex));
|
||||
|
||||
dev_data->ref_count--;
|
||||
if (dev_data->ref_count < 0)
|
||||
dev_data->ref_count = 0;
|
||||
|
||||
remote_rmi4_i2c_enable(true);
|
||||
dev_dbg(device_ptr,
|
||||
"%s: Attention interrupt enabled\n",
|
||||
__func__);
|
||||
|
||||
mutex_unlock(&(dev_data->file_mutex));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct file_operations rmidev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = rmidev_llseek,
|
||||
.read = rmidev_read,
|
||||
.write = rmidev_write,
|
||||
.open = rmidev_open,
|
||||
.release = rmidev_release,
|
||||
};
|
||||
|
||||
static void rmidev_device_cleanup(struct rmidev_data *dev_data)
|
||||
{
|
||||
dev_t devno;
|
||||
|
||||
if (dev_data) {
|
||||
devno = dev_data->main_dev.dev;
|
||||
|
||||
if (dev_data->device_class)
|
||||
device_destroy(dev_data->device_class, devno);
|
||||
|
||||
cdev_del(&dev_data->main_dev);
|
||||
|
||||
unregister_chrdev_region(devno, 1);
|
||||
|
||||
remote_free_panel_data(dev_data->pdata);
|
||||
|
||||
dev_dbg(device_ptr,
|
||||
"%s: rmidev device removed\n",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
|
||||
static char *rmi_char_devnode(struct device *dev, umode_t *mode)
|
||||
{
|
||||
if (!mode)
|
||||
return NULL;
|
||||
|
||||
*mode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
|
||||
return kasprintf(GFP_KERNEL, "rmi/%s", dev_name(dev));
|
||||
}
|
||||
|
||||
static int rmidev_create_device_class(void)
|
||||
{
|
||||
rmidev_device_class = class_create(THIS_MODULE, DEVICE_CLASS_NAME);
|
||||
|
||||
if (IS_ERR(rmidev_device_class)) {
|
||||
pr_err("%s: Failed to create /dev/%s\n",
|
||||
__func__, CHAR_DEVICE_NAME);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
rmidev_device_class->devnode = rmi_char_devnode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void remote_rmi4_delay_work(struct work_struct *work)
|
||||
{
|
||||
rmidev_create_attr(true);
|
||||
}
|
||||
|
||||
struct remotepanel_data *remote_alloc_panel_data(void)
|
||||
{
|
||||
if (rmidev) {
|
||||
pr_err("%s:remote panel data has alloc already null\n",
|
||||
__func__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return kzalloc(sizeof(struct remotepanel_data), GFP_KERNEL);
|
||||
}
|
||||
|
||||
static struct remotepanel_data *remote_free_panel_data
|
||||
(struct remotepanel_data *pdata)
|
||||
{
|
||||
pdata = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*int rmidev_init_device(void)*/
|
||||
int register_remote_device(struct remotepanel_data *pdata)
|
||||
{
|
||||
int retval;
|
||||
dev_t dev_no;
|
||||
struct rmidev_data *dev_data = NULL;
|
||||
|
||||
if (pdata == NULL) {
|
||||
pr_err("%s:pdata is null\n", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (rmidev) {
|
||||
pr_err("%s:remote device has register already null\n",
|
||||
__func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
rmidev = kzalloc(sizeof(*rmidev), GFP_KERNEL);
|
||||
if (!rmidev) {
|
||||
retval = -ENOMEM;
|
||||
goto err_rmidev;
|
||||
}
|
||||
|
||||
retval = rmidev_create_device_class();
|
||||
if (retval < 0)
|
||||
goto err_device_class;
|
||||
|
||||
if (rmidev_major_num) {
|
||||
dev_no = MKDEV(rmidev_major_num, DEV_NUMBER);
|
||||
retval = register_chrdev_region(dev_no, 1, CHAR_DEVICE_NAME);
|
||||
} else {
|
||||
retval = alloc_chrdev_region(&dev_no, 1, 1, CHAR_DEVICE_NAME);
|
||||
if (retval < 0)
|
||||
goto err_device_region;
|
||||
|
||||
rmidev_major_num = MAJOR(dev_no);
|
||||
}
|
||||
|
||||
|
||||
dev_data = kzalloc(sizeof(*dev_data), GFP_KERNEL);
|
||||
if (!dev_data) {
|
||||
retval = -ENOMEM;
|
||||
goto err_dev_data;
|
||||
}
|
||||
|
||||
dev_data->pdata = pdata;
|
||||
|
||||
mutex_init(&dev_data->file_mutex);
|
||||
dev_data->rmi_dev = rmidev;
|
||||
rmidev->data = dev_data;
|
||||
|
||||
cdev_init(&dev_data->main_dev, &rmidev_fops);
|
||||
|
||||
retval = cdev_add(&dev_data->main_dev, dev_no, 1);
|
||||
if (retval < 0)
|
||||
goto err_char_device;
|
||||
|
||||
dev_set_name(&rmidev->dev, "rmidev%d", MINOR(dev_no));
|
||||
dev_data->device_class = rmidev_device_class;
|
||||
|
||||
device_ptr = device_create(dev_data->device_class, NULL, dev_no,
|
||||
NULL, CHAR_DEVICE_NAME"%d", MINOR(dev_no));
|
||||
if (IS_ERR(device_ptr)) {
|
||||
pr_err("%s: Failed to create rmi char device\n", __func__);
|
||||
retval = -ENODEV;
|
||||
goto err_char_device;
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK(&delay_work, remote_rmi4_delay_work);
|
||||
schedule_delayed_work(&delay_work, msecs_to_jiffies(8*1000));
|
||||
|
||||
return 0;
|
||||
|
||||
err_char_device:
|
||||
remote_free_panel_data(dev_data->pdata);
|
||||
rmidev_device_cleanup(dev_data);
|
||||
kfree(dev_data);
|
||||
|
||||
err_dev_data:
|
||||
unregister_chrdev_region(dev_no, 1);
|
||||
|
||||
err_device_region:
|
||||
class_destroy(rmidev_device_class);
|
||||
|
||||
err_device_class:
|
||||
kfree(rmidev);
|
||||
rmidev = NULL;
|
||||
err_rmidev:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*void rmidev_remove_device(void)*/
|
||||
void unregister_remote_device(void)
|
||||
{
|
||||
struct rmidev_data *dev_data;
|
||||
|
||||
if (!rmidev)
|
||||
return;
|
||||
|
||||
dev_data = rmidev->data;
|
||||
if (dev_data) {
|
||||
rmidev_device_cleanup(dev_data);
|
||||
kfree(dev_data);
|
||||
}
|
||||
|
||||
unregister_chrdev_region(rmidev->dev_no, 1);
|
||||
|
||||
class_destroy(rmidev_device_class);
|
||||
|
||||
kfree(rmidev);
|
||||
}
|
|
@ -206,10 +206,16 @@ static inline int __msm_dma_map_sg(struct device *dev, struct scatterlist *sg,
|
|||
kref_init(&iommu_map->ref);
|
||||
if (late_unmap)
|
||||
kref_get(&iommu_map->ref);
|
||||
|
||||
iommu_map->meta = iommu_meta;
|
||||
iommu_map->sgl.dma_address = sg->dma_address;
|
||||
iommu_map->sgl.dma_length = sg->dma_length;
|
||||
iommu_map->dev = dev;
|
||||
iommu_map->dir = dir;
|
||||
iommu_map->nents = nents;
|
||||
iommu_map->sgl.page_link = sg->page_link;
|
||||
iommu_map->sgl.offset = sg->offset;
|
||||
iommu_map->sgl.length = sg->length;
|
||||
msm_iommu_add(iommu_meta, iommu_map);
|
||||
|
||||
} else {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include <asm/virt.h>
|
||||
|
||||
#include "irq-gic-common.h"
|
||||
#include <linux/wakeup_reason.h>
|
||||
|
||||
struct redist_region {
|
||||
void __iomem *redist_base;
|
||||
|
@ -441,7 +442,7 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
|
|||
name = "stray irq";
|
||||
else if (desc->action && desc->action->name)
|
||||
name = desc->action->name;
|
||||
|
||||
log_wakeup_reason(irq);
|
||||
pr_warn("%s: %d triggered %s\n", __func__, irq, name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
int msm_show_resume_irq_mask;
|
||||
int msm_show_resume_irq_mask = 1;
|
||||
|
||||
module_param_named(
|
||||
debug_mask, msm_show_resume_irq_mask, int, S_IRUGO | S_IWUSR | S_IWGRP
|
||||
|
|
29
drivers/leds/leds-gpio.c
Normal file → Executable file
29
drivers/leds/leds-gpio.c
Normal file → Executable file
|
@ -21,7 +21,7 @@
|
|||
#include <linux/property.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#include <linux/regulator/consumer.h>
|
||||
struct gpio_led_data {
|
||||
struct led_classdev cdev;
|
||||
struct gpio_desc *gpiod;
|
||||
|
@ -31,6 +31,9 @@ struct gpio_led_data {
|
|||
u8 blinking;
|
||||
int (*platform_gpio_blink_set)(struct gpio_desc *desc, int state,
|
||||
unsigned long *delay_on, unsigned long *delay_off);
|
||||
struct regulator *vdd;
|
||||
int vmin_high;
|
||||
int vmin_low;
|
||||
};
|
||||
|
||||
static void gpio_led_work(struct work_struct *work)
|
||||
|
@ -58,6 +61,10 @@ static void gpio_led_set(struct led_classdev *led_cdev,
|
|||
else
|
||||
level = 1;
|
||||
|
||||
if(led_dat->vdd){
|
||||
regulator_set_voltage(led_dat->vdd, level?led_dat->vmin_high:led_dat->vmin_low,INT_MAX);
|
||||
}
|
||||
|
||||
/* Setting GPIOs with I2C/etc requires a task context, and we don't
|
||||
* seem to have a reliable way to know if we're already in one; so
|
||||
* let's just assume the worst.
|
||||
|
@ -92,7 +99,7 @@ static int create_gpio_led(const struct gpio_led *template,
|
|||
unsigned long *))
|
||||
{
|
||||
int ret, state;
|
||||
|
||||
const __be32 *min_uV, *max_uV;
|
||||
led_dat->gpiod = template->gpiod;
|
||||
if (!led_dat->gpiod) {
|
||||
/*
|
||||
|
@ -126,6 +133,15 @@ static int create_gpio_led(const struct gpio_led *template,
|
|||
led_dat->cdev.default_trigger = template->default_trigger;
|
||||
led_dat->can_sleep = gpiod_cansleep(led_dat->gpiod);
|
||||
led_dat->blinking = 0;
|
||||
|
||||
led_dat->vdd = regulator_get(parent, "vdd");
|
||||
min_uV = of_get_property(parent->of_node, "keypad-led-vbob-min", NULL);
|
||||
max_uV = of_get_property(parent->of_node, "keypad-led-vbob-max", NULL);
|
||||
if (!IS_ERR(led_dat->vdd)) {
|
||||
led_dat->vmin_low = be32_to_cpu(*min_uV);;
|
||||
led_dat->vmin_high = be32_to_cpu(*max_uV);;
|
||||
}
|
||||
|
||||
if (blink_set) {
|
||||
led_dat->platform_gpio_blink_set = blink_set;
|
||||
led_dat->cdev.blink_set = gpio_blink_set;
|
||||
|
@ -250,7 +266,8 @@ static int gpio_led_probe(struct platform_device *pdev)
|
|||
struct gpio_leds_priv *priv;
|
||||
int i, ret = 0;
|
||||
|
||||
if (pdata && pdata->num_leds) {
|
||||
if (pdata) {
|
||||
if (pdata->num_leds) {
|
||||
priv = devm_kzalloc(&pdev->dev,
|
||||
sizeof_gpio_leds_priv(pdata->num_leds),
|
||||
GFP_KERNEL);
|
||||
|
@ -268,8 +285,10 @@ static int gpio_led_probe(struct platform_device *pdev)
|
|||
delete_gpio_led(&priv->leds[i]);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
priv = gpio_leds_create(pdev);
|
||||
if (IS_ERR(priv))
|
||||
return PTR_ERR(priv);
|
||||
|
|
102
drivers/leds/leds-qpnp.c
Normal file → Executable file
102
drivers/leds/leds-qpnp.c
Normal file → Executable file
|
@ -251,6 +251,8 @@
|
|||
#define NUM_KPDBL_LEDS 4
|
||||
#define KPDBL_MASTER_BIT_INDEX 0
|
||||
|
||||
static u8 shutdown_enable = 0;
|
||||
|
||||
/**
|
||||
* enum qpnp_leds - QPNP supported led ids
|
||||
* @QPNP_ID_WLED - White led backlight
|
||||
|
@ -2550,11 +2552,12 @@ static ssize_t duty_pcts_store(struct device *dev,
|
|||
struct led_classdev *led_cdev = dev_get_drvdata(dev);
|
||||
char *buffer;
|
||||
ssize_t ret;
|
||||
int i = 0;
|
||||
int rets;
|
||||
//int i = 0;
|
||||
int max_duty_pcts;
|
||||
struct pwm_config_data *pwm_cfg;
|
||||
u32 previous_num_duty_pcts;
|
||||
int value;
|
||||
//int value;
|
||||
int *previous_duty_pcts;
|
||||
|
||||
led = container_of(led_cdev, struct qpnp_led_data, cdev);
|
||||
|
@ -2585,16 +2588,24 @@ static ssize_t duty_pcts_store(struct device *dev,
|
|||
|
||||
buffer = (char *)buf;
|
||||
|
||||
for (i = 0; i < max_duty_pcts; i++) {
|
||||
if (buffer == NULL)
|
||||
break;
|
||||
ret = sscanf((const char *)buffer, "%u,%s", &value, buffer);
|
||||
pwm_cfg->old_duty_pcts[i] = value;
|
||||
num_duty_pcts++;
|
||||
if (ret <= 1)
|
||||
break;
|
||||
rets= sscanf((const char *)buffer,
|
||||
"bean %x %x %x %x %x %x %x %x %x %x %x ",
|
||||
&pwm_cfg->old_duty_pcts[0], &pwm_cfg->old_duty_pcts[1],
|
||||
&pwm_cfg->old_duty_pcts[2], &pwm_cfg->old_duty_pcts[3],
|
||||
&pwm_cfg->old_duty_pcts[4], &pwm_cfg->old_duty_pcts[5],
|
||||
&pwm_cfg->old_duty_pcts[6],&pwm_cfg->old_duty_pcts[7],
|
||||
&pwm_cfg->old_duty_pcts[8], &pwm_cfg->old_duty_pcts[9],
|
||||
&pwm_cfg->old_duty_pcts[10]);
|
||||
printk("bean set rets = %d\n",rets);
|
||||
if(rets != 11)
|
||||
{
|
||||
pr_err("duty_pcts_store: Invalid paramter:%d\n", rets);
|
||||
return -1;
|
||||
}
|
||||
|
||||
num_duty_pcts = 11;
|
||||
|
||||
|
||||
if (num_duty_pcts >= max_duty_pcts) {
|
||||
dev_err(&led->pdev->dev,
|
||||
"Number of duty pcts given exceeds max (%d)\n",
|
||||
|
@ -2722,6 +2733,42 @@ static ssize_t blink_store(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static ssize_t shutdown_enable_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%d\n", shutdown_enable);
|
||||
}
|
||||
|
||||
static ssize_t shutdown_enable_store(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
|
||||
if (count < 1)
|
||||
return -EINVAL;
|
||||
|
||||
switch (buf[0]) {
|
||||
case '0':
|
||||
shutdown_enable = 0;
|
||||
break;
|
||||
case '3':
|
||||
shutdown_enable = 3;
|
||||
break;
|
||||
case '4':
|
||||
shutdown_enable = 4;
|
||||
break;
|
||||
case '5':
|
||||
shutdown_enable = 5;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return count;
|
||||
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(led_mode, 0664, NULL, led_mode_store);
|
||||
static DEVICE_ATTR(strobe, 0664, NULL, led_strobe_type_store);
|
||||
static DEVICE_ATTR(pwm_us, 0664, NULL, pwm_us_store);
|
||||
|
@ -2732,7 +2779,7 @@ static DEVICE_ATTR(ramp_step_ms, 0664, NULL, ramp_step_ms_store);
|
|||
static DEVICE_ATTR(lut_flags, 0664, NULL, lut_flags_store);
|
||||
static DEVICE_ATTR(duty_pcts, 0664, NULL, duty_pcts_store);
|
||||
static DEVICE_ATTR(blink, 0664, NULL, blink_store);
|
||||
|
||||
static DEVICE_ATTR(enable, 0644, shutdown_enable_show, shutdown_enable_store);
|
||||
static struct attribute *led_attrs[] = {
|
||||
&dev_attr_led_mode.attr,
|
||||
&dev_attr_strobe.attr,
|
||||
|
@ -2745,6 +2792,7 @@ static const struct attribute_group led_attr_group = {
|
|||
|
||||
static struct attribute *pwm_attrs[] = {
|
||||
&dev_attr_pwm_us.attr,
|
||||
&dev_attr_enable.attr,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -4238,6 +4286,37 @@ static int qpnp_leds_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void qpnp_leds_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct qpnp_led_data *led_array = dev_get_drvdata(&pdev->dev);
|
||||
int i, parsed_leds = led_array->num_leds;
|
||||
|
||||
for (i = 0; i < parsed_leds; i++) {
|
||||
if(led_array[i].id == QPNP_ID_RGB_RED){
|
||||
if(shutdown_enable == QPNP_ID_RGB_RED)
|
||||
led_array[i].cdev.brightness = LED_FULL;
|
||||
else
|
||||
led_array[i].cdev.brightness = LED_OFF;
|
||||
}
|
||||
else if(led_array[i].id == QPNP_ID_RGB_GREEN){
|
||||
if(shutdown_enable == QPNP_ID_RGB_GREEN)
|
||||
led_array[i].cdev.brightness = LED_FULL;
|
||||
else
|
||||
led_array[i].cdev.brightness = LED_OFF;
|
||||
}
|
||||
else if(led_array[i].id == QPNP_ID_RGB_BLUE){
|
||||
if(shutdown_enable == QPNP_ID_RGB_BLUE)
|
||||
led_array[i].cdev.brightness = LED_FULL;
|
||||
else
|
||||
led_array[i].cdev.brightness = LED_OFF;
|
||||
}
|
||||
else
|
||||
led_array[i].cdev.brightness = LED_OFF;
|
||||
|
||||
__qpnp_led_work(led_array+i, led_array[i].cdev.brightness);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id spmi_match_table[] = {
|
||||
{ .compatible = "qcom,leds-qpnp",},
|
||||
|
@ -4254,6 +4333,7 @@ static struct platform_driver qpnp_leds_driver = {
|
|||
},
|
||||
.probe = qpnp_leds_probe,
|
||||
.remove = qpnp_leds_remove,
|
||||
.shutdown = qpnp_leds_shutdown,
|
||||
};
|
||||
|
||||
static int __init qpnp_led_init(void)
|
||||
|
|
|
@ -576,10 +576,10 @@ static int camera_v4l2_fh_release(struct file *filep)
|
|||
if (sp) {
|
||||
v4l2_fh_del(&sp->fh);
|
||||
v4l2_fh_exit(&sp->fh);
|
||||
mutex_destroy(&sp->lock);
|
||||
kzfree(sp);
|
||||
}
|
||||
|
||||
mutex_destroy(&sp->lock);
|
||||
kzfree(sp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -25,8 +25,8 @@
|
|||
#define MSM_CAMERA_TZ_BOOT_PROTECTED (false)
|
||||
|
||||
/* Update version major number in case the HLOS-TA interface is changed*/
|
||||
#define TA_IF_VERSION_MAJ 2
|
||||
#define TA_IF_VERSION_MIN 1
|
||||
#define TA_IF_VERSION_MAJ 1
|
||||
#define TA_IF_VERSION_MIN 2
|
||||
|
||||
#undef CDBG
|
||||
#ifdef MSM_CAMERA_TZ_UTIL_VERBOSE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -29,7 +29,7 @@
|
|||
#define MSM_CAMERA_TZ_HW_BLOCK_CPP 0x0000000010
|
||||
|
||||
enum msm_camera_tz_cmd_id_t {
|
||||
MSM_CAMERA_TZ_CMD_NONE = 56000,
|
||||
MSM_CAMERA_TZ_CMD_NONE,
|
||||
MSM_CAMERA_TZ_CMD_GET_IF_VERSION,
|
||||
MSM_CAMERA_TZ_CMD_POWER_UP,
|
||||
MSM_CAMERA_TZ_CMD_POWER_DOWN,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -442,7 +442,7 @@ static int msm_fd_open(struct file *file)
|
|||
}
|
||||
|
||||
ctx->mem_pool.fd_device = ctx->fd_device;
|
||||
ctx->stats = vzalloc(sizeof(*ctx->stats) * MSM_FD_MAX_RESULT_BUFS);
|
||||
ctx->stats = vmalloc(sizeof(*ctx->stats) * MSM_FD_MAX_RESULT_BUFS);
|
||||
if (!ctx->stats) {
|
||||
dev_err(device->dev, "No memory for face statistics\n");
|
||||
ret = -ENOMEM;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -26,7 +26,6 @@
|
|||
#include <media/v4l2-ioctl.h>
|
||||
#include <media/v4l2-device.h>
|
||||
#include <media/videobuf2-core.h>
|
||||
#include <media/msmb_generic_buf_mgr.h>
|
||||
|
||||
#include "msm.h"
|
||||
#include "msm_buf_mgr.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue