RE: [PATCH 3/5] ARM: dts: r7s72100: add rtc clock to device tree

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

 



Hi Geert,

On Friday, March 17, 2017, Geert Uytterhoeven wrote:
> > --- a/arch/arm/boot/dts/r7s72100.dtsi
> > +++ b/arch/arm/boot/dts/r7s72100.dtsi
> > @@ -117,6 +117,15 @@
> >                         clock-output-names = "ostm0", "ostm1";
> >                 };
> >
> > +               mstp6_clks: mstp6_clks@fcfe042c {
> > +                       #clock-cells = <1>;
> > +                       compatible = "renesas,r7s72100-mstp-clocks",
> "renesas,cpg-mstp-clocks";
> > +                       reg = <0xfcfe042c 4>;
> > +                       clocks = <&p0_clk>;
> > +                       clock-indices = <R7S72100_CLK_RTC>;
> > +                       clock-output-names = "rtc0";
> 
> "rtc"? There's only one.

The rtc-sh.c code wants to have a number at the end. So if I just put "rtc" as the clock name, it does not find it. Again, I didn't want to break any SH builds, so I just changed the DT to match the driver.


[ from the rtc-sh.c code ]

	clk_id = pdev->id;
	/* With a single device, the clock id is still "rtc0" */
	if (clk_id < 0)
		clk_id = 0;

	snprintf(clk_name, sizeof(clk_name), "rtc%d", clk_id);

	rtc->clk = devm_clk_get(&pdev->dev, clk_name);
	if (IS_ERR(rtc->clk)) {
		/*
		 * No error handling for rtc->clk intentionally, not all
		 * platforms will have a unique clock for the RTC, and
		 * the clk API can handle the struct clk pointer being
		 * NULL.
		 */
		rtc->clk = NULL;
	}

	clk_enable(rtc->clk);


Cheers

Chris





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux