From patchwork Tue Aug 16 13:35:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9283835 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EF876086A for ; Tue, 16 Aug 2016 13:37:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1EAD528995 for ; Tue, 16 Aug 2016 13:37:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1291228BF7; Tue, 16 Aug 2016 13:37:43 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 948FA28995 for ; Tue, 16 Aug 2016 13:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932170AbcHPNgz (ORCPT ); Tue, 16 Aug 2016 09:36:55 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:41847 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614AbcHPNgr (ORCPT ); Tue, 16 Aug 2016 09:36:47 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OC000FF88H3OW30@mailout3.w1.samsung.com>; Tue, 16 Aug 2016 14:36:39 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-5d-57b316e7447b Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 1F.AB.04866.7E613B75; Tue, 16 Aug 2016 14:36:39 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OC000MRK8GNJF30@eusync3.samsung.com>; Tue, 16 Aug 2016 14:36:39 +0100 (BST) From: Krzysztof Kozlowski To: Michael Turquette , Stephen Boyd , Stephen Warren , Lee Jones , Eric Anholt , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Krzysztof Kozlowski , Sylwester Nawrocki , Tomasz Figa , Kukjin Kim , Russell King , Mark Brown , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, alsa-devel@alsa-project.org Cc: Marek Szyprowski , Charles Keepax , Javier Martinez Canillas , a.hajda@samsung.com, Bartlomiej Zolnierkiewicz Subject: [RFC 10/17] clk: composite: Switch to new clock controller API Date: Tue, 16 Aug 2016 15:35:07 +0200 Message-id: <1471354514-24224-11-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1471354514-24224-1-git-send-email-k.kozlowski@samsung.com> References: <1471354514-24224-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrIIsWRmVeSWpSXmKPExsVy+t/xq7rPxTaHG/z4rGRxa905VosrFw8x WWycsZ7VYm3vURaLqQ+fsFn8m3KD3eJA42VGi1/vjrBbvHm7hsni9QtDi/7Hr5ktdrQtZLHY 9Pgaq8XHnnusFh1/vzBaXN41h81i4u0N7BYzzu9jsjg0dS+jxdojd9ktLp5ytXg6czObxeE3 7awWP850s1i8W/2E0eLVwTYWi1W7/jA6SHts+NzE5tH0/hibx+VrF5k93t9oZfeYdf8skNvX y+Sxc9Zddo9NqzrZPDYvqfd4OfE3m8eWfqBQ35ZVjB6fN8l5bJwbGsAXxWWTkpqTWZZapG+X wJVxb5p7wWGxipe3lzA3MH4R6mLk5JAQMJGYf+cWK4QtJnHh3nq2LkYuDiGBpYwSj1/fZYFw Gpkk/q86xQ5SxSZgLLF5+RKwKhGBVWwSC/+uZQJxmAVeMkqcPfkLyOHgEBZwl9gxkwmkgUVA VeLg63dsIDavgIfE5VsToNbJSZw8NhnM5gSKn7vQyAxiCwG1nlzfzjKBkXcBI8MqRtHU0uSC 4qT0XCO94sTc4tK8dL3k/NxNjJCI+7qDcekxq0OMAhyMSjy8Jxg2hQuxJpYVV+YeYpTgYFYS 4T0sujlciDclsbIqtSg/vqg0J7X4EKM0B4uSOO/MXe9DhATSE0tSs1NTC1KLYLJMHJxSDYy3 N+YUBZ2byZurGXM8q1YgeZL+zsj3Habcol3223a9kOg8xjor+8jpFJu1thm9ftsm7Apq7Nzy QEpGgzPtX+4xzdtHft20Zjm5b2Wuai2PyyrOmT+O856SP7XGoivly+pk4cLP12Wn/1moqiV+ ff75X5/6RSwyOvdpbpfpfNd/lKPBqs0iWUuJpTgj0VCLuag4EQAsLK7XtAIAAA== 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 Allocate a clock controller and use new clk_register_with_ctrl() API. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/clk-composite.c | 8 +++++--- include/linux/clk-provider.h | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 00269de2f390..8ad5c2c4a329 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -211,7 +211,8 @@ static void clk_composite_disable(struct clk_hw *hw) gate_ops->disable(gate_hw); } -struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name, +struct clk_hw *clk_hw_register_composite(struct device *dev, struct clk_ctrl *ctrl, + const char *name, const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, @@ -324,7 +325,8 @@ err: return hw; } -struct clk *clk_register_composite(struct device *dev, const char *name, +struct clk *clk_register_composite(struct device *dev, struct clk_ctrl *ctrl, + const char *name, const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, @@ -333,7 +335,7 @@ struct clk *clk_register_composite(struct device *dev, const char *name, { struct clk_hw *hw; - hw = clk_hw_register_composite(dev, name, parent_names, num_parents, + hw = clk_hw_register_composite(dev, ctrl, name, parent_names, num_parents, mux_hw, mux_ops, rate_hw, rate_ops, gate_hw, gate_ops, flags); if (IS_ERR(hw)) diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index cfb3aa3912c5..2bd0a8cb7a9c 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h @@ -663,14 +663,16 @@ struct clk_composite { #define to_clk_composite(_hw) container_of(_hw, struct clk_composite, hw) -struct clk *clk_register_composite(struct device *dev, const char *name, +struct clk *clk_register_composite(struct device *dev, struct clk_ctrl *ctrl, + const char *name, const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops, struct clk_hw *gate_hw, const struct clk_ops *gate_ops, unsigned long flags); void clk_unregister_composite(struct clk *clk); -struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name, +struct clk_hw *clk_hw_register_composite(struct device *dev, + struct clk_ctrl *ctrl, const char *name, const char * const *parent_names, int num_parents, struct clk_hw *mux_hw, const struct clk_ops *mux_ops, struct clk_hw *rate_hw, const struct clk_ops *rate_ops,