dtb-$(CONFIG_MSM_GVM_QUIN) += vplatform-lfv-msm8996-telematics.dtb \
vplatform-lfv-msm8996-ivi.dtb \
+ vplatform-lfv-msm8996-baseline.dtb \
vplatform-lfv-msm8996-ivi-la.dtb
ifeq ($(CONFIG_BUILD_ARM64_DT_OVERLAY),y)
-/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2018, 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
qcom,battery-thermal-coefficients = [9d 50 ff];
};
+&pm660_haptics {
+ qcom,wave-play-rate-us = <4255>;
+ qcom,vmax-mv = <1800>;
+};
+
&i2c_2 {
status = "ok";
smb1351_charger: smb1351-charger@1d {
--- /dev/null
+/* Copyright (c) 2018, 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 "skeleton64.dtsi"
+
+/ {
+ model = "Qualcomm Technologies, Inc. MSM 8996";
+ compatible = "qcom,msm8996";
+ qcom,msm-id = <246 0x0>;
+
+ psci {
+ compatible = "arm,psci-1.0";
+ method = "smc";
+ };
+
+ soc: soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ virtual-interrupt-parent = "gic";
+ ranges = <0 0 0 0xffffffff>;
+ compatible = "simple-bus";
+
+ qcom,mpm2-sleep-counter@4a3000 {
+ compatible = "qcom,mpm2-sleep-counter";
+ reg = <0x004a3000 0x1000>;
+ clock-frequency = <32768>;
+ };
+
+ qcom,msm-imem@66bf000 {
+ compatible = "qcom,msm-imem";
+ reg = <0x66bf000 0x1000>; /* Address and size of IMEM */
+ ranges = <0x0 0x66bf000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ boot_stats@6b0 {
+ compatible = "qcom,msm-imem-boot_stats";
+ reg = <0x6b0 32>;
+ };
+ };
+ };
+};
qcom,core-clk-rate = <120000000>;
- resets = <&clock_gcc USB_30_BCR>;
+ resets = <&clock_virt USB_30_BCR>;
reset-names = "core_reset";
dwc3@6a00000 {
<87 512 0 0>,
<87 512 60000 960000>;
- clocks = <&clock_gcc clk_gcc_usb20_master_clk>,
- <&clock_gcc clk_gcc_periph_noc_usb20_ahb_clk>,
- <&clock_gcc clk_gcc_usb20_mock_utmi_clk>,
- <&clock_gcc clk_gcc_usb20_sleep_clk>,
+ clocks = <&clock_virt clk_gcc_usb20_master_clk>,
+ <&clock_virt clk_gcc_periph_noc_usb20_ahb_clk>,
+ <&clock_virt clk_gcc_usb20_mock_utmi_clk>,
+ <&clock_virt clk_gcc_usb20_sleep_clk>,
<&clock_gcc clk_cxo_dwc3_clk>,
- <&clock_gcc clk_gcc_usb_phy_cfg_ahb2phy_clk>;
+ <&clock_virt clk_gcc_usb_phy_cfg_ahb2phy_clk>;
clock-names = "core_clk", "iface_clk", "utmi_clk", "sleep_clk",
"xo", "cfg_ahb_clk";
qcom,core-clk-rate = <60000000>;
- resets = <&clock_gcc USB_20_BCR>;
+ resets = <&clock_virt USB_20_BCR>;
reset-names = "core_reset";
qcom,disable-host-mode-pm;
<&clock_gcc clk_ln_bb_clk>;
clock-names = "cfg_ahb_clk", "ref_clk_src";
- resets = <&clock_gcc QUSB2PHY_PRIM_BCR>;
+ resets = <&clock_virt QUSB2PHY_PRIM_BCR>;
reset-names = "phy_reset";
};
qcom,major-rev = <1>;
qcom,hold-reset;
- clocks = <&clock_gcc clk_gcc_usb_phy_cfg_ahb2phy_clk>,
+ clocks = <&clock_virt clk_gcc_usb_phy_cfg_ahb2phy_clk>,
<&clock_gcc clk_ln_bb_clk>;
clock-names = "cfg_ahb_clk", "ref_clk_src";
- resets = <&clock_gcc QUSB2PHY_SEC_BCR>;
+ resets = <&clock_virt QUSB2PHY_SEC_BCR>;
reset-names = "phy_reset";
};
clock-names = "aux_clk", "pipe_clk", "cfg_ahb_clk",
"ref_clk_src", "ref_clk";
- resets = <&clock_gcc USB3_PHY_BCR>,
- <&clock_gcc USB3PHY_PHY_BCR>;
+ resets = <&clock_virt USB3_PHY_BCR>,
+ <&clock_virt USB3PHY_PHY_BCR>;
reset-names = "phy_reset", "phy_phy_reset";
qcom,disable-autonomous-mode;
};
-/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2017-2018, 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
clock_virt: qcom,virtclk-frontend@0 {
compatible = "qcom,virtclk-frontend-8996";
#clock-cells = <1>;
+ #reset-cells = <1>;
};
clock_gcc: qcom,gcc@300000 {
-/* Copyright (c) 2014-2015, 2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2018, 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
{
struct qpnp_hap *hap = container_of(dev, struct qpnp_hap,
timed_dev);
+ bool state = !!time_ms;
+ ktime_t rem;
int rc;
if (time_ms < 0)
mutex_lock(&hap->lock);
- if (time_ms == 0) {
- /* disable haptics */
- hrtimer_cancel(&hap->hap_timer);
- hap->state = 0;
- schedule_work(&hap->work);
+ if (hap->state == state) {
+ if (state) {
+ rem = hrtimer_get_remaining(&hap->hap_timer);
+ if (time_ms > ktime_to_ms(rem)) {
+ time_ms = (time_ms > hap->timeout_ms ?
+ hap->timeout_ms : time_ms);
+ hrtimer_cancel(&hap->hap_timer);
+ hap->play_time_ms = time_ms;
+ hrtimer_start(&hap->hap_timer,
+ ktime_set(time_ms / 1000,
+ (time_ms % 1000) * 1000000),
+ HRTIMER_MODE_REL);
+ }
+ }
mutex_unlock(&hap->lock);
return;
}
- if (time_ms < 10)
- time_ms = 10;
-
- if (is_sw_lra_auto_resonance_control(hap))
- hrtimer_cancel(&hap->auto_res_err_poll_timer);
-
- hrtimer_cancel(&hap->hap_timer);
+ hap->state = state;
+ if (!hap->state) {
+ hrtimer_cancel(&hap->hap_timer);
+ } else {
+ if (time_ms < 10)
+ time_ms = 10;
- if (hap->auto_mode) {
- rc = qpnp_hap_auto_mode_config(hap, time_ms);
- if (rc < 0) {
- pr_err("Unable to do auto mode config\n");
- mutex_unlock(&hap->lock);
- return;
+ if (hap->auto_mode) {
+ rc = qpnp_hap_auto_mode_config(hap, time_ms);
+ if (rc < 0) {
+ pr_err("Unable to do auto mode config\n");
+ mutex_unlock(&hap->lock);
+ return;
+ }
}
+
+ time_ms = (time_ms > hap->timeout_ms ?
+ hap->timeout_ms : time_ms);
+ hap->play_time_ms = time_ms;
+ hrtimer_start(&hap->hap_timer,
+ ktime_set(time_ms / 1000,
+ (time_ms % 1000) * 1000000),
+ HRTIMER_MODE_REL);
}
- time_ms = (time_ms > hap->timeout_ms ? hap->timeout_ms : time_ms);
- hap->play_time_ms = time_ms;
- hap->state = 1;
- hrtimer_start(&hap->hap_timer,
- ktime_set(time_ms / 1000, (time_ms % 1000) * 1000000),
- HRTIMER_MODE_REL);
mutex_unlock(&hap->lock);
schedule_work(&hap->work);
}