Loading Documentation/devicetree/bindings/regulator/qpnp-lcdb-regulator.txt +7 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,13 @@ First Level Node - LCDB module Value type: <prop-encoded-array> Definition: Base address of the LCDB SPMI peripheral. - qcom,force-module-reenable Usage: required if using SW mode for module enable Value type: <bool> Definition: This enables the workaround to force enable the vph_pwr_2p5_ok signal required for turning on the LCDB module. Touch-to-wake (TTW) properties: TTW supports 2 modes of operation - HW and SW. In the HW mode the enable/disable Loading Loading @@ -59,7 +66,6 @@ main node. Definition: ON time (in mS) for the VDISP/VDISN signals. Possible values are 4, 8, 16, 32. ======================================== Second Level Nodes - LDO/NCP/BOOST block ======================================== Loading arch/arm/boot/dts/qcom/msm-pm660l.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,7 @@ #address-cells = <1>; #size-cells = <1>; reg = <0xec00 0x100>; qcom,force-module-reenable; lcdb_ldo_vreg: ldo { label = "ldo"; Loading drivers/regulator/qpnp-lcdb-regulator.c +23 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,9 @@ struct qpnp_lcdb { bool ttw_enable; bool ttw_mode_sw; /* top level DT params */ bool force_module_reenable; /* status parameters */ bool lcdb_enabled; bool settings_saved; Loading Loading @@ -588,6 +591,23 @@ static int qpnp_lcdb_enable(struct qpnp_lcdb *lcdb) goto fail_enable; } if (lcdb->force_module_reenable) { val = 0; rc = qpnp_lcdb_write(lcdb, lcdb->base + LCDB_ENABLE_CTL1_REG, &val, 1); if (rc < 0) { pr_err("Failed to enable lcdb rc= %d\n", rc); goto fail_enable; } val = MODULE_EN_BIT; rc = qpnp_lcdb_write(lcdb, lcdb->base + LCDB_ENABLE_CTL1_REG, &val, 1); if (rc < 0) { pr_err("Failed to disable lcdb rc= %d\n", rc); goto fail_enable; } } /* poll for vreg_ok */ timeout = 10; delay = lcdb->bst.soft_start_us + lcdb->ldo.soft_start_us + Loading Loading @@ -1590,6 +1610,9 @@ static int qpnp_lcdb_parse_dt(struct qpnp_lcdb *lcdb) } } lcdb->force_module_reenable = of_property_read_bool(node, "qcom,force-module-reenable"); if (of_property_read_bool(node, "qcom,ttw-enable")) { rc = qpnp_lcdb_parse_ttw(lcdb); if (rc < 0) { Loading Loading
Documentation/devicetree/bindings/regulator/qpnp-lcdb-regulator.txt +7 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,13 @@ First Level Node - LCDB module Value type: <prop-encoded-array> Definition: Base address of the LCDB SPMI peripheral. - qcom,force-module-reenable Usage: required if using SW mode for module enable Value type: <bool> Definition: This enables the workaround to force enable the vph_pwr_2p5_ok signal required for turning on the LCDB module. Touch-to-wake (TTW) properties: TTW supports 2 modes of operation - HW and SW. In the HW mode the enable/disable Loading Loading @@ -59,7 +66,6 @@ main node. Definition: ON time (in mS) for the VDISP/VDISN signals. Possible values are 4, 8, 16, 32. ======================================== Second Level Nodes - LDO/NCP/BOOST block ======================================== Loading
arch/arm/boot/dts/qcom/msm-pm660l.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,7 @@ #address-cells = <1>; #size-cells = <1>; reg = <0xec00 0x100>; qcom,force-module-reenable; lcdb_ldo_vreg: ldo { label = "ldo"; Loading
drivers/regulator/qpnp-lcdb-regulator.c +23 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,9 @@ struct qpnp_lcdb { bool ttw_enable; bool ttw_mode_sw; /* top level DT params */ bool force_module_reenable; /* status parameters */ bool lcdb_enabled; bool settings_saved; Loading Loading @@ -588,6 +591,23 @@ static int qpnp_lcdb_enable(struct qpnp_lcdb *lcdb) goto fail_enable; } if (lcdb->force_module_reenable) { val = 0; rc = qpnp_lcdb_write(lcdb, lcdb->base + LCDB_ENABLE_CTL1_REG, &val, 1); if (rc < 0) { pr_err("Failed to enable lcdb rc= %d\n", rc); goto fail_enable; } val = MODULE_EN_BIT; rc = qpnp_lcdb_write(lcdb, lcdb->base + LCDB_ENABLE_CTL1_REG, &val, 1); if (rc < 0) { pr_err("Failed to disable lcdb rc= %d\n", rc); goto fail_enable; } } /* poll for vreg_ok */ timeout = 10; delay = lcdb->bst.soft_start_us + lcdb->ldo.soft_start_us + Loading Loading @@ -1590,6 +1610,9 @@ static int qpnp_lcdb_parse_dt(struct qpnp_lcdb *lcdb) } } lcdb->force_module_reenable = of_property_read_bool(node, "qcom,force-module-reenable"); if (of_property_read_bool(node, "qcom,ttw-enable")) { rc = qpnp_lcdb_parse_ttw(lcdb); if (rc < 0) { Loading