Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7357448imu; Mon, 3 Dec 2018 11:32:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/XWGrRylnf8IMOoYwx0rc1ZatZW/CMVvVCANmBmWplj+2cwlnMgydrctC94gX1fnd/kh8ON X-Received: by 2002:a63:f111:: with SMTP id f17mr14293491pgi.236.1543865564097; Mon, 03 Dec 2018 11:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543865564; cv=none; d=google.com; s=arc-20160816; b=rPZXAYPLCrwwM+G6j9ATmPCsGx6drMUHHxE/YLji9sFZTAWaiO1F8fKeobM3kE7l0a 1DJpQTxwwuXPnZ1G+5J6xAUDC+eMsRlmPD2/ZKF+fNAiRKT+xK9f/JXF6bGFCvlPhtI7 6NUYFzyFA86OQY+OfUyDxp62VF53ykUAXtjtr/gHRfPY4pyhLa/ldKGxeTZtLzXDpZ3c 2jfnp6Ulz0oLavs0kaz6sLzHORS2GuYnbV9bQSXJf+h/PUNuzzlRg68WsV9ARupR7M/Y DmBuPAZcbjtfdRJdwdFI1N8QtQfRmFXpd908p/KI8yqWELNa0+DK0fJLjGWhx0WTYfUM Q/Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature; bh=/tu1B3Tvpt5e9OWM4uOsnuS5dI/SkfzdXsllXp+AuSM=; b=ArNTBMzS4FNgnsGE/9RXOTeEeiYEfhzP21USgfJTa+MWvn4ikQlOVDTcPUr6Cg1+cw 59msVvbpA6oFwmxQSE/ncgkoC0vt35ljPstxKA4LicU1YNbnld1mBS2QsBKxHcnsCVHE 6S21Fe+U1NsAOKKc+KHvD+mjA81O29AmoMCgPSKA87l8hLw8FvGY1BoUAlT2ENJes1C/ RjCgrNe52rMz1uaEkbhnEkIJg5sxZuHvATO/36vTAFZXk9VNyLpnnAFRrBJi4YJZw0Oq YK9LyKqOaVhoihxlUPDO3DBOx8UQI5XNWiRvspDZZKTIh02k/y2hpScuQNbcTg4PVCdd w5dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="LZ3SS/sE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b19si10465082pfm.100.2018.12.03.11.32.28; Mon, 03 Dec 2018 11:32:44 -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="LZ3SS/sE"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726003AbeLCTby (ORCPT + 99 others); Mon, 3 Dec 2018 14:31:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:48946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbeLCTby (ORCPT ); Mon, 3 Dec 2018 14:31:54 -0500 Received: from localhost (unknown [104.132.0.74]) (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 1A5812146D; Mon, 3 Dec 2018 19:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543865508; bh=/tu1B3Tvpt5e9OWM4uOsnuS5dI/SkfzdXsllXp+AuSM=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=LZ3SS/sE7WdlrSOAvvai2uJz+RrR6ISX2hCvwVxIDjDCJnTF4HMLJmUwIXwRdEL/g hNkBrB0kpEuDuVoO6UeqHwsv3za+SlCs2jaxJg4MrC+bBxhOQ8qvhxk9rj1oM+yfCc d3MGfJ+pa7GgWl/b5hqAFSn8yo/6oa9cLnHpY41s= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: "A.s. Dong" , "linux-clk@vger.kernel.org" From: Stephen Boyd In-Reply-To: <1542200198-3017-2-git-send-email-aisheng.dong@nxp.com> Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "mturquette@baylibre.com" , "shawnguo@kernel.org" , Anson Huang , Jacky Bai , dl-linux-imx , "A.s. Dong" , Stephen Boyd References: <1542200198-3017-1-git-send-email-aisheng.dong@nxp.com> <1542200198-3017-2-git-send-email-aisheng.dong@nxp.com> Message-ID: <154386550758.88331.8573266036365450221@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH V6 1/9] clk: imx: add gatable clock divider support Date: Mon, 03 Dec 2018 11:31:47 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting A.s. Dong (2018-11-14 05:01:35) > For dividers with zero indicating clock is disabled, instead of giving a > warning each time like "clkx: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not > set" in exist code, we'd like to introduce enable/disable function for it. > e.g. > 000b - Clock disabled > 001b - Divide by 1 > 010b - Divide by 2 > ... > = > Set rate when the clk is disabled will cache the rate request and only > when the clk is enabled will the driver actually program the hardware to > have the requested divider value. Similarly, when the clk is disabled we'= ll > write a 0 there, but when the clk is enabled we'll restore whatever rate > (divider) was chosen last. > = > It does mean that recalc rate will be sort of odd, because when the clk is > off it will return 0, and when the clk is on it will return the right rat= e. > So to make things work, we'll need to return the cached rate in recalc ra= te > when the clk is off and read the hardware when the clk is on. > = > NOTE for the default off divider, the recalc rate will still return 0 as > there's still no proper preset rate. Enable such divider will give user > a reminder error message. > = > Cc: Stephen Boyd > Cc: Michael Turquette > Cc: Shawn Guo > Signed-off-by: Dong Aisheng > = > --- Applied to clk-next