From: fcooper@ti.com (Franklin S Cooper Jr)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch v4 1/6] pwms: pwm-ti*: Get the clock from the PWMSS (parent)
Date: Mon, 7 Mar 2016 14:39:42 -0600 [thread overview]
Message-ID: <1457383187-17166-2-git-send-email-fcooper@ti.com> (raw)
In-Reply-To: <1457383187-17166-1-git-send-email-fcooper@ti.com>
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@ti.com>
---
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");
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
return PTR_ERR(clk);
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index 6a41e66..09dc1bc 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -443,7 +443,7 @@ static int ehrpwm_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");
if (IS_ERR(clk)) {
dev_err(&pdev->dev, "failed to get clock\n");
return PTR_ERR(clk);
--
2.7.0
next prev parent reply other threads:[~2016-03-07 20:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 20:39 [Patch v4 0/6] ARM: am335x/am437x/dra7: Add PWM support for DRA7 Franklin S Cooper Jr
2016-03-07 20:39 ` Franklin S Cooper Jr [this message]
2016-03-07 20:39 ` [Patch v4 2/6] ARM: dts: am437x/am33xx: Remove eCAP and ePWM hwmod properties Franklin S Cooper Jr
2016-03-07 20:39 ` [Patch v4 3/6] ARM: AM335x/AM437x: hwmod: Remove eQEP, ePWM and eCAP hwmod entries Franklin S Cooper Jr
2016-03-07 20:39 ` [Patch v4 4/6] ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS Franklin S Cooper Jr
2016-03-07 20:39 ` [Patch v4 5/6] ARM: dts: DRA7: Add TBCLK " Franklin S Cooper Jr
2016-03-07 20:39 ` [Patch v4 6/6] ARM: dts: DRA7: Add dt nodes " Franklin S Cooper Jr
2016-03-07 23:53 ` Paul Walmsley
2016-03-08 0:20 ` Franklin S Cooper Jr.
2016-03-08 0:20 ` Franklin S Cooper Jr.
2016-03-09 18:14 ` Paul Walmsley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457383187-17166-2-git-send-email-fcooper@ti.com \
--to=fcooper@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox