Loading Documentation/devicetree/bindings/regulator/cpr3-regulator.txt +7 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,13 @@ Platform independent properties: Definition: Value required in the masked off "aging_allowed" register bits in order for a CPR aging measurement to be possible. - qcom,cpr-ignore-invalid-fuses Usage: optional Value type: <empty> Definition: Boolean flag which indicates that software should ignore invalid fuse values. This should only be used on simulator targets in which fuses are not initialized. - qcom,cpr-panic-reg-addr-list Usage: optional Value type: <prop-encoded-array> Loading drivers/regulator/cpr3-regulator.c +8 −0 Original line number Diff line number Diff line Loading @@ -1115,6 +1115,14 @@ static int cpr3_regulator_init_cprh_corners(struct cpr3_regulator *vreg) * select RO 0 arbitrarily. */ ro_sel = 0; } else if (ctrl->ignore_invalid_fuses) { /* * Fuses are not initialized on some simulator * targets. Select RO 0 arbitrarily. */ cpr3_debug(vreg, "ignored that corner=%d has invalid RO select value\n", i); ro_sel = 0; } else { cpr3_err(vreg, "corner=%d has invalid RO select value\n", i); Loading drivers/regulator/cpr3-regulator.h +5 −0 Original line number Diff line number Diff line Loading @@ -702,6 +702,9 @@ struct cpr3_panic_regs_info { * @aging_possible_val: Optional value that the masked aging_possible_reg * register must have in order for a CPR aging measurement * to be possible. * @ignore_invalid_fuses: Flag which indicates that invalid fuse parameter * values should be ignored. This is used on simulator * targets which do not initialize fuse parameters. * @step_quot_fixed: Fixed step quotient value used for target quotient * adjustment if use_dynamic_step_quot is not set. * This parameter is only relevant for CPR4 controllers Loading Loading @@ -822,6 +825,8 @@ struct cpr3_controller { u32 aging_possible_mask; u32 aging_possible_val; bool ignore_invalid_fuses; u32 step_quot_fixed; u32 initial_temp_band; bool use_dynamic_step_quot; Loading drivers/regulator/cpr3-util.c +3 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,9 @@ int cpr3_parse_common_ctrl_data(struct cpr3_controller *ctrl) if (rc) return rc; ctrl->ignore_invalid_fuses = of_property_read_bool(ctrl->dev->of_node, "qcom,cpr-ignore-invalid-fuses"); /* Aging reference voltage is optional */ ctrl->aging_ref_volt = 0; of_property_read_u32(ctrl->dev->of_node, "qcom,cpr-aging-ref-voltage", Loading Loading
Documentation/devicetree/bindings/regulator/cpr3-regulator.txt +7 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,13 @@ Platform independent properties: Definition: Value required in the masked off "aging_allowed" register bits in order for a CPR aging measurement to be possible. - qcom,cpr-ignore-invalid-fuses Usage: optional Value type: <empty> Definition: Boolean flag which indicates that software should ignore invalid fuse values. This should only be used on simulator targets in which fuses are not initialized. - qcom,cpr-panic-reg-addr-list Usage: optional Value type: <prop-encoded-array> Loading
drivers/regulator/cpr3-regulator.c +8 −0 Original line number Diff line number Diff line Loading @@ -1115,6 +1115,14 @@ static int cpr3_regulator_init_cprh_corners(struct cpr3_regulator *vreg) * select RO 0 arbitrarily. */ ro_sel = 0; } else if (ctrl->ignore_invalid_fuses) { /* * Fuses are not initialized on some simulator * targets. Select RO 0 arbitrarily. */ cpr3_debug(vreg, "ignored that corner=%d has invalid RO select value\n", i); ro_sel = 0; } else { cpr3_err(vreg, "corner=%d has invalid RO select value\n", i); Loading
drivers/regulator/cpr3-regulator.h +5 −0 Original line number Diff line number Diff line Loading @@ -702,6 +702,9 @@ struct cpr3_panic_regs_info { * @aging_possible_val: Optional value that the masked aging_possible_reg * register must have in order for a CPR aging measurement * to be possible. * @ignore_invalid_fuses: Flag which indicates that invalid fuse parameter * values should be ignored. This is used on simulator * targets which do not initialize fuse parameters. * @step_quot_fixed: Fixed step quotient value used for target quotient * adjustment if use_dynamic_step_quot is not set. * This parameter is only relevant for CPR4 controllers Loading Loading @@ -822,6 +825,8 @@ struct cpr3_controller { u32 aging_possible_mask; u32 aging_possible_val; bool ignore_invalid_fuses; u32 step_quot_fixed; u32 initial_temp_band; bool use_dynamic_step_quot; Loading
drivers/regulator/cpr3-util.c +3 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,9 @@ int cpr3_parse_common_ctrl_data(struct cpr3_controller *ctrl) if (rc) return rc; ctrl->ignore_invalid_fuses = of_property_read_bool(ctrl->dev->of_node, "qcom,cpr-ignore-invalid-fuses"); /* Aging reference voltage is optional */ ctrl->aging_ref_volt = 0; of_property_read_u32(ctrl->dev->of_node, "qcom,cpr-aging-ref-voltage", Loading