clk: add clk_bulk_get accessories
authorDong Aisheng <aisheng.dong@nxp.com>
Fri, 19 May 2017 13:49:04 +0000 (21:49 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 2 Jun 2017 22:37:45 +0000 (15:37 -0700)
commit266e4e9d9150e98141b85c7400f8aa3cd57a7f9b
tree2c320990d2c128803ba7f145bc0873effd19f558
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6
clk: add clk_bulk_get accessories

These helper function allows drivers to get several clk consumers in
one operation. If any of the clk cannot be acquired then any clks
that were got will be put before returning to the caller.

This can relieve the driver owners' life who needs to handle many clocks,
as well as each clock error reporting.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Anson Huang <anson.huang@nxp.com>
Cc: Robin Gong <yibin.gong@nxp.com>
Cc: Bai Ping <ping.bai@nxp.com>
Cc: Leonard Crestez <leonard.crestez@nxp.com>
Cc: Octavian Purdila <octavian.purdila@nxp.com>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/Makefile
drivers/clk/clk-bulk.c [new file with mode: 0644]
include/linux/clk.h