From patchwork Thu Jan 9 03:35:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 239280 List-Id: U-Boot discussion From: chunfeng.yun at mediatek.com (Chunfeng Yun) Date: Thu, 9 Jan 2020 11:35:08 +0800 Subject: [PATCH v2 5/7] clk: fixed_rate: add dummy enable() function In-Reply-To: <1578540910-3516-1-git-send-email-chunfeng.yun@mediatek.com> References: <1578540910-3516-1-git-send-email-chunfeng.yun@mediatek.com> Message-ID: <1578540910-3516-5-git-send-email-chunfeng.yun@mediatek.com> This is used to avoid clk_enable() return -ENOSYS. Signed-off-by: Chunfeng Yun Reviewed-by: Simon Glass Reviewed-by: Ryder Lee --- v2: add reviewed-by Simon & Ryder --- drivers/clk/clk_fixed_rate.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index f51126793e..2c20eddb0b 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/drivers/clk/clk_fixed_rate.c @@ -13,8 +13,15 @@ static ulong clk_fixed_rate_get_rate(struct clk *clk) return to_clk_fixed_rate(clk->dev)->fixed_rate; } +/* avoid clk_enable() return -ENOSYS */ +static int dummy_enable(struct clk *clk) +{ + return 0; +} + const struct clk_ops clk_fixed_rate_ops = { .get_rate = clk_fixed_rate_get_rate, + .enable = dummy_enable, }; static int clk_fixed_rate_ofdata_to_platdata(struct udevice *dev)