From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52BD5C43331 for ; Mon, 11 Jan 2021 20:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31EC822C7E for ; Mon, 11 Jan 2021 20:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390366AbhAKUZJ (ORCPT ); Mon, 11 Jan 2021 15:25:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389057AbhAKUZJ (ORCPT ); Mon, 11 Jan 2021 15:25:09 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3407BC0617A2 for ; Mon, 11 Jan 2021 12:24:29 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kz3jh-0007Uq-He; Mon, 11 Jan 2021 21:24:21 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kz3ja-0001z8-7K; Mon, 11 Jan 2021 21:24:14 +0100 Date: Mon, 11 Jan 2021 21:24:13 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Baruch Siach Cc: Thierry Reding , Lee Jones , Linus Walleij , Bartosz Golaszewski , Andrew Lunn , Gregory Clement , Russell King , Sebastian Hesselbarth , Thomas Petazzoni , Chris Packham , Sascha Hauer , Ralph Sennhauser , linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 5/5] gpio: mvebu: document zero pwm duty cycle limitation Message-ID: <20210111202413.lk3mxthlqagdhy7t@pengutronix.de> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="v2xxeaykrhgusqf3" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 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-gpio@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org --v2xxeaykrhgusqf3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 11, 2021 at 01:17:06PM +0200, Baruch Siach wrote: > Add a comment on why the code never sets the 'on' register to zero. >=20 > Reported-by: Uwe Kleine-K=F6nig > Signed-off-by: Baruch Siach > --- > drivers/gpio/gpio-mvebu.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c > index eb7456fa6d86..4261e3b22b4e 100644 > --- a/drivers/gpio/gpio-mvebu.c > +++ b/drivers/gpio/gpio-mvebu.c > @@ -706,6 +706,7 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, str= uct pwm_device *pwm, > val =3D DIV_ROUND_UP_ULL(val, NSEC_PER_SEC); > if (val > UINT_MAX) > return -EINVAL; > + /* zero 'on' value does not work as expected for some reason */ What does the reference manual say about this? If there is no information about this, please point this out, too. (Something like: The reference manual is silent about this issue though.) Also I'd prefer to read about the behaviour, so maybe mention that there is an occational peek even when on is configured to 0. Does '$off =3D 0' has a symmetrical issue? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --v2xxeaykrhgusqf3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl/8s+oACgkQwfwUeK3K 7Alr7ggAnP3afhu4El+ecWi64C9XayPFiu4UfcCC6ai1wxeTxNzS7ZOG+pvAPCzv bKmaHYLUAoJ6LcBgaeSpfZOo0D5jSsn90IHJtxvihHxZz7j9/kZ/5g7OQsrhBbR4 F8/b25GnC43fsrTJ/NRVveHbO2g1PawLWFJrkm83szPH7AuLFYtnSUYcl0mAyoBZ RXZlHqgueE5DownntoPX/L8RRvGzesqrvSsGuepb69vzxwhgvFRyTfOOezauQOqL 7mXmAiBSLNSLFxJV34vJD6tVc5tigmgryhm2BlNYocnrSLhh5FwT902UfHrYplJK jX3DCkWu6K7ASfwi8SQkD8hoWxBg2g== =hvxu -----END PGP SIGNATURE----- --v2xxeaykrhgusqf3--