Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1166544pxv; Fri, 16 Jul 2021 03:14:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD90zbYJY6RurYmFErQH+1CKTDFx0BJ8cB7u40gcEyFyyfOWaYSD12P4SLhYOTUVlEmev1 X-Received: by 2002:a17:907:3e88:: with SMTP id hs8mr10824123ejc.534.1626430472554; Fri, 16 Jul 2021 03:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626430472; cv=none; d=google.com; s=arc-20160816; b=Ea7f4SqkfAgWQKazqcJ29DkLTxlHX5kIPnan/ioqu7NF0Rb1oR11KJ6d/N65zoucM/ tT00ibxn8/Mxy/z8Z902N47/urncxfS2+L0j3g/iO2cHYQJqYa2dfuLU04gT+Ia6rRBK tI4gl5DH3McCzwRxxZvwwbS69Cm1rh6OBXDhSrdhJc8ZifaYN3tHiBxpxVOPlFgpglKw z/uaB+eXLwo+muTL6yBMLrd4NkdpYY4LPjwL+4CUTN3XMqx0C1SuZJlhlnDZYfY/qdNB qdfuUapcA6E4xguI3E2b/3FvzWvOzWCdUA/R7QI+g0yL8tojhdROlEApCi/mKCYBpDHv m68g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=CnBIzmHKUhmpPcHQC4TnWyWs48MKOeYcEMWDXrMVZas=; b=z9sZh+4n20NTYHx3cuVWwt+gJm61uplKHTV9W2A5m/ET1xjqG1uBNo2yJB0Z9xa1a5 R+VKeMLpm+sSyVUb6wpLgc1kr4nlSy0r8gBkDmvkrz90MT/kw0LsnBBKGKdRWHDv/GKM EknwXYHRlB+SLoxB3QY2MyLp9KhLk9qCWwJ1epIzR50p7WY6Vlp+LXLeFbPMGneH+uxr O2bCYAxDVBkRWiADl08rnCu7YqtKAsRQKrqZclNNnmT1opiVw5263nyMztgUZvRu4m7/ RO0HOdeW2Ei+zqOQr2k35D/X6OcOd2BvzC1If6DLZp2B4OleK+iqGaFKj2CGcJJ4b6h4 8OgA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv15si2074850ejc.383.2021.07.16.03.14.09; Fri, 16 Jul 2021 03:14:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236734AbhGPKQL (ORCPT + 99 others); Fri, 16 Jul 2021 06:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235965AbhGPKQK (ORCPT ); Fri, 16 Jul 2021 06:16:10 -0400 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 A19FEC06175F for ; Fri, 16 Jul 2021 03:13:15 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m4KqA-0001KF-3V; Fri, 16 Jul 2021 12:13:06 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m4Kq5-0000E2-I2; Fri, 16 Jul 2021 12:13:01 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m4Kq5-0000Wa-GI; Fri, 16 Jul 2021 12:13:01 +0200 Date: Fri, 16 Jul 2021 12:13:01 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Billy Tsai Cc: "lee.jones@linaro.org" , "robh+dt@kernel.org" , "joel@jms.id.au" , "andrew@aj.id.au" , "thierry.reding@gmail.com" , "p.zabel@pengutronix.de" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-aspeed@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "linux-pwm@vger.kernel.org" , BMC-SW Subject: Re: [v9 2/2] pwm: Add Aspeed ast2600 PWM support Message-ID: <20210716101301.l563tdwt5xuq5iq6@pengutronix.de> References: <20210709065217.6153-1-billy_tsai@aspeedtech.com> <20210709065217.6153-3-billy_tsai@aspeedtech.com> <20210715150533.vppkw5oiomkxmfrn@pengutronix.de> <20210716070943.ayxkz2irkwhgincz@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o6m277jeq5onsbp7" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --o6m277jeq5onsbp7 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Billy, On Fri, Jul 16, 2021 at 09:22:22AM +0000, Billy Tsai wrote: > On 2021/7/16, 3:10 PM, "Uwe Kleine-K=F6nig" wrote: >=20 > On Fri, Jul 16, 2021 at 01:48:20AM +0000, Billy Tsai wrote: > >> On 2021/7/15, 11:06 PM, "Uwe Kleine-K=F6nig" > wrote: > >> > Another is: The PWM doesn't support duty_cycle 0, on such a = request the > >> > PWM is disabled which results in a constant inactive level. > >>=20 > >> > (This is correct, is it? Or does it yield a constant 0 level= ?) > >>=20 > >> Our pwm can support duty_cycle 0 by unset CLK_ENABLE. >=20 > > This has a slightly different semantic though. Some consumer might > > expect that the following sequence: >=20 > > pwm_apply(mypwm, { .period =3D 10000, .duty_cycle =3D 10000, .enabl= ed =3D true }) > > pwm_apply(mypwm, { .period =3D 10000, .duty_cycle =3D 0, .enabled = =3D true }) > > pwm_apply(mypwm, { .period =3D 10000, .duty_cycle =3D 10000, .enabl= ed =3D true }) >=20 > > results in the output being low for an integer multiple of 10 =B5s.= This > > isn't given with setting CLK_ENABLE to zero, is it? (I didn't reche= ck, > > if the PWM doesn't complete periods on reconfiguration this doesn't > > matter much though.) > Thanks for the explanation. > Our hardware actually can only support duty from 1/256 to 256/256. > For this situation I can do possible solution: > We can though change polarity to meet this requirement. Inverse the pin a= nd use > duty_cycle 100.=20 > But I think this is not a good solution for this problem right? If this doesn't result in more glitches that would be fine for me. (Assuming it is documented good enough in the code to be understandable.) Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --o6m277jeq5onsbp7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmDxW6kACgkQwfwUeK3K 7AnuOQf/cdtxnx5ap7eAcXsCJxd1wMM4sHbrRR3Kx2nE9MwAuU44x7P3khR9XSzv 3S2xsnfWdrdxNQY/DOAfuSuCTgZ92BwzHt22OV8tPACYJOKgatgJtupBIBge0Bmh 16uJgAJa8UYl5xYgXwWumLgKR7btLaZRGTg63nyvXfYYyQPo4n5Hej7fE+o2cjBE jpDMoOQCu4dYgaBZXqhhLZDMv7jtfeHeHn71lggEr5PB+xhNBMRKXIcQFqODAnIQ U6u0zGwi696702Zh5iavfwOCTO+NfMUmNBKqNoYn9pDmcclvXh84PDCHHKIj9KII ZlB10IqeSbWdPwhTSWbzqrtcafFLuQ== =Nk6o -----END PGP SIGNATURE----- --o6m277jeq5onsbp7--