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()
67 const struct rail_alignment *align = &table->alignment; in build_opp_table() local
70 min_mv = round_voltage(table->min_millivolts, align, UP); in build_opp_table()
71 max_mv = round_voltage(table->max_millivolts, align, DOWN); in build_opp_table()
82 align); in build_opp_table()