summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:20:52 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-08-23 00:20:52 +0300
commit3cc2d2aa8574a94aca65ac664c3a0fb23d930700 (patch)
tree0632ac13a4a41364069b5bee86953579123c5b46 /include/uapi/linux
parent81d0e1715dc7ad78d029cfafc6810bbb90281247 (diff)
parentadec4f93e1705640e7b03d33394224ff5d835280 (diff)
Merge tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-17.1-caf-msm8998
* tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4: msm: kgsl: Mark the scratch buffer as privileged power: qcom: Add the QPNP QGAUGE (QG) headers msm: ipa: update msm_ipa.h with latest IPA versions constants nl80211: add NL80211_CMD_UPDATE_FT_IES to supported commands msm: mdss: hdmi: proper error logging ASoC: Fix warnings and errors with llvm sdm660_cdc: Reset cache_only mode for non SSR scenario include: Fix for compilation issue Makefile: Suppress few warnings with clang kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS kbuild: initialize CLANG_FLAGS correctly in the top Makefile kbuild: consolidate Clang compiler flags kbuild: add -no-integrated-as Clang option unconditionally power: qpnp-fg-gen3: Fix warning with llvm lkdtm: Fix warning with llvm AndroidKernel: Explicitly mark certain targets as phony dsp: q6asm: Change to increase asm sessions allowed dsp: q6adm: Channel map configuration for multi-channel defconfig: Create symbolic link for arm64 defconfigs scripts/build-all: remove pattern-based defconfig detection scripts/build-all: look for nested vendor/ defconfig directories scripts/build-all: remove all defconfig manipulation options scripts: build-all.py: update regex to compile all defconfigs scripts: build-all.py: append llvm to the config file scripts: Clean up the gcc-wrapper white list scripts: set clang as REAL_CC to support LLVM by default defconfig: auto: remove auto defconfigs vgacon: Fix a UAF in vgacon_invert_region soc: qcom: Reset string table index for each dump collection request msm: adsprpc: Fix array index underflow problem ath10k: remove unnecessary code drm/msm/dsi: use correct enum in dsi_get_cmd_fmt btrfs: Remove extra parentheses from condition in copy_items() do_last(): fetch directory ->i_mode and ->i_uid before it's too late Conflicts: fs/namei.c scripts/gcc-wrapper.py Change-Id: Icfb78abcc0f2cf980b5c0ceaf40f108038b1b527
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/msm_audio_calibration.h12
-rw-r--r--include/uapi/linux/msm_ipa.h11
-rw-r--r--include/uapi/linux/qg-profile.h68
-rw-r--r--include/uapi/linux/qg.h63
4 files changed, 153 insertions, 1 deletions
diff --git a/include/uapi/linux/msm_audio_calibration.h b/include/uapi/linux/msm_audio_calibration.h
index f05f9aaddb70..3da0d0842213 100644
--- a/include/uapi/linux/msm_audio_calibration.h
+++ b/include/uapi/linux/msm_audio_calibration.h
@@ -99,12 +99,24 @@ enum {
AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE,
AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE,
AFE_SIDETONE_IIR_CAL_TYPE,
+ AFE_LSM_TOPOLOGY_CAL_TYPE,
+ AFE_LSM_TX_CAL_TYPE,
+ ADM_LSM_TOPOLOGY_CAL_TYPE,
+ ADM_LSM_AUDPROC_CAL_TYPE,
+ ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE,
+ ADM_AUDPROC_PERSISTENT_CAL_TYPE,
MAX_CAL_TYPES,
};
#define AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE
#define AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE
+#define ADM_AUDPROC_PERSISTENT_CAL_TYPE ADM_AUDPROC_PERSISTENT_CAL_TYPE
+#define ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE
+#define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE
+#define AFE_LSM_TOPOLOGY_CAL_TYPE AFE_LSM_TOPOLOGY_CAL_TYPE
+#define AFE_LSM_TX_CAL_TYPE AFE_LSM_TX_CAL_TYPE
+#define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE
#define AFE_SIDETONE_IIR_CAL_TYPE AFE_SIDETONE_IIR_CAL_TYPE
enum {
diff --git a/include/uapi/linux/msm_ipa.h b/include/uapi/linux/msm_ipa.h
index 296784dcca6d..ca9dd6adc708 100644
--- a/include/uapi/linux/msm_ipa.h
+++ b/include/uapi/linux/msm_ipa.h
@@ -535,6 +535,9 @@ enum ipa_rm_resource_name {
* @IPA_HW_v3_5: IPA hardware version 3.5
* @IPA_HW_v3_5_1: IPA hardware version 3.5.1
* @IPA_HW_v4_0: IPA hardware version 4.0
+ * @IPA_HW_v4_1: IPA hardware version 4.1
+ * @IPA_HW_v4_2: IPA hardware version 4.2
+ * @IPA_HW_v4_5: IPA hardware version 4.5
*/
enum ipa_hw_type {
IPA_HW_None = 0,
@@ -550,10 +553,16 @@ enum ipa_hw_type {
IPA_HW_v3_5 = 12,
IPA_HW_v3_5_1 = 13,
IPA_HW_v4_0 = 14,
+ IPA_HW_v4_1 = 15,
+ IPA_HW_v4_2 = 16,
+ IPA_HW_v4_5 = 17,
};
-#define IPA_HW_MAX (IPA_HW_v4_0 + 1)
+#define IPA_HW_MAX (IPA_HW_v4_5 + 1)
#define IPA_HW_v4_0 IPA_HW_v4_0
+#define IPA_HW_v4_1 IPA_HW_v4_1
+#define IPA_HW_v4_2 IPA_HW_v4_2
+#define IPA_HW_v4_5 IPA_HW_v4_5
/**
* struct ipa_rule_attrib - attributes of a routing/filtering
diff --git a/include/uapi/linux/qg-profile.h b/include/uapi/linux/qg-profile.h
new file mode 100644
index 000000000000..0230b3227f78
--- /dev/null
+++ b/include/uapi/linux/qg-profile.h
@@ -0,0 +1,68 @@
+#ifndef __QG_PROFILE_H__
+#define __QG_PROFILE_H__
+
+#include <linux/ioctl.h>
+
+/**
+ * enum profile_table - Table index for battery profile data
+ */
+enum profile_table {
+ TABLE_SOC_OCV1,
+ TABLE_SOC_OCV2,
+ TABLE_FCC1,
+ TABLE_FCC2,
+ TABLE_Z1,
+ TABLE_Z2,
+ TABLE_Z3,
+ TABLE_Z4,
+ TABLE_Z5,
+ TABLE_Z6,
+ TABLE_Y1,
+ TABLE_Y2,
+ TABLE_Y3,
+ TABLE_Y4,
+ TABLE_Y5,
+ TABLE_Y6,
+ TABLE_MAX,
+};
+
+/**
+ * struct battery_params - Battery profile data to be exchanged
+ * @soc: SOC (state of charge) of the battery
+ * @ocv_uv: OCV (open circuit voltage) of the battery
+ * @batt_temp: Battery temperature in deci-degree
+ * @var: 'X' axis param for interpolation
+ * @table_index:Table index to be used for interpolation
+ */
+struct battery_params {
+ int soc;
+ int ocv_uv;
+ int fcc_mah;
+ int slope;
+ int var;
+ int batt_temp;
+ int table_index;
+};
+
+/* Profile MIN / MAX values */
+#define QG_MIN_SOC 0
+#define QG_MAX_SOC 10000
+#define QG_MIN_OCV_UV 3000000
+#define QG_MAX_OCV_UV 5000000
+#define QG_MIN_VAR 0
+#define QG_MAX_VAR 65535
+#define QG_MIN_FCC_MAH 100
+#define QG_MAX_FCC_MAH 16000
+#define QG_MIN_SLOPE 1
+#define QG_MAX_SLOPE 50000
+#define QG_ESR_SF_MIN 5000
+#define QG_ESR_SF_MAX 20000
+
+/* IOCTLs to query battery profile data */
+#define BPIOCXSOC _IOWR('B', 0x01, struct battery_params) /* SOC */
+#define BPIOCXOCV _IOWR('B', 0x02, struct battery_params) /* OCV */
+#define BPIOCXFCC _IOWR('B', 0x03, struct battery_params) /* FCC */
+#define BPIOCXSLOPE _IOWR('B', 0x04, struct battery_params) /* Slope */
+#define BPIOCXVAR _IOWR('B', 0x05, struct battery_params) /* All-other */
+
+#endif /* __QG_PROFILE_H__ */
diff --git a/include/uapi/linux/qg.h b/include/uapi/linux/qg.h
new file mode 100644
index 000000000000..8bd220fbc6a8
--- /dev/null
+++ b/include/uapi/linux/qg.h
@@ -0,0 +1,63 @@
+#ifndef __QG_H__
+#define __QG_H__
+
+#define MAX_FIFO_LENGTH 16
+
+enum qg {
+ QG_SOC,
+ QG_OCV_UV,
+ QG_RBAT_MOHM,
+ QG_PON_OCV_UV,
+ QG_GOOD_OCV_UV,
+ QG_ESR,
+ QG_CHARGE_COUNTER,
+ QG_FIFO_TIME_DELTA,
+ QG_BATT_SOC,
+ QG_CC_SOC,
+ QG_ESR_CHARGE_DELTA,
+ QG_ESR_DISCHARGE_DELTA,
+ QG_ESR_CHARGE_SF,
+ QG_ESR_DISCHARGE_SF,
+ QG_FULL_SOC,
+ QG_CLEAR_LEARNT_DATA,
+ QG_SYS_SOC,
+ QG_VBMS_IBAT,
+ QG_MAX,
+};
+
+#define QG_BATT_SOC QG_BATT_SOC
+#define QG_CC_SOC QG_CC_SOC
+#define QG_ESR_CHARGE_DELTA QG_ESR_CHARGE_DELTA
+#define QG_ESR_DISCHARGE_DELTA QG_ESR_DISCHARGE_DELTA
+#define QG_ESR_CHARGE_SF QG_ESR_CHARGE_SF
+#define QG_ESR_DISCHARGE_SF QG_ESR_DISCHARGE_SF
+#define QG_FULL_SOC QG_FULL_SOC
+#define QG_CLEAR_LEARNT_DATA QG_CLEAR_LEARNT_DATA
+#define QG_SYS_SOC QG_SYS_SOC
+#define QG_VBMS_IBAT QG_VBMS_IBAT
+
+struct fifo_data {
+ unsigned int v;
+ unsigned int i;
+ unsigned int count;
+ unsigned int interval;
+};
+
+struct qg_param {
+ unsigned int data;
+ bool valid;
+};
+
+struct qg_kernel_data {
+ unsigned int seq_no;
+ unsigned int fifo_time;
+ unsigned int fifo_length;
+ struct fifo_data fifo[MAX_FIFO_LENGTH];
+ struct qg_param param[QG_MAX];
+};
+
+struct qg_user_data {
+ struct qg_param param[QG_MAX];
+};
+
+#endif