[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5703564C.7090700@ti.com>
Date: Tue, 5 Apr 2016 11:38:12 +0530
From: Sekhar Nori <nsekhar@...com>
To: Franklin S Cooper Jr <fcooper@...com>, <thierry.reding@...il.com>,
<robh+dt@...nel.org>, <pawel.moll@....com>, <mark.rutland@....com>,
<ijc+devicetree@...lion.org.uk>, <galak@...eaurora.org>,
<bcousson@...libre.com>, <tony@...mide.com>,
<linux@....linux.org.uk>, <paul@...an.com>,
<linux-pwm@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <vigneshr@...com>
Subject: Re: [PATCH v5 1/6] pwms: pwm-ti*: Get the clock from the PWMSS
(parent)
On Tuesday 08 March 2016 06:53 AM, Franklin S Cooper Jr wrote:
> The eCAP and ePWM doesn't have their own separate clocks. They simply
> utilize the clock provided directly by the PWMSS. Therefore, they simply
> need to grab a reference to their parent's clock.
>
> Signed-off-by: Franklin S Cooper Jr <fcooper@...com>
So this assumes that eCAP and eHRPWM are always under the PWMSS
umbrella. But on TI AM18x, thats not true. These IPs exist independently
and receive functional clock from PLL sysclk outputs.
> ---
> drivers/pwm/pwm-tiecap.c | 2 +-
> drivers/pwm/pwm-tiehrpwm.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c
> index 616af76..9418159 100644
> --- a/drivers/pwm/pwm-tiecap.c
> +++ b/drivers/pwm/pwm-tiecap.c
> @@ -212,7 +212,7 @@ static int ecap_pwm_probe(struct platform_device *pdev)
> if (!pc)
> return -ENOMEM;
>
> - clk = devm_clk_get(&pdev->dev, "fck");
> + clk = devm_clk_get(pdev->dev.parent, "fck");
Even keeping the AM18x usecase aside, this seems to be pushing too much
platform information into the driver. The "fck" is a valid connection id
for the eCAP IP. Whether its valid for the parent device too is not
something this driver should need to know.
So it looks like what you need is for the clock hierarchy for the
platform to have clocks for eHRPWM and eCAP derived out of PWMSS clock?
Thanks,
Sekhar
Powered by blists - more mailing lists