Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbcCHBYT (ORCPT ); Mon, 7 Mar 2016 20:24:19 -0500 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36437 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473AbcCHBYC (ORCPT ); Mon, 7 Mar 2016 20:24:02 -0500 From: Franklin S Cooper Jr To: thierry.reding@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, bcousson@baylibre.com, tony@atomide.com, linux@arm.linux.org.uk, paul@pwsan.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vigneshr@ti.com Cc: Franklin S Cooper Jr Subject: [PATCH v5 1/6] pwms: pwm-ti*: Get the clock from the PWMSS (parent) Date: Mon, 7 Mar 2016 19:23:39 -0600 Message-Id: <1457400224-24797-2-git-send-email-fcooper@ti.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457400224-24797-1-git-send-email-fcooper@ti.com> References: <1457400224-24797-1-git-send-email-fcooper@ti.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1286 Lines: 38 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 --- 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