lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <538468B5.6090505@linaro.org>
Date:	Tue, 27 May 2014 15:58:05 +0530
From:	Tushar Behera <tushar.behera@...aro.org>
To:	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
	mturquette@...aro.org
CC:	mark.rutland@....com, linux@....linux.org.uk, pawel.moll@....com,
	t.figa@...sung.com, sw0312.kim@...sung.com,
	linux-kernel@...r.kernel.org, kyungmin.park@...sung.com,
	robh+dt@...nel.org, galak@...eaurora.org, grant.likely@...aro.org,
	m.szyprowski@...sung.com
Subject: Re: [PATCH/RFC V6 2/2] clk: Add handling of clk parent and rate assigned
 from DT

On 05/19/2014 10:52 PM, Sylwester Nawrocki wrote:
> This patch adds a helper function to configure clock parents and
> rates as specified in clock-parents, clock-rates DT properties
> for a consumer device and a call to it before driver is bound to
> a device.
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@...sung.com>

[ ... ]

> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 5b47210..f622733 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -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"
> @@ -486,6 +487,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;
> +

of_clk_set_defaults() is not getting called when the related driver is
not registered through platform_driver_register().

I came across this issue while testing this patch on peach-pit board with
following dts change. max98090 audio codec driver is registered through
module_i2c_driver().

* arch/arm/boot/dts/exynos5420-peach-pit.dts

&hsi2c_7 {

	status = "okay";

	max98090: codec@10 {
		compatible = "maxim,max98090";
		reg = <0x10>;
		interrupts = <2 0>;
		interrupt-parent = <&gpx0>;
		pinctrl-names = "default";
		pinctrl-0 = <&max98090_irq>;
+		clocks = <&pmu_system_controller 0>;
+		clock-names = "mclk";
+		clock-parents = <&clock CLK_FIN_PLL>;
+		clock-rates = <24000000>;
	};
};

-- 
Tushar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ