From patchwork Wed Mar 6 17:47:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10841501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 572FE1575 for ; Wed, 6 Mar 2019 17:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AF6E2ED15 for ; Wed, 6 Mar 2019 17:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BEE12ED18; Wed, 6 Mar 2019 17:47:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDD562ED15 for ; Wed, 6 Mar 2019 17:47:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730558AbfCFRrZ (ORCPT ); Wed, 6 Mar 2019 12:47:25 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42005 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730540AbfCFRrO (ORCPT ); Wed, 6 Mar 2019 12:47:14 -0500 Received: by mail-pg1-f195.google.com with SMTP id b2so8971786pgl.9 for ; Wed, 06 Mar 2019 09:47:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oBZ8sxxMGg3aMYJDNUgn+TSIDMbgVfPO7ogD65Yj6kM=; b=nI2UrWF7RpU7tNN8WkgmIPRpACpS7NRT1WKf5L/6h3GqcnncisSQrXLv7yzBRrOV0J 8vIcnudSCbQ+85cTQUgDpJsX+Fr34PzfJ3jQxspVFi1qsnyFm/m3Xs8AR/S6njfp2X2w l6EwaZLuFOlyNiP3YEr1ORGO8HN6ExP4envur8iDON40kR446+EguUftAsmvdmt8JgQp 5bwF68bqXNDhS8Q1AYCSbojfe/ExxO5+Aw0nAN1YOBxM4bKoOOJ8jIXu0wOXJZrj6elh 8jJClWN3s6yWbyy/i2O7jQatH8f3aPrCPjHlhg5yQTcxCQnG3U5LquI59ABl/iSvGgoY /g/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oBZ8sxxMGg3aMYJDNUgn+TSIDMbgVfPO7ogD65Yj6kM=; b=VPNlf8z4pLg8E7FNlvggJ9QEB8VZ5z+gwFbbxLWcTAp3AIM4w15TJQurwG7eKYW27c y6ggdkSr14q9SRSG2FUssh1Gdsx2zj4mKx5MYxg8ESo11F2oi3iNDAgXZoHeIJt4KrXU tdHZwI6aI1sVj7/YhRDGQ5Y3pPLZPpZIeGSvoGoZNcxTdzD9s2kji/psTiAcktRFD/V+ J7Mz1V4hbvgEZxh81nPymx3J6195DF6j+WFcciyBjIDFXT73woEJMdHFOyvQYQe8iDYQ W+yEqgjGTo3+B/KpmIiMl/m/rDwTIFEwYfdltIBRw4ohx84rnWbTyvXctj9VRqJtWN0a sT/Q== X-Gm-Message-State: APjAAAVw6dR4Pw7M6OlWuhX3yrcP5fvzWWMXUXxZiyXby/9LQGRqPGBn WKs9tasIWTII44qMTh1BKJGVHQ== X-Google-Smtp-Source: APXvYqwvOm5jgoN9OHBhMYX768Y3KCZWsp6YwEfaPkb0XZY4qFhssogqi64csOCMNU5vFlWxTveObQ== X-Received: by 2002:a63:2c50:: with SMTP id s77mr7392020pgs.440.1551894433640; Wed, 06 Mar 2019 09:47:13 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id h64sm4098293pfj.40.2019.03.06.09.47.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 09:47:13 -0800 (PST) From: Bjorn Andersson To: Michael Turquette , Stephen Boyd Cc: Andy Gross , David Brown , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] clk: qcom: branch: Add AON clock ops Date: Wed, 6 Mar 2019 09:47:57 -0800 Message-Id: <20190306174758.22462-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190306174758.22462-1-bjorn.andersson@linaro.org> References: <20190306174758.22462-1-bjorn.andersson@linaro.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some clocks can only be turned on by resetting the block containing them, provide a clock type that allow us to reference these clocks and have the client drivers enable and "disable" them. Signed-off-by: Bjorn Andersson --- drivers/clk/qcom/clk-branch.c | 6 ++++++ drivers/clk/qcom/clk-branch.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c index 99446bf630aa..f869fc6aaed6 100644 --- a/drivers/clk/qcom/clk-branch.c +++ b/drivers/clk/qcom/clk-branch.c @@ -146,6 +146,12 @@ const struct clk_ops clk_branch2_ops = { }; EXPORT_SYMBOL_GPL(clk_branch2_ops); +const struct clk_ops clk_branch2_aon_ops = { + .enable = clk_branch2_enable, + .is_enabled = clk_is_enabled_regmap, +}; +EXPORT_SYMBOL_GPL(clk_branch2_aon_ops); + const struct clk_ops clk_branch_simple_ops = { .enable = clk_enable_regmap, .disable = clk_disable_regmap, diff --git a/drivers/clk/qcom/clk-branch.h b/drivers/clk/qcom/clk-branch.h index b3561e0a3984..17a58119165e 100644 --- a/drivers/clk/qcom/clk-branch.h +++ b/drivers/clk/qcom/clk-branch.h @@ -40,6 +40,7 @@ struct clk_branch { extern const struct clk_ops clk_branch_ops; extern const struct clk_ops clk_branch2_ops; extern const struct clk_ops clk_branch_simple_ops; +extern const struct clk_ops clk_branch2_aon_ops; #define to_clk_branch(_hw) \ container_of(to_clk_regmap(_hw), struct clk_branch, clkr)