From patchwork Fri Nov 30 15:32:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 10706559 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 B426B109C for ; Fri, 30 Nov 2018 15:32:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A51AC301B6 for ; Fri, 30 Nov 2018 15:32:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 991FD30252; Fri, 30 Nov 2018 15:32:53 +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 4123C3024D for ; Fri, 30 Nov 2018 15:32:53 +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=CE5nI23cJH58im fh51/WDJw900MLrOXXrEaksZFmVOZvQqkyPdkru92uQr9OOvA+RgJQDLg+MKwFYHQ38Fa6q4IUvn2 UPWMA1++7PEiW6ZRgmKhlDiCmpqhzsQi2BS+wXoGxkBUhMlc7IB4z1ef1p3vkbVOtHd5wR3AWjcr3 GWuqP/gaQJktwab/ccpqxcci3gVol5oRPXXvCyhEexV7ZQEYKbu+TeiVQFaRYnMdCdiCZSMVKeUJZ XSekcdc8J2cT53n91ukIeUdXtkywkHmcw61bc2BSfgj0/w3kBuQ0HsE8lYtbPT6HgIbMz7/Q7Ghj0 9Hh85O9GZ/28GLGMvA+w==; 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 1gSkmg-0004Wb-3k; Fri, 30 Nov 2018 15:32:50 +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 1gSkmc-0004VB-Ul for linux-arm-kernel@lists.infradead.org; Fri, 30 Nov 2018 15:32:48 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id C3F72207B0; Fri, 30 Nov 2018 16:32:36 +0100 (CET) Received: from localhost.localdomain (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id 116A920CFA; Fri, 30 Nov 2018 16:32:26 +0100 (CET) From: Miquel Raynal To: Michael Turquette , Stephen Boyd , Russell King Subject: [PATCH v2 3/4] clk: mvebu: armada-37xx-tbg: fill the device entry when registering the clocks Date: Fri, 30 Nov 2018 16:32:13 +0100 Message-Id: <20181130153214.9058-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181130153214.9058-1-miquel.raynal@bootlin.com> References: <20181130153214.9058-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-20181130_073247_141520_57EB8BEF X-CRM114-Status: GOOD ( 14.54 ) 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); }