Lines Matching refs:regul

627 	const struct regul_struct *regul = get_regulator_data(name);  in voltage_to_index()  local
630 for (i = 0 ; i < regul->voltage_table_size ; i++) { in voltage_to_index()
631 if (regul->voltage_table[i] == millivolts) { in voltage_to_index()
656 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_enable() local
658 return stpmic1_register_update(regul->control_reg, regul->enable_mask, in stpmic1_regulator_enable()
659 regul->enable_mask); in stpmic1_regulator_enable()
664 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_disable() local
666 return stpmic1_register_update(regul->control_reg, 0, in stpmic1_regulator_disable()
667 regul->enable_mask); in stpmic1_regulator_disable()
673 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_is_regulator_enabled() local
675 if (stpmic1_register_read(regul->control_reg, &val) != 0) { in stpmic1_is_regulator_enabled()
679 return (val & regul->enable_mask) == regul->enable_mask; in stpmic1_is_regulator_enabled()
685 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_voltage_set() local
708 return stpmic1_register_update(regul->control_reg, in stpmic1_regulator_voltage_set()
715 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_pull_down_set() local
717 if (regul->pull_down_reg != 0) { in stpmic1_regulator_pull_down_set()
718 return stpmic1_register_update(regul->pull_down_reg, in stpmic1_regulator_pull_down_set()
719 BIT(regul->pull_down), in stpmic1_regulator_pull_down_set()
721 regul->pull_down); in stpmic1_regulator_pull_down_set()
729 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_mask_reset_set() local
731 if (regul->mask_reset_reg == 0U) { in stpmic1_regulator_mask_reset_set()
735 return stpmic1_register_update(regul->mask_reset_reg, in stpmic1_regulator_mask_reset_set()
736 BIT(regul->mask_reset), in stpmic1_regulator_mask_reset_set()
738 regul->mask_reset); in stpmic1_regulator_mask_reset_set()
743 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_icc_set() local
745 if (regul->mask_reset_reg == 0U) { in stpmic1_regulator_icc_set()
749 return stpmic1_register_update(regul->icc_reg, in stpmic1_regulator_icc_set()
750 BIT(regul->icc_mask), in stpmic1_regulator_icc_set()
751 BIT(regul->icc_mask)); in stpmic1_regulator_icc_set()
802 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_levels_mv() local
808 *levels_count = regul->voltage_table_size; in stpmic1_regulator_levels_mv()
809 *levels = regul->voltage_table; in stpmic1_regulator_levels_mv()
817 const struct regul_struct *regul = get_regulator_data(name); in stpmic1_regulator_voltage_get() local
836 status = stpmic1_register_read(regul->control_reg, &value); in stpmic1_regulator_voltage_get()
843 if (value > regul->voltage_table_size) { in stpmic1_regulator_voltage_get()
847 return (int)regul->voltage_table[value]; in stpmic1_regulator_voltage_get()