mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: Kyungmin Park <[email protected]> Signed-off-by: Mike Turquette <[email protected]>
This commit is contained in:
parent
09575693a2
commit
86be408bfb
8 changed files with 227 additions and 2 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/pm_runtime.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/clk/clk-conf.h>
|
||||
|
||||
#include "base.h"
|
||||
#include "power/power.h"
|
||||
|
|
@ -489,6 +490,10 @@ static int platform_drv_probe(struct device *_dev)
|
|||
struct platform_device *dev = to_platform_device(_dev);
|
||||
int ret;
|
||||
|
||||
ret = of_clk_set_defaults(_dev->of_node, false);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
acpi_dev_pm_attach(_dev, true);
|
||||
|
||||
ret = drv->probe(dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue