struct meson_clk *priv = dev_get_priv(clk->dev);
struct meson_gate *gate;
- if (clk->id >= ARRAY_SIZE(gates))
- return -ENOENT;
-
gate = &gates[clk->id];
- if (gate->reg == 0)
- return 0;
-
regmap_update_bits(priv->map, gate->reg,
BIT(gate->bit), on ? BIT(gate->bit) : 0);
return 0;
}
+static int meson_clk_request(struct clk *clk)
+{
+ if (clk->id >= ARRAY_SIZE(gates))
+ return -ENOENT;
+
+ return 0;
+}
+
static struct clk_ops meson_clk_ops = {
.disable = meson_clk_disable,
.enable = meson_clk_enable,
+ .request = meson_clk_request,
};
static const struct udevice_id meson_clk_ids[] = {