return ops->set_rate(dev, rate);
}
+int clk_enable(struct udevice *dev, int periph)
+{
+ struct clk_ops *ops = clk_get_ops(dev);
+
+ if (!ops->enable)
+ return -ENOSYS;
+
+ return ops->enable(dev, periph);
+}
+
ulong clk_get_periph_rate(struct udevice *dev, int periph)
{
struct clk_ops *ops = clk_get_ops(dev);
*/
ulong (*set_rate)(struct udevice *dev, ulong rate);
+ /**
+ * enable() - Enable the clock for a peripheral
+ *
+ * @dev: clock provider
+ * @periph: Peripheral ID to enable
+ * @return zero on success, or -ve error code
+ */
+ int (*enable)(struct udevice *dev, int periph);
+
/**
* get_periph_rate() - Get clock rate for a peripheral
*
*/
ulong clk_set_rate(struct udevice *dev, ulong rate);
+/**
+ * clk_enable() - Enable the clock for a peripheral
+ *
+ * @dev: clock provider
+ * @periph: Peripheral ID to enable
+ * @return zero on success, or -ve error code
+ */
+int clk_enable(struct udevice *dev, int periph);
+
/**
* clk_get_periph_rate() - Get current clock rate for a peripheral
*