Lines Matching refs:align
35 const struct rail_alignment *align) in round_cvb_voltage() argument
39 int step = (align->step_uv ? : 1000) * v_scale; in round_cvb_voltage()
40 int offset = align->offset_uv * v_scale; in round_cvb_voltage()
43 uv = DIV_ROUND_UP(uv, step) * align->step_uv + align->offset_uv; in round_cvb_voltage()
52 static int round_voltage(int mv, const struct rail_alignment *align, int up) in round_voltage() argument
54 if (align->step_uv) { in round_voltage()
57 uv = max(mv * 1000, align->offset_uv) - align->offset_uv; in round_voltage()
58 uv = (uv + (up ? align->step_uv - 1 : 0)) / align->step_uv; in round_voltage()
59 return (uv * align->step_uv + align->offset_uv) / 1000; in round_voltage()
71 const struct rail_alignment *align = &d->alignment; in build_opp_table() local
73 min_mv = round_voltage(d->min_millivolts, align, UP); in build_opp_table()
74 max_mv = round_voltage(d->max_millivolts, align, DOWN); in build_opp_table()
83 dfll_mv = round_cvb_voltage(dfll_mv, d->voltage_scale, align); in build_opp_table()