From patchwork Tue Dec 4 19:24:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10712497 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 63D6413BF for ; Tue, 4 Dec 2018 19:25:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 550CA295B2 for ; Tue, 4 Dec 2018 19:25:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47BF92C609; Tue, 4 Dec 2018 19:25:30 +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 ED1D52C606 for ; Tue, 4 Dec 2018 19:25:29 +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=AmH8f/j+yzS2+iQeQMWMp8SS5doEN+OEJYTYEpU23q0=; b=qa2e/ZAFsk4i5W T8zOg9en+ZDFMwxAw4JBBC7oIPUm4vctgFKhbkdVO5HakFfsDch9hIt+J8XoWBsGq9XBc5RinnPQg EFARuv5AWuwoHRrChx7tUpCcs8wF69+DQkR1/g9M54J5uu9IHDgSp1k0iVDLZHGY8w2AwUL+yBcmy he3HQ1BZ8apL/QGPg3tJ2kNbQolrIPNjNDyQVRONSAD4W1A4oBbjYNzzTumwMqG5GjFk/EQNFnZuQ gFk/NQ3dWtsbIYoqaoO2kpdyRVHj4erH9bQ8MhPGtJoKVmbP2HhWk815UMfy0zfgKacPU1Io5xeVE wY9bmESXWI7YM9LwTPrQ==; 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 1gUGK0-0006pq-9I; Tue, 04 Dec 2018 19:25:28 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUGJb-0005Kx-VP for linux-arm-kernel@lists.infradead.org; Tue, 04 Dec 2018 19:25:05 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id A0A60207AD; Tue, 4 Dec 2018 20:24:54 +0100 (CET) Received: from localhost.localdomain (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id D8363207B0; Tue, 4 Dec 2018 20:24:43 +0100 (CET) From: Miquel Raynal To: Michael Turquette , Stephen Boyd , Russell King Subject: [PATCH v3 3/4] clk: mvebu: armada-37xx-tbg: fill the device entry when registering the clocks Date: Tue, 4 Dec 2018 20:24:39 +0100 Message-Id: <20181204192440.12125-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181204192440.12125-1-miquel.raynal@bootlin.com> References: <20181204192440.12125-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-20181204_112504_185363_73B52444 X-CRM114-Status: GOOD ( 14.57 ) 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 --- 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 ee272d4d8c24..78de057a2406 100644 --- a/drivers/clk/mvebu/armada-37xx-tbg.c +++ b/drivers/clk/mvebu/armada-37xx-tbg.c @@ -116,8 +116,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); }