Merge tag 'clk-for-linus-3.18' of git://git.linaro.org/people/mike.turquette/linux
[firefly-linux-kernel-4.4.55.git] / include / linux / clk.h
index afb44bfaf8d1bec1c38346587ffad6c45e3b0dd9..c7f258a81761d22b1b204654d3582af55044915a 100644 (file)
@@ -106,6 +106,25 @@ int clk_notifier_unregister(struct clk *clk, struct notifier_block *nb);
  */
 long clk_get_accuracy(struct clk *clk);
 
+/**
+ * clk_set_phase - adjust the phase shift of a clock signal
+ * @clk: clock signal source
+ * @degrees: number of degrees the signal is shifted
+ *
+ * Shifts the phase of a clock signal by the specified degrees. Returns 0 on
+ * success, -EERROR otherwise.
+ */
+int clk_set_phase(struct clk *clk, int degrees);
+
+/**
+ * clk_get_phase - return the phase shift of a clock signal
+ * @clk: clock signal source
+ *
+ * Returns the phase shift of a clock node in degrees, otherwise returns
+ * -EERROR.
+ */
+int clk_get_phase(struct clk *clk);
+
 #else
 
 static inline long clk_get_accuracy(struct clk *clk)
@@ -113,6 +132,16 @@ static inline long clk_get_accuracy(struct clk *clk)
        return -ENOTSUPP;
 }
 
+static inline long clk_set_phase(struct clk *clk, int phase)
+{
+       return -ENOTSUPP;
+}
+
+static inline long clk_get_phase(struct clk *clk)
+{
+       return -ENOTSUPP;
+}
+
 #endif
 
 /**