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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31213C3DA6E for ; Wed, 3 Jan 2024 10:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e+FOseAyL4CWR7nLyeIoqd3E/Q+vXaEDpTRspNTA5MI=; b=DXi+skJA/g91SX 2WmGjloZLP5LVJlJqLr3BK+UDOEBj0p/YiWXqpMpRd4aTLBPSlmk0inVof+NG7bU405bh/yhukc+i 8LMnnTLyCzKVgLiwMchCh/FSKutWJbRjplgGTKeNhWshjXpRlL+2BAEUlRfqayrPPPbzVJlpJPyoV czac3gfe5HgPC6YS9MWgJkQQal7PzXC143lhSRb+zkK6bs2XQXaD66ERfVs33pi8RZJDlakln+XaK 9+Lo/Mphg+FoijBT50X6FqqytdIz2di74saf01zU20LEEFzp4xjVQnzf/7AHx6aKyzGeLYFDEvzLC 1b/HEhEqwlCqD7rd8+Ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rKya5-00APQG-2S; Wed, 03 Jan 2024 10:34:37 +0000 Received: from mail11.truemail.it ([217.194.8.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rKya2-00APPP-0Q for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2024 10:34:36 +0000 Received: from francesco-nb (93-49-2-63.ip317.fastwebnet.it [93.49.2.63]) by mail11.truemail.it (Postfix) with ESMTPA id C288828136; Wed, 3 Jan 2024 11:34:25 +0100 (CET) Date: Wed, 3 Jan 2024 11:34:21 +0100 From: Francesco Dolcini To: pratikmanvar09@gmail.com Cc: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Clark Wang , Jun Li , Pratik Manvar Subject: Re: [PATCH] pwm: imx27: workaround of the pwm output bug Message-ID: <20240103103421.GA3758@francesco-nb> References: <20231229063013.1786-1-pratikmanvar09@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231229063013.1786-1-pratikmanvar09@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240103_023434_346891_D2690764 X-CRM114-Status: GOOD ( 15.31 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 29, 2023 at 12:00:07PM +0530, pratikmanvar09@gmail.com wrote: > From: Clark Wang > > This fixes the pwm output bug when decrease the duty cycle. > This is a limited workaround for the PWM IP issue TKT0577206. > > Root cause: > When the SAR FIFO is empty, the new write value will be directly applied > to SAR even the current period is not over. > If the new SAR value is less than the old one, and the counter is > greater than the new SAR value, the current period will not filp the > level. This will result in a pulse with a duty cycle of 100%. > > Workaround: > Add an old value SAR write before updating the new duty cycle to SAR. > This will keep the new value is always in a not empty fifo, and can be > wait to update after a period finished. > > Limitation: > This workaround can only solve this issue when the PWM period is longer > than 2us(or <500KHz). > > Reviewed-by: Jun Li > Signed-off-by: Clark Wang > Link: https://github.com/nxp-imx/linux-imx/commit/16181cc4eee61d87cbaba0e5a479990507816317 > Tested-by: Pratik Manvar You need to add your signed-off-by at the end when sending a patch, no matter if you are the author or not. Francesco _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel