|
@@ -132,10 +132,13 @@ static int sun4i_dclk_get_phase(struct clk_hw *hw)
|
|
static int sun4i_dclk_set_phase(struct clk_hw *hw, int degrees)
|
|
static int sun4i_dclk_set_phase(struct clk_hw *hw, int degrees)
|
|
{
|
|
{
|
|
struct sun4i_dclk *dclk = hw_to_dclk(hw);
|
|
struct sun4i_dclk *dclk = hw_to_dclk(hw);
|
|
|
|
+ u32 val = degrees / 120;
|
|
|
|
+
|
|
|
|
+ val <<= 28;
|
|
|
|
|
|
regmap_update_bits(dclk->regmap, SUN4I_TCON0_IO_POL_REG,
|
|
regmap_update_bits(dclk->regmap, SUN4I_TCON0_IO_POL_REG,
|
|
GENMASK(29, 28),
|
|
GENMASK(29, 28),
|
|
- degrees / 120);
|
|
|
|
|
|
+ val);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|