From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57F38C43387 for ; Tue, 8 Jan 2019 16:19:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D5222087F for ; Tue, 8 Jan 2019 16:19:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729350AbfAHQT6 (ORCPT ); Tue, 8 Jan 2019 11:19:58 -0500 Received: from mail.bootlin.com ([62.4.15.54]:44445 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729165AbfAHQTo (ORCPT ); Tue, 8 Jan 2019 11:19:44 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 3DF7420A0D; Tue, 8 Jan 2019 17:19:42 +0100 (CET) Received: from localhost.localdomain (aaubervilliers-681-1-45-241.w90-88.abo.wanadoo.fr [90.88.163.241]) by mail.bootlin.com (Postfix) with ESMTPSA id E5C09207A3; Tue, 8 Jan 2019 17:19:41 +0100 (CET) From: Miquel Raynal To: Michael Turquette , Stephen Boyd , Russell King Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Antoine Tenart , Maxime Chevallier , Gregory Clement , Nadav Haklai , Miquel Raynal Subject: [PATCH v4 3/4] clk: mvebu: armada-37xx-tbg: fill the device entry when registering the clocks Date: Tue, 8 Jan 2019 17:19:39 +0100 Message-Id: <20190108161940.4814-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190108161940.4814-1-miquel.raynal@bootlin.com> References: <20190108161940.4814-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 77b978c55ef6..da3a08e419d6 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); } -- 2.19.1