Merge "diag: dci: Synchronize dci mempool buffers alloc and free"
diff --git a/arch/arm64/boot/dts/qcom/msm8909-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8909-mtp.dtsi
index 591d30d..adee5d9 100644
--- a/arch/arm64/boot/dts/qcom/msm8909-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8909-mtp.dtsi
@@ -193,39 +193,21 @@
"AMIC1", "MIC BIAS External",
"AMIC2", "MIC BIAS Internal2",
"AMIC3", "MIC BIAS External";
- qcom,msm-gpios =
- "pri_i2s",
- "us_eu_gpio";
- qcom,pinctrl-names =
- "all_off",
- "pri_i2s_act",
- "us_eu_gpio_act",
- "pri_i2s_us_eu_gpio_act";
- pinctrl-names =
- "all_off",
- "pri_i2s_act",
- "us_eu_gpio_act",
- "pri_i2s_us_eu_gpio_act";
- pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus
- &vdd_spkdrv_sus>;
- pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus
- &vdd_spkdrv_act>;
- pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act
- &vdd_spkdrv_sus>;
- pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act
- &vdd_spkdrv_act>;
qcom,cdc-us-euro-gpios = <&msm_gpio 97 0>;
+ qcom,cdc-us-eu-gpios = <&cdc_us_euro_sw>;
+ qcom,pri-mi2s-gpios = <&cdc_pri_mi2s_gpios>;
+
asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
<&loopback>, <&compress>, <&hostless>,
<&afe>, <&lsm>, <&routing>, <&lpa>,
- <&voice_svc>;
+ <&voice_svc>, <&pcm_noirq>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-pcm-dsp.2", "msm-voip-dsp",
"msm-pcm-voice", "msm-pcm-loopback",
"msm-compress-dsp", "msm-pcm-hostless",
"msm-pcm-afe", "msm-lsm-client",
"msm-pcm-routing", "msm-pcm-lpa",
- "msm-voice-svc";
+ "msm-voice-svc", "msm-pcm-dsp-noirq";
asoc-cpu = <&dai_pri_auxpcm>,
<&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>,
<&dai_mi2s3>, <&dai_mi2s4>, <&dai_mi2s5>,
@@ -245,8 +227,22 @@
"msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-dev.32770";
- asoc-codec = <&stub_codec>, <&pm8909_conga_dig>;
- asoc-codec-names = "msm-stub-codec.1", "cajon_codec";
+ asoc-codec = <&stub_codec>;
+ asoc-codec-names = "msm-stub-codec.1";
+ };
+
+ cdc_us_euro_sw: msm_cdc_pinctrl_us_euro_sw {
+ compatible = "qcom,msm-cdc-pinctrl";
+ pinctrl-names = "aud_active", "aud_sleep";
+ pinctrl-0 = <&cross_conn_det_act>;
+ pinctrl-1 = <&cross_conn_det_sus>;
+ };
+
+ cdc_pri_mi2s_gpios: msm_cdc_pinctrl_pri {
+ compatible = "qcom,msm-cdc-pinctrl";
+ pinctrl-names = "aud_active", "aud_sleep";
+ pinctrl-0 = <&cdc_pdm_lines_act>;
+ pinctrl-1 = <&cdc_pdm_lines_sus>;
};
};
diff --git a/arch/arm64/boot/dts/qcom/msm8909-pm8916-mtp.dtsi b/arch/arm64/boot/dts/qcom/msm8909-pm8916-mtp.dtsi
index 626172e..0fb9403 100644
--- a/arch/arm64/boot/dts/qcom/msm8909-pm8916-mtp.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8909-pm8916-mtp.dtsi
@@ -29,17 +29,85 @@
&audio_codec_mtp {
qcom,model = "msm8909-pm8916-snd-card";
- pinctrl-names =
- "all_off",
- "pri_i2s_act",
- "us_eu_gpio_act",
- "pri_i2s_us_eu_gpio_act";
- pinctrl-0 = <&cdc_pdm_lines_sus &cross_conn_det_sus>;
- pinctrl-1 = <&cdc_pdm_lines_act &cross_conn_det_sus>;
- pinctrl-2 = <&cdc_pdm_lines_sus &cross_conn_det_act>;
- pinctrl-3 = <&cdc_pdm_lines_act &cross_conn_det_act>;
- asoc-codec = <&stub_codec>, <&pm8916_tombak_dig>;
- asoc-codec-names = "msm-stub-codec.1", "cajon_codec";
+ asoc-codec = <&stub_codec>, <&msm_dig_codec>, <&pmic_anlg_codec>;
+ asoc-codec-names = "msm-stub-codec.1", "msm-dig-codec", "analog-codec";
+};
+
+
+&pm8916_1 {
+ pmic_anlg_codec: analog-codec@f100 {
+ status = "okay";
+ compatible = "qcom,pmic-analog-codec";
+ reg = <0xf000 0x200>;
+ #address-cells = <2>;
+ #size-cells = <0>;
+ interrupt-parent = <&spmi_bus>;
+ interrupts =
+ <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x2 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x3 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x4 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x5 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x6 IRQ_TYPE_NONE>,
+ <0x1 0xf0 0x7 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x0 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x1 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x2 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x3 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x4 IRQ_TYPE_NONE>,
+ <0x1 0xf1 0x5 IRQ_TYPE_NONE>;
+ interrupt-names =
+ "spk_cnp_int",
+ "spk_clip_int",
+ "spk_ocp_int",
+ "ins_rem_det1",
+ "but_rel_det",
+ "but_press_det",
+ "ins_rem_det",
+ "mbhc_int",
+ "ear_ocp_int",
+ "hphr_ocp_int",
+ "hphl_ocp_det",
+ "ear_cnp_int",
+ "hphr_cnp_int",
+ "hphl_cnp_int";
+
+ cdc-vdda-cp-supply = <&pm8916_s4>;
+ qcom,cdc-vdda-cp-voltage = <1800000 2200000>;
+ qcom,cdc-vdda-cp-current = <770000>;
+
+ cdc-vdda-h-supply = <&pm8916_l5>;
+ qcom,cdc-vdda-h-voltage = <1800000 1800000>;
+ qcom,cdc-vdda-h-current = <20000>;
+
+ cdc-vdd-px-supply = <&pm8916_s4>;
+ qcom,cdc-vdd-px-voltage = <1800000 2200000>;
+ qcom,cdc-vdd-px-current = <770000>;
+
+ cdc-vdd-pa-supply = <&pm8916_l5>;
+ qcom,cdc-vdd-pa-voltage = <1800000 1800000>;
+ qcom,cdc-vdd-pa-current = <5000>;
+
+ cdc-vdd-mic-bias-supply = <&pm8916_l13>;
+ qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>;
+ qcom,cdc-vdd-mic-bias-current = <25000>;
+
+ qcom,cdc-mclk-clk-rate = <9600000>;
+
+ qcom,cdc-static-supplies =
+ "cdc-vdda-h",
+ "cdc-vdd-px",
+ "cdc-vdd-pa",
+ "cdc-vdda-cp";
+
+ qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias";
+
+ msm_dig_codec: msm-dig-codec@f000 {
+ compatible = "qcom,msm-digital-codec";
+ reg = <0x771c000 0x100>;
+ };
+ };
};
&sdhc_1 {
diff --git a/arch/arm64/boot/dts/qcom/sdm429-spyro.dtsi b/arch/arm64/boot/dts/qcom/sdm429-spyro.dtsi
index d993dc2..d83cc5f 100644
--- a/arch/arm64/boot/dts/qcom/sdm429-spyro.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm429-spyro.dtsi
@@ -48,3 +48,7 @@
};
};
};
+
+&usb_otg {
+ qcom,enumeration-check-for-sdp;
+};
diff --git a/drivers/media/platform/msm/camera_v3/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c b/drivers/media/platform/msm/camera_v3/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c
index 91e1e74..d8fd9e0 100644
--- a/drivers/media/platform/msm/camera_v3/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c
+++ b/drivers/media/platform/msm/camera_v3/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2020, 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
@@ -1803,18 +1803,36 @@
static int cam_ife_mgr_check_and_update_fe(
struct cam_ife_hw_mgr_ctx *ife_ctx,
- struct cam_isp_acquire_hw_info *acquire_hw_info)
+ struct cam_isp_acquire_hw_info *acquire_hw_info,
+ uint32_t acquire_info_size)
{
int i;
struct cam_isp_in_port_info *in_port = NULL;
uint32_t in_port_length = 0;
uint32_t total_in_port_length = 0;
+ if (acquire_hw_info->input_info_offset >=
+ acquire_hw_info->input_info_size) {
+ CAM_ERR(CAM_ISP,
+ "Invalid size offset 0x%x is greater then size 0x%x",
+ acquire_hw_info->input_info_offset,
+ acquire_hw_info->input_info_size);
+ return -EINVAL;
+ }
+
in_port = (struct cam_isp_in_port_info *)
((uint8_t *)&acquire_hw_info->data +
acquire_hw_info->input_info_offset);
for (i = 0; i < acquire_hw_info->num_inputs; i++) {
+ if (((uint8_t *)in_port +
+ sizeof(struct cam_isp_in_port_info)) >
+ ((uint8_t *)acquire_hw_info +
+ acquire_info_size)) {
+ CAM_ERR(CAM_ISP, "Invalid size");
+ return -EINVAL;
+ }
+
if ((in_port->num_out_res > CAM_IFE_HW_OUT_RES_MAX) ||
(in_port->num_out_res <= 0)) {
CAM_ERR(CAM_ISP, "Invalid num output res %u",
@@ -2074,7 +2092,8 @@
acquire_hw_info =
(struct cam_isp_acquire_hw_info *)acquire_args->acquire_info;
- rc = cam_ife_mgr_check_and_update_fe(ife_ctx, acquire_hw_info);
+ rc = cam_ife_mgr_check_and_update_fe(ife_ctx, acquire_hw_info,
+ acquire_args->acquire_info_size);
if (rc) {
CAM_ERR(CAM_ISP, "buffer size is not enough");
goto free_cdm;
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 1a7ebc5..625e44d 100755
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1496,6 +1496,8 @@
usb_ep_autoconfig_reset(cdev->gadget);
spin_lock_irqsave(&gi->spinlock, flags);
cdev->gadget = NULL;
+ cdev->deactivations = 0;
+ gadget->deactivated = false;
set_gadget_data(gadget, NULL);
spin_unlock_irqrestore(&gi->spinlock, flags);
}