From patchwork Tue May 21 12:51:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10953613 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 3E04014C0 for ; Tue, 21 May 2019 12:51:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DCC728A01 for ; Tue, 21 May 2019 12:51:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 221D828A02; Tue, 21 May 2019 12:51:38 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C5B8328A02 for ; Tue, 21 May 2019 12:51:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5vQSTVcz2GN1+G55Mn40KgnI8YRDN3ueUcPG75xPTys=; b=QOEldexyicKa1n cF4RnQsfiQZREOwEhzokZQSCid+ctoHvQDbt9xAvRHX7y851QOSOmOAK5XV2JUESEh0bDBprmWIpn 3S47EtdmVHpc5v6O2Y6SZR9n0/ClI6IdorwfwxL2WNghESY4X5OnvzNUO+WeUkbT70Z1Jl2KpKfvk 4jXkWTRWTY0CDmovakTgA5i2lQ2xk9wCgx9JtIPMl8NVyUwJq0dYNKpNhC6O3IOvMq4a5oXobSEd0 MYy+haaStlUrURNaQzwMRlU+E2kEDPTw4qGcVituit282oALYzSG5exAirnnt0Am0jOh6fxSIz5Sl F0oFVIzj3A/2HszBPBoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hT4Es-0007kK-DC; Tue, 21 May 2019 12:51:30 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hT4Ep-0007hl-2e for linux-arm-kernel@lists.infradead.org; Tue, 21 May 2019 12:51:28 +0000 X-Originating-IP: 90.88.22.185 Received: from localhost.localdomain (aaubervilliers-681-1-80-185.w90-88.abo.wanadoo.fr [90.88.22.185]) (Authenticated sender: miquel.raynal@bootlin.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id EDEB11C0011; Tue, 21 May 2019 12:51:21 +0000 (UTC) From: Miquel Raynal To: Michael Turquette , Stephen Boyd , Russell King Subject: [PATCH v5 3/4] clk: mvebu: armada-37xx-tbg: fill the device entry when registering the clocks Date: Tue, 21 May 2019 14:51:12 +0200 Message-Id: <20190521125114.20357-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190521125114.20357-1-miquel.raynal@bootlin.com> References: <20190521125114.20357-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190521_055127_418657_50773920 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antoine Tenart , Gregory Clement , linux-kernel@vger.kernel.org, Maxime Chevallier , Nadav Haklai , Thomas Petazzoni , Miquel Raynal , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP So far the clk_hw_register_fixed_factor() calls are not providing any device structure. While doing so is harmless for regular use, the missing device structure may be a problem for suspend to RAM support. Since, device links have been added to clocks, links created during probe will enforce the suspend/resume orders. When the device is missing during the registration, no link can be established, hence the order between parent and child clocks are not enforced. Adding the device structure here will create a link between the 4 TBG clocks (registered by this driver) and: * their parent clock: XTAL, * their child clocks: several 'periph' clock. Signed-off-by: Miquel Raynal Reviewed-by: Gregory CLEMENT --- drivers/clk/mvebu/armada-37xx-tbg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c index 992f2d1130b3..6336f6955e92 100644 --- a/drivers/clk/mvebu/armada-37xx-tbg.c +++ b/drivers/clk/mvebu/armada-37xx-tbg.c @@ -117,8 +117,10 @@ static int armada_3700_tbg_clock_probe(struct platform_device *pdev) name = tbg[i].name; mult = tbg_get_mult(reg, &tbg[i]); div = tbg_get_div(reg, &tbg[i]); - hw_tbg_data->hws[i] = clk_hw_register_fixed_factor(NULL, name, - parent_name, 0, mult, div); + hw_tbg_data->hws[i] = clk_hw_register_fixed_factor(dev, name, + parent_name, + 0, mult, + div); if (IS_ERR(hw_tbg_data->hws[i])) dev_err(dev, "Can't register TBG clock %s\n", name); }