Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1071671ybf; Thu, 27 Feb 2020 04:34:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyFVQB6FdjObGtQ0Jdv9X4K3/7H01Dr1UTuAJeSdUoMy7ZddIU5fpGvGTdoo41qSzUQbKVU X-Received: by 2002:a05:6830:1e72:: with SMTP id m18mr2958588otr.226.1582806877702; Thu, 27 Feb 2020 04:34:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582806877; cv=none; d=google.com; s=arc-20160816; b=S2HZ2tQc6KdQOkAOa4rOB+z9Jq2nMguJ0W0sSwsE799BihJKCNto5yVnPTA3JBGIrz oggRJh+YAWLVObBtzwOuuXBCfJkCcu5YdCo9A+TGTYKhblG0Cu3xvgc2IS7sMapaSlPo UZ1QFTNzZzJJncG9ZqAEvNW9k+uZzkKCh+Km3IepW675m6pU2twkWGZe3dLAPQTnwCZ7 7Lr/P92XW+XDgzUU+vExaSytunDDPGgQvpDLkCbkJtwTMZoOL/+uXTiDfYoJZxEdMN8M T5Gi6vKllN7pTL4fNd6dySmtMZj+C8tcBM+f4e8sZ+AEGKkl7Rjr6on+eSzQInwS1lhf tX+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=SsRwZwMIlhAKoQDMDZwzD9pAhoLemPlDYFFKzZA4scE=; b=T1m0Yb5VFcZ2Am7CxvuHRD5gbCmnf1afr+eP/FoxRa5qCuX5At6eAG3B+StcjVUtT7 aau/x9/kWwne+xxdg6N5FrNLGiprRWbL5NSuup1Zj/OlTovir6r8e2pCeSGgHCk+Ja5+ oLxhI3zapr3j2zmy1xQJr0ZKct3RSg3+ihrL8f8GI+erPwizx3PTZZGI94AYCqhf7Z88 RsaXwikVA3WrHbn52ZCAsV/cIr/gtJJN3qGIXoOkYWNUePgD0a7KW9S8s1XDQInEsWIu GK4Dn6puaVNBLN9u/bFjFM3/OYIF6GluLzpxru1SE7DQKKZ0vEcYYDe3be4kFUX8N6Wv e0oA== ARC-Authentication-Results: i=1; mx.google.com; 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 m17si1521682otk.109.2020.02.27.04.34.26; Thu, 27 Feb 2020 04:34:37 -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; 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 S1729021AbgB0MdR (ORCPT + 99 others); Thu, 27 Feb 2020 07:33:17 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:55181 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728964AbgB0MdR (ORCPT ); Thu, 27 Feb 2020 07:33:17 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7ILr-00083D-5Z; Thu, 27 Feb 2020 13:33:15 +0100 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1j7ILq-0005l7-Ir; Thu, 27 Feb 2020 13:33:14 +0100 Date: Thu, 27 Feb 2020 13:33:14 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Sam Shih Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Thierry Reding , linux-mediatek@lists.infradead.org, John Crispin , Matthias Brugger , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/1] pwm: mediatek: add longer period support Message-ID: <20200227123314.mkg6jqai64b3paxw@pengutronix.de> References: <1582789610-23133-1-git-send-email-sam.shih@mediatek.com> <1582789610-23133-2-git-send-email-sam.shih@mediatek.com> <20200227080450.rkvwfjx6vikn5ls3@pengutronix.de> <1582797590.25607.10.camel@mtksdccf07> <20200227105244.orwitjst3wzoqcsq@pengutronix.de> <1582806427.27775.1.camel@mtksdccf07> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1582806427.27775.1.camel@mtksdccf07> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Sam, On Thu, Feb 27, 2020 at 08:27:07PM +0800, Sam Shih wrote: > > > > > > + /* The pwm source clock can be divided by 2^clkdiv. When the clksel + > > > * bit is set to 1, The final clock output needs to be divided by an + * > > > extra 1625. > > > + */ > > > > I'd write: > > > > The source clock is divided by 2^clkdiv or iff the clksel bit is set by > > 2^clkdiv + 1625. > > > > Great, the comment is short and clear. > But maybe change “2^clkdiv + 1625” to “the product of 2^clkdiv and 1625” > is clearer ? Writing a formula in words isn't helpful. If my formula was wrong use the right one. I wrote 2^clkdiv + 1625 (which implicitly means (2^clkdiv) + 1625), if this is wrong write 2^clkdiv * 1625 or whatever is the right one then. And use parenthesis if you doubt clearness. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |