Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7043507rdb; Wed, 3 Jan 2024 02:40:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9d+DHRTHDMbaqmND5iw0y61zh0JVG6zI5lG+tDLQeOgIbVxR8Kqxm7BNJkapzUCykhWKy X-Received: by 2002:a05:6830:44a8:b0:6dc:a7d:ed3e with SMTP id r40-20020a05683044a800b006dc0a7ded3emr9823614otv.8.1704278452146; Wed, 03 Jan 2024 02:40:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704278452; cv=none; d=google.com; s=arc-20160816; b=Kbf9jBrBg8wh986BViIx0JFIwbbsjzFqUpJXMGK72VMfyIS3nD1L4B45V2E9jSgyZa mAyDFLvj1ufdCZEd9T59VlW+Q+T9/zw8C70BANyJwMmRUTp1JA2DuosjLUo9GwfXRvuK sCN6ZIk9tJN9JRXC5sGwxg9Eznw8rUZM8ozDS6AtGa5Q+EIL2H7+U6GamPBCNf45htGf IyIDzaxcONDCjc2HGJvCtd/AnrMWBnhHcoiI5608ghN7tpb4FTekyhMt9ZviF0BKMlq4 tzO7kpg9rdxi0lBxcPbeCBHdjd6fJnND54v3LVicJ3QycuDf/ew4UcZIKI/bD1GD1VNM BjPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=v9wkmyy78E8+XyHxSNP71uWACN79oYZvb6tRIuXvX0E=; fh=F6Spce/x2nTNaQMWG1eIJNOjpXIEaMBla1wCrm78P3o=; b=HzzCshDlfxrqJn83RdQCUgxncjU6D+RrkM0nkofFpmxms3p5GoQotsS4+Y7AA7h7/b vlB/F0S0oz7rl/jYg29jpOpJSNN7ihD1Lkxt6NvYsjIsK0WyidSfO7d2mpY9Zbgy/Ndu 6yEOc6IngbwkmmZMUVkNYSaWcHFCytLACdi58w0w1WfG5iH/Ag6rA+/Jt5UmcYA995bL NIs+tWIhvmXm93hdFqAOguhBNoT/Cj6W+Kmg45qE4G99MLiocO5JZCUT0UQBlddE5t9r 6C3PL5ckDJKXThuwvX2C7snA09yLRUBVKlbMjcjdOn6UIAsVqCUfIHBCz4sS46g0LXF6 LJew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15400-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l18-20020a635b52000000b005ce176ad6besi15615883pgm.280.2024.01.03.02.40.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 02:40:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15400-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 752C9B218B8 for ; Wed, 3 Jan 2024 10:40:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 754CC18C2F; Wed, 3 Jan 2024 10:40:46 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail11.truemail.it (mail11.truemail.it [217.194.8.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D3AC18C1D; Wed, 3 Jan 2024 10:40:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dolcini.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dolcini.it 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231229063013.1786-1-pratikmanvar09@gmail.com> 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