Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929448ybl; Thu, 2 Jan 2020 15:01:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwDlRIplTNZPLz/NliW/VV0XwhnPIKQj1KfdSaaguym0XYgBOez6hJ7Xpe8yZSJUEnByEJg X-Received: by 2002:a05:6808:643:: with SMTP id z3mr3236041oih.19.1578006109196; Thu, 02 Jan 2020 15:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006109; cv=none; d=google.com; s=arc-20160816; b=K3pu9NgXWahNVDROEkZJV6Yh06QDPS6ivL8SjkANCGD/COOPq6FclbL0FyZcs5k1DH V0PSE09vr2BwlTh7cyW8Yaxex4LWx8KFD3DIk0Q+qFDMPD+ZufTCCNTAImr5ync2O02H IHeZzuAVgGqxgKMaKOjHnBgD0AXkdn7tz9R64+YNt4PY+0gPygzbh+7fvzr0c0i0tEfm DhkJMExb0AAD218lXt80Bl97gv1ecNCaDQ0gVfuCK3nHDZb2lvjwajLbaKHS7Ol81hDQ MEbzYG48m7Ku11xYitifYnTSaGo/PaG79ujyLC69SwP2MbplbxyAzcRSuYWABsX+Kdnd HMsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C5rubpn39eCPmUsUQgx+3kvaRzfCAs3q/zEm8iDbBMU=; b=K/0647jKC7SBdbwvbIqTbbpA39n4qDrGOBjRkBFB6RLuSz0eTwjWpzMlfeJWAYaGr6 CePh8+Qk/zSCQUkTrH6nbcIbSUdefgvTxVwdQoZ3IQd5JC9oJ4lvBVqcuJtqCeyWrMM8 WPuUKp9stDVKFcsdpsBJ5wLy3thQ2GzS11XorUyyurui9wo1fKylVFBbXY4W3hyiqD+U 0KmCtH7rXwXID1hn8RrcuqucvveBxAk7XlJ42u6JWhuZwKbjC7ms1niIzkiENdhUUP8E HtGZcushY1x8DTjMykroPmenGzbH0eE8Z9LToBFxsXNXXgD17Nu4mYKkBrxdwJz9S3+d 7wag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MNjruq6/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s128si27134770oig.204.2020.01.02.15.01.37; Thu, 02 Jan 2020 15:01:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MNjruq6/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727764AbgABXAX (ORCPT + 99 others); Thu, 2 Jan 2020 18:00:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:52456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727183AbgABWM6 (ORCPT ); Thu, 2 Jan 2020 17:12:58 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7A4C222C3; Thu, 2 Jan 2020 22:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003177; bh=vArQ7SqQAU1H15zmxOhNazLlFgEn8vZiQwMCsvmJwEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MNjruq6/sjcIFuBXVz4L3+hoZ/bh8BDTdAVToBJlZDjiLcDmpi8pK2uWxxhn4yABC w21sAh5cOItXa0BHC3XZXCmQO+pAvCid1Z9QGydsHyLnYz7lYn2cWsQz/sT9TnvWUe uQBITIfKqT7MxSnRFyQ9U0nTL2LQD/xQO47/wzO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Hennerich , Alexandru Ardelean , Stephen Boyd , Sasha Levin Subject: [PATCH 5.4 051/191] clk: clk-gpio: propagate rate change to parent Date: Thu, 2 Jan 2020 23:05:33 +0100 Message-Id: <20200102215835.373104247@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Hennerich [ Upstream commit fc59462c5ce60da119568fac325c92fc6b7c6175 ] For an external clock source, which is gated via a GPIO, the rate change should typically be propagated to the parent clock. The situation where we are requiring this propagation, is when an external clock is connected to override an internal clock (which typically has a fixed rate). The external clock can have a different rate than the internal one, and may also be variable, thus requiring the rate propagation. This rate change wasn't propagated until now, and it's unclear about cases where this shouldn't be propagated. Thus, it's unclear whether this is fixing a bug, or extending the current driver behavior. Also, it's unsure about whether this may break any existing setups; in the case that it does, a device-tree property may be added to disable this flag. Signed-off-by: Michael Hennerich Signed-off-by: Alexandru Ardelean Link: https://lkml.kernel.org/r/20191108071718.17985-1-alexandru.ardelean@analog.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c index 9d930edd6516..13304cf5f2a8 100644 --- a/drivers/clk/clk-gpio.c +++ b/drivers/clk/clk-gpio.c @@ -280,7 +280,7 @@ static int gpio_clk_driver_probe(struct platform_device *pdev) else clk = clk_register_gpio_gate(&pdev->dev, node->name, parent_names ? parent_names[0] : NULL, gpiod, - 0); + CLK_SET_RATE_PARENT); if (IS_ERR(clk)) return PTR_ERR(clk); -- 2.20.1