RE: [PATCH] ARM: dts: r7s72100: fix sdhi clock define

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Geert,

On Friday, January 13, 2017, Geert Uytterhoeven wrote:
> > In sh_mobile_sdhi.c, can we change sh_mobile_sdhi_probe() so that if
> > there are 2 clocks specified (in DT or platform data), it
> > automatically enables the 2nd clock (forever) and just uses the 1st
> clock as the on/off clock?
> 
> Of course the driver can handle the second interrupt, if you update the
> binding, and add support code for that...

Of course my idea is that I would only have to update the bindings for
RZ/A1...not any other device.

My only question is, today sh_mobile_sdhi.c uses this:

   priv->clk = devm_clk_get(&pdev->dev, NULL);

to get the clock. But if there is a 2nd clock...how do I know the
string id name to look to replace NULL with??


Or...for the RZ/A1 dtsi, should I just give the 2 clocks names:

		clocks = <&mstp12_clks R7S72100_CLK_SDHI00,
				&mstp12_clks R7S72100_CLK_SDHI01>;
		clock-names = "core", "cd";


and then in the code do:

	struct *cd_clk;
	cd_clk = devm_clk_get(&pdev->dev, "cd");
	if (cd_clk) {
		clk_prepare_enable(cd_clk);
	}



  (this simple 1-line fix patch is getting a lot more complicated)


Thanks,
Chris
��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux