From patchwork Fri Jun 5 12:40:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 49576 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C0122157C for ; Fri, 5 Jun 2015 12:42:32 +0000 (UTC) Received: by laar3 with SMTP id r3sf4171565laa.3 for ; Fri, 05 Jun 2015 05:42:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=jiQGB9RbzFPDXrijDhGcqpuWgUDD+7HT12tv04ADJpw=; b=BWi8BYTpIVDt3De7Tqztpro/7+FZFBSWSGrWKeTlNOrpwN5aNNIE4h4K8GqN2eFKv8 GNO50ziG4lJVhr9l7oA2+MjSWcmW5OEHR6mW9ZkmvS8KyyyYP9QlsC3WREan8I6z1Fy2 VnG2lAQx4AD/tPnIj97NS6kNDAu6429lSxCeQNxz9avJFHbaKEilr1SZNu+4pQaSp0Aa EoqukM4UbluQH+h6PZEkXRswqErg/2JF5wzVGfXAX0RqNmqbP12eEu6gpebokoIhWMxo 7WW2F0O85E+crgIfVN2wcMnXEGRRsUk1uSLYZYr3JHwMtv+ycCYox/N61ReYIxTV5pOt sENA== X-Gm-Message-State: ALoCoQl987mLZOUll8H/vX3/yg9bb64kkQQU9c4+iobwiPAW/EZ02d8hCo0iPnB+bCQfR8FC2Zdb X-Received: by 10.112.219.200 with SMTP id pq8mr3106416lbc.7.1433508151111; Fri, 05 Jun 2015 05:42:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.169 with SMTP id r9ls328070laj.86.gmail; Fri, 05 Jun 2015 05:42:30 -0700 (PDT) X-Received: by 10.112.52.1 with SMTP id p1mr3227823lbo.8.1433508150929; Fri, 05 Jun 2015 05:42:30 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id s2si4707035lbf.154.2015.06.05.05.42.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 05:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labko7 with SMTP id ko7so53370070lab.2 for ; Fri, 05 Jun 2015 05:42:30 -0700 (PDT) X-Received: by 10.112.155.197 with SMTP id vy5mr3146388lbb.29.1433508150834; Fri, 05 Jun 2015 05:42:30 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1402810lbb; Fri, 5 Jun 2015 05:42:29 -0700 (PDT) X-Received: by 10.70.91.232 with SMTP id ch8mr5871049pdb.58.1433508149151; Fri, 05 Jun 2015 05:42:29 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uk8si10733378pbc.160.2015.06.05.05.42.28; Fri, 05 Jun 2015 05:42:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752008AbbFEMm1 (ORCPT + 5 others); Fri, 5 Jun 2015 08:42:27 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:38201 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933AbbFEMkq (ORCPT ); Fri, 5 Jun 2015 08:40:46 -0400 Received: by wibdq8 with SMTP id dq8so17680707wib.1 for ; Fri, 05 Jun 2015 05:40:45 -0700 (PDT) X-Received: by 10.194.133.73 with SMTP id pa9mr6262952wjb.148.1433508045540; Fri, 05 Jun 2015 05:40:45 -0700 (PDT) Received: from mms.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id l6sm3250172wib.18.2015.06.05.05.40.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 05:40:44 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org Cc: mturquette@linaro.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 1/5] clk: qcom: Add support for read-only rcg2 ops Date: Fri, 5 Jun 2015 15:40:32 +0300 Message-Id: <1433508036-28644-2-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1433508036-28644-1-git-send-email-georgi.djakov@linaro.org> References: <1433508036-28644-1-git-send-email-georgi.djakov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: georgi.djakov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Some root clock generators can be controlled by other processors. In this case modifying them is not recommended. By using the read-only operations, the child clocks will be able to get information about their parent - like rate etc. Suggested-by: Stephen Boyd Signed-off-by: Georgi Djakov --- drivers/clk/qcom/clk-rcg.h | 1 + drivers/clk/qcom/clk-rcg2.c | 7 +++++++ 2 files changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h index 56028bb31d87..706a55b34b81 100644 --- a/drivers/clk/qcom/clk-rcg.h +++ b/drivers/clk/qcom/clk-rcg.h @@ -169,6 +169,7 @@ struct clk_rcg2 { #define to_clk_rcg2(_hw) container_of(to_clk_regmap(_hw), struct clk_rcg2, clkr) extern const struct clk_ops clk_rcg2_ops; +extern const struct clk_ops clk_rcg2_ro_ops; extern const struct clk_ops clk_edp_pixel_ops; extern const struct clk_ops clk_byte_ops; extern const struct clk_ops clk_pixel_ops; diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c index b95d17fbb8d7..cb17fd4b193f 100644 --- a/drivers/clk/qcom/clk-rcg2.c +++ b/drivers/clk/qcom/clk-rcg2.c @@ -301,6 +301,13 @@ const struct clk_ops clk_rcg2_ops = { }; EXPORT_SYMBOL_GPL(clk_rcg2_ops); +const struct clk_ops clk_rcg2_ro_ops = { + .is_enabled = clk_rcg2_is_enabled, + .get_parent = clk_rcg2_get_parent, + .recalc_rate = clk_rcg2_recalc_rate, +}; +EXPORT_SYMBOL_GPL(clk_rcg2_ro_ops); + struct frac_entry { int num; int den;