Loading Documentation/devicetree/bindings/regulator/cpr4-apss-regulator.txt +4 −6 Original line number Diff line number Diff line Loading @@ -41,15 +41,14 @@ APSS specific properties: - interrupts Usage: required Value type: <prop-encoded-array> Definition: CPR interrupt specifier and a hardware closed-loop ceiling interrupt specifier. Definition: CPR interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. "cpr" and "ceiling" must be specified. must be specified. - qcom,apm-ctrl Usage: required on systems that need APM management Loading Loading @@ -377,9 +376,8 @@ apc_cpr: cpr4-ctrl@b018000 { compatible = "qcom,cpr4-msm8953-apss-regulator"; reg = <0xb018000 0x4000>, <0xa4000 0x1000>; reg-names = "cpr_ctrl", "fuse_base"; interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 282 IRQ_TYPE_EDGE_RISING>; interrupt-names = "cpr", "ceiling"; interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>; interrupt-names = "cpr"; qcom,cpr-ctrl-name = "apc"; Loading drivers/regulator/cpr3-regulator.c +21 −12 Original line number Diff line number Diff line Loading @@ -1481,12 +1481,15 @@ static int cpr3_regulator_init_ctrl(struct cpr3_controller *ctrl) return rc; } if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { rc = msm_spm_avs_enable_irq(0, MSM_SPM_AVS_IRQ_MAX); if (rc) { cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n", rc); cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n", rc); return rc; } } } if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) { rc = cpr3_regulator_init_cpr4(ctrl); Loading Loading @@ -5846,12 +5849,15 @@ int cpr3_regulator_register(struct platform_device *pdev, return rc; } ctrl->ceiling_irq = platform_get_irq_byname(pdev, "ceiling"); if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { ctrl->ceiling_irq = platform_get_irq_byname(pdev, "ceiling"); if (ctrl->ceiling_irq < 0) { cpr3_err(ctrl, "missing ceiling interrupt\n"); return ctrl->ceiling_irq; } } } if (ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { rc = cpr3_regulator_init_ctrl_data(ctrl); Loading Loading @@ -5913,7 +5919,7 @@ int cpr3_regulator_register(struct platform_device *pdev, } if (ctrl->supports_hw_closed_loop && ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { rc = devm_request_threaded_irq(dev, ctrl->ceiling_irq, NULL, cpr3_ceiling_irq_handler, IRQF_ONESHOT | IRQF_TRIGGER_RISING, Loading Loading @@ -5967,9 +5973,12 @@ int cpr3_regulator_unregister(struct cpr3_controller *ctrl) cpr3_closed_loop_disable(ctrl); if (ctrl->use_hw_closed_loop || ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) { if ((ctrl->use_hw_closed_loop || ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) && ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { regulator_disable(ctrl->vdd_limit_regulator); if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) msm_spm_avs_disable_irq(0, MSM_SPM_AVS_IRQ_MAX); } Loading Loading
Documentation/devicetree/bindings/regulator/cpr4-apss-regulator.txt +4 −6 Original line number Diff line number Diff line Loading @@ -41,15 +41,14 @@ APSS specific properties: - interrupts Usage: required Value type: <prop-encoded-array> Definition: CPR interrupt specifier and a hardware closed-loop ceiling interrupt specifier. Definition: CPR interrupt specifier. - interrupt-names Usage: required Value type: <stringlist> Definition: Interrupt names. This list must match up 1-to-1 with the interrupts specified in the 'interrupts' property. "cpr" and "ceiling" must be specified. must be specified. - qcom,apm-ctrl Usage: required on systems that need APM management Loading Loading @@ -377,9 +376,8 @@ apc_cpr: cpr4-ctrl@b018000 { compatible = "qcom,cpr4-msm8953-apss-regulator"; reg = <0xb018000 0x4000>, <0xa4000 0x1000>; reg-names = "cpr_ctrl", "fuse_base"; interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>, <GIC_SPI 282 IRQ_TYPE_EDGE_RISING>; interrupt-names = "cpr", "ceiling"; interrupts = <GIC_SPI 15 IRQ_TYPE_EDGE_RISING>; interrupt-names = "cpr"; qcom,cpr-ctrl-name = "apc"; Loading
drivers/regulator/cpr3-regulator.c +21 −12 Original line number Diff line number Diff line Loading @@ -1481,12 +1481,15 @@ static int cpr3_regulator_init_ctrl(struct cpr3_controller *ctrl) return rc; } if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { rc = msm_spm_avs_enable_irq(0, MSM_SPM_AVS_IRQ_MAX); if (rc) { cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n", rc); cpr3_err(ctrl, "could not enable max IRQ, rc=%d\n", rc); return rc; } } } if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) { rc = cpr3_regulator_init_cpr4(ctrl); Loading Loading @@ -5846,12 +5849,15 @@ int cpr3_regulator_register(struct platform_device *pdev, return rc; } ctrl->ceiling_irq = platform_get_irq_byname(pdev, "ceiling"); if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { ctrl->ceiling_irq = platform_get_irq_byname(pdev, "ceiling"); if (ctrl->ceiling_irq < 0) { cpr3_err(ctrl, "missing ceiling interrupt\n"); return ctrl->ceiling_irq; } } } if (ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { rc = cpr3_regulator_init_ctrl_data(ctrl); Loading Loading @@ -5913,7 +5919,7 @@ int cpr3_regulator_register(struct platform_device *pdev, } if (ctrl->supports_hw_closed_loop && ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) { rc = devm_request_threaded_irq(dev, ctrl->ceiling_irq, NULL, cpr3_ceiling_irq_handler, IRQF_ONESHOT | IRQF_TRIGGER_RISING, Loading Loading @@ -5967,9 +5973,12 @@ int cpr3_regulator_unregister(struct cpr3_controller *ctrl) cpr3_closed_loop_disable(ctrl); if (ctrl->use_hw_closed_loop || ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) { if ((ctrl->use_hw_closed_loop || ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4) && ctrl->ctrl_type != CPR_CTRL_TYPE_CPRH) { regulator_disable(ctrl->vdd_limit_regulator); if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR3) msm_spm_avs_disable_irq(0, MSM_SPM_AVS_IRQ_MAX); } Loading