Loading Documentation/devicetree/bindings/regulator/qpnp-oledb-regulator.txt +0 −7 Original line number Diff line number Diff line Loading @@ -62,13 +62,6 @@ Required Node Structure rail. This property is applicable only if qcom,ext-pin-ctl property is specified and it is specific to PM660A. - qcom,force-pd-control Usage: optional Value type: <bool> Definition: Used to enable the pull down control forcibly via SPMI by disabling the pull down configuration done by hardware automatically through SWIRE pulses. - qcom,pbs-client Usage: optional Value type: <phandle> Loading arch/arm/boot/dts/qcom/msm-pm660l.dtsi +3 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ #size-cells = <1>; qcom,pmic-revid = <&pm660l_revid>; reg = <0xe000 0x100>; qcom,pbs-client = <&pm660l_pbs>; label = "oledb"; regulator-name = "regulator-oledb"; Loading Loading @@ -464,6 +465,8 @@ qcom,qpnp-lab-slew-rate = <5000>; qcom,qpnp-lab-init-voltage = <4600000>; qcom,qpnp-lab-init-amoled-voltage = <4600000>; qcom,notify-lab-vreg-ok-sts; }; }; }; Loading drivers/regulator/qpnp-oledb-regulator.c +18 −12 Original line number Diff line number Diff line Loading @@ -377,12 +377,19 @@ static int qpnp_oledb_regulator_disable(struct regulator_dev *rdev) } if (val & OLEDB_FORCE_PD_CTL_SPARE_BIT) { rc = qpnp_pbs_trigger_event(oledb->pbs_dev_node, trigger_bitmap); rc = qpnp_oledb_sec_masked_write(oledb, oledb->base + OLEDB_SPARE_CTL, OLEDB_FORCE_PD_CTL_SPARE_BIT, 0); if (rc < 0) { pr_err("Failed to trigger the PBS sequence\n"); pr_err("Failed to write SPARE_CTL rc=%d\n", rc); return rc; } rc = qpnp_pbs_trigger_event(oledb->pbs_dev_node, trigger_bitmap); if (rc < 0) pr_err("Failed to trigger the PBS sequence\n"); pr_debug("PBS event triggered\n"); } else { pr_debug("OLEDB_SPARE_CTL register bit not set\n"); Loading Loading @@ -1123,8 +1130,14 @@ static int qpnp_oledb_parse_dt(struct qpnp_oledb *oledb) oledb->pbs_control = of_property_read_bool(of_node, "qcom,pbs-control"); oledb->force_pd_control = of_property_read_bool(of_node, "qcom,force-pd-control"); /* Use the force_pd_control only for PM660A versions <= v2.0 */ if (oledb->pmic_rev_id->pmic_subtype == PM660L_SUBTYPE && oledb->pmic_rev_id->rev4 <= PM660L_V2P0_REV4) { if (!(oledb->pmic_rev_id->rev4 == PM660L_V2P0_REV4 && oledb->pmic_rev_id->rev2 > PM660L_V2P0_REV2)) { oledb->force_pd_control = true; } } if (oledb->force_pd_control) { oledb->pbs_dev_node = of_parse_phandle(of_node, Loading Loading @@ -1222,13 +1235,6 @@ static int qpnp_oledb_force_pulldown_config(struct qpnp_oledb *oledb) int rc = 0; u8 val; rc = qpnp_oledb_sec_masked_write(oledb, oledb->base + OLEDB_SPARE_CTL, OLEDB_FORCE_PD_CTL_SPARE_BIT, 0); if (rc < 0) { pr_err("Failed to write SPARE_CTL rc=%d\n", rc); return rc; } val = 1; rc = qpnp_oledb_write(oledb, oledb->base + OLEDB_PD_CTL, &val, 1); Loading include/linux/qpnp/qpnp-revid.h +5 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,11 @@ #define PM660L_V1P1_REV3 0x01 #define PM660L_V1P1_REV4 0x01 #define PM660L_V2P0_REV1 0x00 #define PM660L_V2P0_REV2 0x00 #define PM660L_V2P0_REV3 0x00 #define PM660L_V2P0_REV4 0x02 /* PMI8998 FAB_ID */ #define PMI8998_FAB_ID_SMIC 0x11 #define PMI8998_FAB_ID_GF 0x30 Loading Loading
Documentation/devicetree/bindings/regulator/qpnp-oledb-regulator.txt +0 −7 Original line number Diff line number Diff line Loading @@ -62,13 +62,6 @@ Required Node Structure rail. This property is applicable only if qcom,ext-pin-ctl property is specified and it is specific to PM660A. - qcom,force-pd-control Usage: optional Value type: <bool> Definition: Used to enable the pull down control forcibly via SPMI by disabling the pull down configuration done by hardware automatically through SWIRE pulses. - qcom,pbs-client Usage: optional Value type: <phandle> Loading
arch/arm/boot/dts/qcom/msm-pm660l.dtsi +3 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,7 @@ #size-cells = <1>; qcom,pmic-revid = <&pm660l_revid>; reg = <0xe000 0x100>; qcom,pbs-client = <&pm660l_pbs>; label = "oledb"; regulator-name = "regulator-oledb"; Loading Loading @@ -464,6 +465,8 @@ qcom,qpnp-lab-slew-rate = <5000>; qcom,qpnp-lab-init-voltage = <4600000>; qcom,qpnp-lab-init-amoled-voltage = <4600000>; qcom,notify-lab-vreg-ok-sts; }; }; }; Loading
drivers/regulator/qpnp-oledb-regulator.c +18 −12 Original line number Diff line number Diff line Loading @@ -377,12 +377,19 @@ static int qpnp_oledb_regulator_disable(struct regulator_dev *rdev) } if (val & OLEDB_FORCE_PD_CTL_SPARE_BIT) { rc = qpnp_pbs_trigger_event(oledb->pbs_dev_node, trigger_bitmap); rc = qpnp_oledb_sec_masked_write(oledb, oledb->base + OLEDB_SPARE_CTL, OLEDB_FORCE_PD_CTL_SPARE_BIT, 0); if (rc < 0) { pr_err("Failed to trigger the PBS sequence\n"); pr_err("Failed to write SPARE_CTL rc=%d\n", rc); return rc; } rc = qpnp_pbs_trigger_event(oledb->pbs_dev_node, trigger_bitmap); if (rc < 0) pr_err("Failed to trigger the PBS sequence\n"); pr_debug("PBS event triggered\n"); } else { pr_debug("OLEDB_SPARE_CTL register bit not set\n"); Loading Loading @@ -1123,8 +1130,14 @@ static int qpnp_oledb_parse_dt(struct qpnp_oledb *oledb) oledb->pbs_control = of_property_read_bool(of_node, "qcom,pbs-control"); oledb->force_pd_control = of_property_read_bool(of_node, "qcom,force-pd-control"); /* Use the force_pd_control only for PM660A versions <= v2.0 */ if (oledb->pmic_rev_id->pmic_subtype == PM660L_SUBTYPE && oledb->pmic_rev_id->rev4 <= PM660L_V2P0_REV4) { if (!(oledb->pmic_rev_id->rev4 == PM660L_V2P0_REV4 && oledb->pmic_rev_id->rev2 > PM660L_V2P0_REV2)) { oledb->force_pd_control = true; } } if (oledb->force_pd_control) { oledb->pbs_dev_node = of_parse_phandle(of_node, Loading Loading @@ -1222,13 +1235,6 @@ static int qpnp_oledb_force_pulldown_config(struct qpnp_oledb *oledb) int rc = 0; u8 val; rc = qpnp_oledb_sec_masked_write(oledb, oledb->base + OLEDB_SPARE_CTL, OLEDB_FORCE_PD_CTL_SPARE_BIT, 0); if (rc < 0) { pr_err("Failed to write SPARE_CTL rc=%d\n", rc); return rc; } val = 1; rc = qpnp_oledb_write(oledb, oledb->base + OLEDB_PD_CTL, &val, 1); Loading
include/linux/qpnp/qpnp-revid.h +5 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,11 @@ #define PM660L_V1P1_REV3 0x01 #define PM660L_V1P1_REV4 0x01 #define PM660L_V2P0_REV1 0x00 #define PM660L_V2P0_REV2 0x00 #define PM660L_V2P0_REV3 0x00 #define PM660L_V2P0_REV4 0x02 /* PMI8998 FAB_ID */ #define PMI8998_FAB_ID_SMIC 0x11 #define PMI8998_FAB_ID_GF 0x30 Loading