From patchwork Tue Mar 8 01:23:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 8528311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4B08CC0553 for ; Tue, 8 Mar 2016 01:26:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76998201B9 for ; Tue, 8 Mar 2016 01:26:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 989C82015E for ; Tue, 8 Mar 2016 01:26:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ad6O0-0003w6-K7; Tue, 08 Mar 2016 01:24:32 +0000 Received: from mail-pa0-f67.google.com ([209.85.220.67]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ad6Nq-0003rh-8D for linux-arm-kernel@lists.infradead.org; Tue, 08 Mar 2016 01:24:24 +0000 Received: by mail-pa0-f67.google.com with SMTP id q6so81044pav.0 for ; Mon, 07 Mar 2016 17:24:01 -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=Sv8AV7cgpuh25A97/OQa3iL6fT76VFs9Utr452x+ytT1GBaX4w1lLswLmU+KJyUDrG v18kxxyASmfeifNupTDmtcbqYJgG1MR9JEYxVQTKXIxTG5p3Krz8EPSg+I4CnZq9fQpy SO0WG1rFMMOi1fzRJpixfieTNFI8gYRTiSvrPrvoMid0X8nN5S3xABdTLdmgeHN//Pu6 qXeV0o2xmwBW+/u8UiQP7Lw+G9eTbd0tuVaB6QogDCpTNX90oMuT/K6PlEVJdZFOedZD kgu+q3zz2fXFjRWXyXxlB3J1ya4oHrjQsINXV7wCx4qXwf6riYwXvzFawOqV6G8x6nHE oXqw== X-Gm-Message-State: AD7BkJIIFiOyoIJuYWd86Ed88AuTNrjS8D+AnbqK3ebz/H9Ns+WdQvUUcTzXH/EmggJ2HQ== X-Received: by 10.66.154.233 with SMTP id vr9mr37955036pab.66.1457400241497; Mon, 07 Mar 2016 17:24:01 -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 82sm294823pfi.78.2016.03.07.17.23.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Mar 2016 17:24:01 -0800 (PST) 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160307_172422_435242_5393FE3E X-CRM114-Status: UNSURE ( 9.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Franklin S Cooper Jr MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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);