Lines Matching refs:reg
31 int axp_clrsetbits(uint8_t reg, uint8_t clr_mask, uint8_t set_mask) in axp_clrsetbits() argument
36 ret = axp_read(reg); in axp_clrsetbits()
42 return axp_write(reg, val); in axp_clrsetbits()
77 const struct axp_regulator *reg) in setup_regulator() argument
83 if (mvolt < reg->min_volt || mvolt > reg->max_volt) in setup_regulator()
86 val = (mvolt / reg->step) - (reg->min_volt / reg->step); in setup_regulator()
87 if (val > reg->split) in setup_regulator()
88 val = ((val - reg->split) / 2) + reg->split; in setup_regulator()
90 axp_write(reg->volt_reg, val); in setup_regulator()
91 axp_setbits(reg->switch_reg, BIT(reg->switch_bit)); in setup_regulator()
93 INFO("PMIC: %s voltage: %d.%03dV\n", reg->dt_name, in setup_regulator()
174 const struct axp_regulator *reg; in axp_setup_regulators() local
191 for (reg = axp_regulators; reg->dt_name; reg++) { in axp_setup_regulators()
192 if (!strncmp(name, reg->dt_name, length)) { in axp_setup_regulators()
193 setup_regulator(fdt, node, reg); in axp_setup_regulators()