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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 9A6B5C433B4 for ; Wed, 12 May 2021 04:41:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C58A613C8 for ; Wed, 12 May 2021 04:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbhELEmy (ORCPT ); Wed, 12 May 2021 00:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbhELEmx (ORCPT ); Wed, 12 May 2021 00:42:53 -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 34DA9C061574 for ; Tue, 11 May 2021 21:41:46 -0700 (PDT) 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 1lgggk-0008Nm-Ch; Wed, 12 May 2021 06:41:38 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lgggf-00008N-Ep; Wed, 12 May 2021 06:41:33 +0200 Date: Wed, 12 May 2021 06:41:33 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Emil Lenngren Cc: Roman Beranek , Thierry Reding , Lee Jones , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-sunxi@googlegroups.com, Roman Beranek Subject: Re: [PATCH] pwm: sun4i: Avoid waiting until the next period Message-ID: <20210512044133.6yfwyluzdx6yfh4c@pengutronix.de> References: <20210511220014.1945519-1-roman.beranek@prusa3d.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="saayrskbwdpt2efe" 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-pwm@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org --saayrskbwdpt2efe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Emil, On Wed, May 12, 2021 at 02:55:26AM +0200, Emil Lenngren wrote: > Well that's one way of "solving it" ;) >=20 > But on what hardware do you really need to wait until one full pulse > cycle ends, before a disable command takes effect? >=20 > On the hardware I've tested on (GR8 and V3s), it's enough to wait at > most two clock cycles in order for it to take effect before we can > close the gate. And with clock cycle I mean 24 MHz divided by the > prescaler. With prescaler 1, that's 84 nanoseconds. By closing the > gate when the pwm should be disabled, I guess we could save some > nanoampere or microampere (is this important?) If I understood correctly you really have to wait longer to achieve that the output is inactive in the disabled state. Do you talk about the same thing? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --saayrskbwdpt2efe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmCbXHkACgkQwfwUeK3K 7Alk8gf+PoEyVuzpjQzz1SYXo6Tvw6FS4eBA8P/AXv6ecUg11n9QjfqsTxOUivq+ MTt6IkNEoR9jqgiWXfoYdyVmZpUt+NGSk/+LlJOih4NQfNQWTMP7bo4sVCC/Msal Hp6RxqUF2HGQE8EwGSELnSAHRcznHulk7j6XDs+DZV4YaY3C/9KaNFhOxFCgiS3T GFM+R0TOrKA3Z4iD8gMiX42jbsaci1zXqsQmwLWDGBZM7X/Jx1b2RC807QJ5V7w1 WvHQgeMmVpB3MTq7Hf87Rvz+nbDDPsQDS92dnd0EzzkW/sXtT6wmPpPVv3o7qJvy gw10lVybXAwQVn56rbxSj6pEzyb7MA== =1cnQ -----END PGP SIGNATURE----- --saayrskbwdpt2efe-- 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=-4.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 43CDEC433B4 for ; Wed, 12 May 2021 04:44:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E89AB617C9 for ; Wed, 12 May 2021 04:44:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E89AB617C9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wPD3d7tSV2i40LRzemT7FCKqcIwbGehJ5N4TpGsUJJ8=; b=EH450r4GsprKQDgM92TvXRoFm vMdOLVmWGF/efwmzu5fU9ILrFdHjLpXBze38xy6NlzLlwdSlZ35UMzbZ0g91m1rJMMbvTyQEiaD/k v7aP2yKDb4qF68GyoghA8yoPxzfa4OlgogYHHOLhnG2OkumPG7WMQ6GX42DjFEnHKT17rA7+WWD+w 8jkPLxM9utBa7ZyBE8fPiopK863FHdujqTnvUcXVvAfCyi9VQpX0OqJy3Iv/LU0W9ZI4KAAvvrNJR cqWMmBuRY6fRngdpWKe7vQBPnlclo1t2Zcwn9X0YE/Yij0rpJTfaAsmmDoK/lsyFTjv3p4+93F3Gj J4pb6dExQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lggh3-001yaX-G6; Wed, 12 May 2021 04:41:57 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgggy-001yaM-AY for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 04:41:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=4ogyEnv14ekxMNqfRW4PtvnMdrzZusXmP+ta4pyhPgA=; b=J5WYXoITmS6dR/9CA7Vs+34vDv 7w1nyzx7ZbhCFSVg54n9Vs7GEFcJDqamJmevcfRmasDMbZLn6LwN/dFb4rIIwqNnkNLmpwbJj1Ujh NtT8CtJRpN8JBky3C5ClWMGwgPqv6s/X0DJssIf+cABfscdRb4beP9UrNfDBoqbUnVWMMR4Np1V2b 9c+ymEge/R5qWV88VfmXjyDNx185zpKrY5Niv8Pd/enSt+NTD6Y23YjHBCOya+ff6evMoY/Hv6oHK ENDxDng+RAkCZKk6VX0OuHfjDII6J3t9FXXdAjqhZawh6nBqAYf2wCn+7qTv4ocYoKJ4QN57klHEV KWEo8TQg==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgggv-00A5re-6R for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 04:41:50 +0000 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 1lgggk-0008Nm-Ch; Wed, 12 May 2021 06:41:38 +0200 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lgggf-00008N-Ep; Wed, 12 May 2021 06:41:33 +0200 Date: Wed, 12 May 2021 06:41:33 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Emil Lenngren Cc: Roman Beranek , Thierry Reding , Lee Jones , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-sunxi@googlegroups.com, Roman Beranek Subject: Re: [PATCH] pwm: sun4i: Avoid waiting until the next period Message-ID: <20210512044133.6yfwyluzdx6yfh4c@pengutronix.de> References: <20210511220014.1945519-1-roman.beranek@prusa3d.com> MIME-Version: 1.0 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-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210511_214149_263194_CBBF5DF8 X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7412907273873554064==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7412907273873554064== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="saayrskbwdpt2efe" Content-Disposition: inline --saayrskbwdpt2efe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Emil, On Wed, May 12, 2021 at 02:55:26AM +0200, Emil Lenngren wrote: > Well that's one way of "solving it" ;) >=20 > But on what hardware do you really need to wait until one full pulse > cycle ends, before a disable command takes effect? >=20 > On the hardware I've tested on (GR8 and V3s), it's enough to wait at > most two clock cycles in order for it to take effect before we can > close the gate. And with clock cycle I mean 24 MHz divided by the > prescaler. With prescaler 1, that's 84 nanoseconds. By closing the > gate when the pwm should be disabled, I guess we could save some > nanoampere or microampere (is this important?) If I understood correctly you really have to wait longer to achieve that the output is inactive in the disabled state. Do you talk about the same thing? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --saayrskbwdpt2efe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmCbXHkACgkQwfwUeK3K 7Alk8gf+PoEyVuzpjQzz1SYXo6Tvw6FS4eBA8P/AXv6ecUg11n9QjfqsTxOUivq+ MTt6IkNEoR9jqgiWXfoYdyVmZpUt+NGSk/+LlJOih4NQfNQWTMP7bo4sVCC/Msal Hp6RxqUF2HGQE8EwGSELnSAHRcznHulk7j6XDs+DZV4YaY3C/9KaNFhOxFCgiS3T GFM+R0TOrKA3Z4iD8gMiX42jbsaci1zXqsQmwLWDGBZM7X/Jx1b2RC807QJ5V7w1 WvHQgeMmVpB3MTq7Hf87Rvz+nbDDPsQDS92dnd0EzzkW/sXtT6wmPpPVv3o7qJvy gw10lVybXAwQVn56rbxSj6pEzyb7MA== =1cnQ -----END PGP SIGNATURE----- --saayrskbwdpt2efe-- --===============7412907273873554064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7412907273873554064==--