Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp353645pxb; Wed, 3 Nov 2021 05:26:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsxjnrD1dUWoM8jYP4MktTOSWezPpXbynLPlxuxTU6FZKOpvuG+JiuKjcaeV1+3tyX5RLA X-Received: by 2002:a5d:8c8b:: with SMTP id g11mr22573040ion.116.1635942377310; Wed, 03 Nov 2021 05:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635942377; cv=none; d=google.com; s=arc-20160816; b=Z+G6D52zQYRu1TUw1AXWOMVrUaqlud8RCIPkoxD/WiAs04XsUxDPmoY2bj7mqB6sLk spnaNS5IWw2uvMPeMHmCwljyDdtH7vhrZPxZAefcxuwta6VI1mzDhZV433m4dFVSVlpv WiIJlq6unl7xij62OJGaRe6/2bArXaxJRD8ofUHH8Arxi+E7jtVlxVyDG0lDeKqyjquU eJ58cwAIkZwlD5ocrGtXFOuZq50+68VZYtOEQ2LHQpFvj61z75WWrVe1QhhZmXyYFSEX hStm70Dx7rRLcsM+MFmUpen4wONdzpE3a3ilOxp+hwlrPiZ2lmEiHWx+MyrQ6rB3Td6r RqnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=Z00lcqhZKxm6cRgN3F0meupfTSXsJK00NC3Jk6wxYPs=; b=WI9RccAuaJceW5utwssDOWhWXAf/t3xtqoGVwBemlnrNPA6to2iNzBgrH9wuuXG/Yj 2F3JR5KKWgIVZhmwmVz9Aay+sgwsYI9IhKUIZz/RT0Ti2r3OPW3uluthYmN+9BDywrs3 I+8VUEmxU3kXRhr0gSMHwGk0IfrmdMAUAGyCE6QQiu4EWkVyZWVO6WjjmlUCbGniSW+7 vEZvBlQ6+0M9UstJY1HoovU0mdlX/pJG46Q9pq+bMqn6mYyCehy/nVUlx5Q5xpxkuMIw CzQjhVkS3b5DinT+Kls/JdtaaBIRgms9FLwVpcBB+x9ZwhF+FkSO/CLtFn7X3SW+pDio FGtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="W2+58/cm"; dkim=pass header.i=@tq-group.com header.s=key1 header.b=GqSmWbEQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si2798028ioo.85.2021.11.03.05.26.06; Wed, 03 Nov 2021 05:26:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b="W2+58/cm"; dkim=pass header.i=@tq-group.com header.s=key1 header.b=GqSmWbEQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbhKCM12 (ORCPT + 99 others); Wed, 3 Nov 2021 08:27:28 -0400 Received: from mx1.tq-group.com ([93.104.207.81]:28389 "EHLO mx1.tq-group.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231434AbhKCM12 (ORCPT ); Wed, 3 Nov 2021 08:27:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1635942292; x=1667478292; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z00lcqhZKxm6cRgN3F0meupfTSXsJK00NC3Jk6wxYPs=; b=W2+58/cmfvx39Jxt/CnmOW8wCfLKIgTym17U8k/Ag/SpbMqkdZvOI2Ev JNYXfU6A2QFQZYSP3InlZDhF08PCuHMeBwOnZl3VTB3GFAyJUSEeUSSFd Lv2Icbd0rqBqCg/EhNbzQ+wpumFJu/XHXtQkOihWSthMmpm6aFbHpa45N xSkdsaG39TPsD+i2IrZYlyIXhgl4z49SIwF3nDWleXdQWgsck4NUABRAF ng8ly1j9VdAjaYL2W1fpyhY+Uy73+e5psjK1xdp7IRLIQTiSF5SZedqpu NAsPOWh0H29KxI+KLyrapdnjlJtVLIgQfIs9ZTC1/ld3huIf1/AOxLvuB A==; X-IronPort-AV: E=Sophos;i="5.87,205,1631570400"; d="scan'208";a="20324227" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 03 Nov 2021 13:24:50 +0100 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 03 Nov 2021 13:24:50 +0100 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 03 Nov 2021 13:24:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1635942290; x=1667478290; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z00lcqhZKxm6cRgN3F0meupfTSXsJK00NC3Jk6wxYPs=; b=GqSmWbEQ9yW3bDGGwdU10oMwVF1OEyr3IlfPoYcCwXuGxfG5FrnB+711 tbBrAFobRwoLYc4my87d37apLjYGjcXmLRJW5Tq2oM+B1d9hlOEQxFqIz LZJH+tAD+3btWMyQKfHfEkubu55wziNQvlHlnNn0H//1O1zUx4LZGfXv7 S0CwtQ0Zcbor1Q6IIquY/exoKYpNJF+AjqWYavnTtMvnitOzSwiQa0PFe fHt7alVTVcHJgZIHUavVwpNC+Y+LdvmUEOMR1GNE+B80J35HjpaYtAAQu RSWQnaykwGklGG9Yr8F4NzAZw5E4f7fGNYagZzwlqf979Zq+svnFQeBVa g==; X-IronPort-AV: E=Sophos;i="5.87,205,1631570400"; d="scan'208";a="20324226" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 03 Nov 2021 13:24:50 +0100 Received: from steina-w.tq-net.de (unknown [10.123.49.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id 4132B280065; Wed, 3 Nov 2021 13:24:50 +0100 (CET) From: Alexander Stein To: Michael Turquette , Martin Blumenstingl Cc: Alexander Stein , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] clk: composite: Fix 'switching' to same clock Date: Wed, 3 Nov 2021 13:24:41 +0100 Message-Id: <20211103122441.3208576-1-alexander.stein@ew.tq-group.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During commit 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available") setting req->best_parent_hw got lost, so best_parent_hw stays NULL during switch to the same parent. This results in the (debug) message: clk_calc_new_rates: lcdif_pixel not gated but wants to reparent and the following rate change is dropped. Fixes: 6594988fd625 ("clk: composite: Use rate_ops.determine_rate when also a mux is available") Signed-off-by: Alexander Stein --- This is on linux-next tag 'next-20211101' and platform is a custom imx8mq board. drivers/clk/clk-composite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index c04ae0e7e4b4..b9c5f904f535 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -97,6 +97,7 @@ static int clk_composite_determine_rate(struct clk_hw *hw, return ret; req->rate = tmp_req.rate; + req->best_parent_hw = tmp_req.best_parent_hw; req->best_parent_rate = tmp_req.best_parent_rate; return 0; -- 2.25.1