diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-06-18 17:29:32 +0200 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-07-25 15:16:27 -0700 |
commit | 86be408bfbd846fab3c4ac21d6f9298bd2e4b790 (patch) | |
tree | 7fbcd8031f805c6faa8a55b7187bf9fd395664d7 /drivers/i2c | |
parent | 09575693a2511b5ddae0105546e0d9cefc936e34 (diff) | |
download | linux-86be408bfbd846fab3c4ac21d6f9298bd2e4b790.tar.gz linux-86be408bfbd846fab3c4ac21d6f9298bd2e4b790.tar.bz2 linux-86be408bfbd846fab3c4ac21d6f9298bd2e4b790.zip |
clk: Support for clock parents and rates assigned from device tree
This patch adds helper functions to configure clock parents and rates
as specified through 'assigned-clock-parents', 'assigned-clock-rates'
DT properties for a clock provider or clock consumer device.
The helpers are now being called by the bus code for the platform, I2C
and SPI busses, before the driver probing and also in the clock core
after registration of a clock provider.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 7c7f4b856bad..66aa83b99383 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -42,6 +42,7 @@ #include <linux/of.h> #include <linux/of_device.h> #include <linux/of_irq.h> +#include <linux/clk/clk-conf.h> #include <linux/completion.h> #include <linux/hardirq.h> #include <linux/irqflags.h> @@ -274,6 +275,10 @@ static int i2c_device_probe(struct device *dev) client->flags & I2C_CLIENT_WAKE); dev_dbg(dev, "probe\n"); + status = of_clk_set_defaults(dev->of_node, false); + if (status < 0) + return status; + acpi_dev_pm_attach(&client->dev, true); status = driver->probe(client, i2c_match_id(driver->id_table, client)); if (status) |