Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3189206ybf; Tue, 3 Mar 2020 01:04:59 -0800 (PST) X-Google-Smtp-Source: ADFU+vu8EQcZgja16emHQ8z7Bx0+fXGfcQPRKCMQ8F5SP/EsDEAK2JIWEZoUXmidcAK1tDZzKZQ8 X-Received: by 2002:a05:6808:249:: with SMTP id m9mr1823812oie.5.1583226299050; Tue, 03 Mar 2020 01:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583226299; cv=none; d=google.com; s=arc-20160816; b=ylwO2JjJ0CTbV8jwf2QwOLG6TZyzuyM/zmH1BsuwBcx89rrMo23TsIbpu/y2J0gYJ8 0+QhznbLGB4RS3r/ncSAf5W87lASX81MXeB8kqeNRI/UgZZ2Bj2mo5nGQSvLrQVtHEHC NM33OZVUr/3V20NlP4UcTP0HpfnhLanZMvzhtHt+FDAYkXaQajwnv6HM5AZW1wKhgO0V GtVVCIl352N7xzwnJIr4rS+vvnkui2L0AWCDAwm2UFepDRp2E5A9U/xJQ8zOkzjMXjuP 8SQbVTcPeWrS+G4UtYE4OaTTXXD/eRIWVCwRoyINwwY+0Q1rEc+DoMxx0MGGXdGoZWlc pVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=SrhfcsGhaCa0JZgRarFQeH29qpeHXGg4X46l0FLk/ng=; b=BZdakYyOKq2mIc6J3WfAcahJlYIk64/Hf4iP2wbp8D5xBRPp/PblIU+QvuunibHzKT cQTQ/8UZShUPltx2pcF4OfwVjZfYk3aKTjIuhg28lYHJrGjNYnZ9xgtUu5aApjHJ1akE +zV3ny4mVfeWZlwYWUr4xDZ/YqXr4o+7J6jWD6r1NHTRnm6IxlnxKSkqBN/PXYL2LUXI Usm3odMu5hnteIwtCDUh6bBfE69iYm2UMt0SrfEst6jeoeFmrk2SXSAO+zxcy4UVwF7S tYfKmresY9ML1MqoswaixrF//83ArJ/g6nuuB1NMNX1+I2oqh2TxKztAaxkqrCaHmeE2 jBTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f187si8381332oia.218.2020.03.03.01.04.47; Tue, 03 Mar 2020 01:04:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728129AbgCCJEM (ORCPT + 99 others); Tue, 3 Mar 2020 04:04:12 -0500 Received: from inva020.nxp.com ([92.121.34.13]:36600 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728003AbgCCJDo (ORCPT ); Tue, 3 Mar 2020 04:03:44 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E1B801A1470; Tue, 3 Mar 2020 10:03:41 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D4B391A146A; Tue, 3 Mar 2020 10:03:41 +0100 (CET) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id D7D3220414; Tue, 3 Mar 2020 10:03:40 +0100 (CET) From: Abel Vesa To: Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam , Mike Turquette , Stephen Boyd , Lee Jones , Anson Huang , Leonard Crestez , Peng Fan , Jacky Bai Cc: NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , linux-clk@vger.kernel.org, Abel Vesa Subject: [RFC 05/11] clk: imx: pll14xx: Add the device as argument when registering Date: Tue, 3 Mar 2020 11:03:20 +0200 Message-Id: <1583226206-19758-6-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583226206-19758-1-git-send-email-abel.vesa@nxp.com> References: <1583226206-19758-1-git-send-email-abel.vesa@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to allow runtime PM, the device needs to be passed on to the register function. Audiomix clock controller, used on i.MX8MP and future platforms, registers a pll14xx and has runtime PM support. Signed-off-by: Abel Vesa --- drivers/clk/imx/clk-pll14xx.c | 6 +++--- drivers/clk/imx/clk.h | 13 ++++++++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index a83bbbe..2fbc28c 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -378,9 +378,9 @@ static const struct clk_ops clk_pll1443x_ops = { .set_rate = clk_pll1443x_set_rate, }; -struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name, - void __iomem *base, - const struct imx_pll14xx_clk *pll_clk) +struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, + const char *parent_name, void __iomem *base, + const struct imx_pll14xx_clk *pll_clk) { struct clk_pll14xx *pll; struct clk_hw *hw; diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 51d6c26..cb28f06 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -131,9 +131,9 @@ struct clk *imx_clk_pll14xx(const char *name, const char *parent_name, #define imx_clk_pll14xx(name, parent_name, base, pll_clk) \ to_clk(imx_clk_hw_pll14xx(name, parent_name, base, pll_clk)) -struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name, - void __iomem *base, - const struct imx_pll14xx_clk *pll_clk); +struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, + const char *parent_name, void __iomem *base, + const struct imx_pll14xx_clk *pll_clk); struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char *name, const char *parent, void __iomem *base); @@ -244,6 +244,13 @@ static inline struct clk *to_clk(struct clk_hw *hw) return hw->clk; } +static inline struct clk_hw *imx_clk_hw_pll14xx(const char *name, const char *parent_name, + void __iomem *base, + const struct imx_pll14xx_clk *pll_clk) +{ + return imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk); +} + static inline struct clk_hw *imx_clk_hw_fixed(const char *name, int rate) { return clk_hw_register_fixed_rate(NULL, name, NULL, 0, rate); -- 2.7.4