From patchwork Mon Mar 7 20:39:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 8522881 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A5C259F2B4 for ; Mon, 7 Mar 2016 20:39:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5F05202C8 for ; Mon, 7 Mar 2016 20:39:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8CD720254 for ; Mon, 7 Mar 2016 20:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753813AbcCGUjz (ORCPT ); Mon, 7 Mar 2016 15:39:55 -0500 Received: from mail-oi0-f44.google.com ([209.85.218.44]:33063 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753517AbcCGUjv (ORCPT ); Mon, 7 Mar 2016 15:39:51 -0500 Received: by mail-oi0-f44.google.com with SMTP id d205so88205645oia.0; Mon, 07 Mar 2016 12:39:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=etf5N8KC562yk/mKT5YUh0eAOXdpsK1Q4bf7IIGjiaA=; b=GwDyg+XFFXDwhFm3feiv3/108amE9/2vD6Y/1XYh2ye07lZ4wHx6+Dlr/mA459VDcQ x7LibO3GBaUkk9nXsg1Qz9rifJDTauIvAczV88DwZH6J+/5G00gquMwSGPDQ9Ircxkab dZqg1FfUQ4Xq6M8CqoSyOlBDpyFCxZ/TkGkmqAWDwel/dRIA9gkcvCvwFLMFFCaRESZf hsTPiyW5VOmO/PNa23GAVI2JS2HWHz34Sl7uSbnYhzX3L9Y4eBZ56GnzRQFd/HEqkgIX YKjA2c1uamlAdBigrvCdmKWF092A+GXiNR9V6BsbfDwP39fJzMxv3SLroaDg5nRbGfQR VaqQ== X-Gm-Message-State: AD7BkJJUGVDUSuZNU0iZGdn/vxjoTYOLbqiCxe+OUCxg3cEXpa48TsKOqUKisrlBTrU66g== X-Received: by 10.202.105.1 with SMTP id e1mr14645598oic.79.1457383190754; Mon, 07 Mar 2016 12:39:50 -0800 (PST) Received: from beast-server.fios-router.home (pool-173-57-21-86.dllstx.fios.verizon.net. [173.57.21.86]) by smtp.gmail.com with ESMTPSA id s3sm10657547obf.29.2016.03.07.12.39.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Mar 2016 12:39:50 -0800 (PST) From: Franklin S Cooper Jr To: vigneshr@ti.com, 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, 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 Cc: Franklin S Cooper Jr Subject: [Patch v4 1/6] pwms: pwm-ti*: Get the clock from the PWMSS (parent) Date: Mon, 7 Mar 2016 14:39:42 -0600 Message-Id: <1457383187-17166-2-git-send-email-fcooper@ti.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1457383187-17166-1-git-send-email-fcooper@ti.com> References: <1457383187-17166-1-git-send-email-fcooper@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);