Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7086284rdb; Wed, 3 Jan 2024 04:20:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IERAOM+lcOHF50YRO675v4cmYZ8r77Kdn1jriXRgBWRnS3WfNYKmeJ1gCq/3CuRCOVUDbas X-Received: by 2002:a05:6512:2303:b0:50e:9fa0:c1ed with SMTP id o3-20020a056512230300b0050e9fa0c1edmr1439490lfu.94.1704284459425; Wed, 03 Jan 2024 04:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704284459; cv=none; d=google.com; s=arc-20160816; b=kJ2s8CfGrbgCtiamvygdjMSzSX6C2fzla+UPMWhjjpiMH32bp83VpFc36yyapi2+// yp5ucSBPqxo8MU8FPvgIVHZjGkIjXa3dj+Xlby0OTQsbkUAcplIMh8dRmwAnFhLPxrc3 qNJKIQE2A9OApJsncQgrUWHlOXyd/uZNbpYmWV64QVrWnA23L975Nx2tf5n/86EhV6H8 jjUbR8qOEmIy2pLl+WV+oA/or5CB9g4KlsagMz/Zq7oASvqkE42e4KMMYREj47Vl5zKA VOqPjTVABt09Q2jTT3lc/t5MihF0ivakDoC8k2hYTXFyos7wf7O54R+xW6uT03B+0Noz zxrA== 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=U99EPbiGvZ0Bx0ZK2oYlNokfJIglzy0UjLVQR9xBPO8=; fh=8G3R6xGgAOLu78ng6xel6rbs5sFTNBMjXbovwym0epc=; b=ix+O+56dqfnkkPFZ3wCpllhmuYqMEnleUOnpA2Lk0lZgQQEJa26n2X7E69QWq6zB3j MI04AN4tlpJTV4LcdTXbWgk1OgI4+uDxbLebrf+lWVOPi1hW61IEsi5gqTEVWUTEOWVM HTX/QQI67d5sbew6S0+y8nTFBpi9/X+YbTIJGJ4Z1u0zTdQzMzJvWT/4AJpS2/iqFsnb ciaXoXw+RtxUCwRUGRpMpVr9afk/VBhuv3cyPa0ol38pT45VUL2Ez2FOOy1Vn5dakYfV QX+ZgdmiRlQj/XtsCTkmPD2r7XcbYpNxZvYuBL/DTCnIsh/Li7p7qPL7XJPY50ecWovT zwfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15505-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n10-20020a170906700a00b00a2774b21bcbsi4641353ejj.774.2024.01.03.04.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 04:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15505-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15505-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CA88A1F24024 for ; Wed, 3 Jan 2024 12:20:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C729199CE; Wed, 3 Jan 2024 12:20:17 +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 9DFBB199BF; Wed, 3 Jan 2024 12:20:12 +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 C707428144; Wed, 3 Jan 2024 13:20:09 +0100 (CET) Date: Wed, 3 Jan 2024 13:20:05 +0100 From: Francesco Dolcini To: pratikmanvar09@gmail.com Cc: francesco@dolcini.it, festevam@gmail.com, jun.li@nxp.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, oe-kbuild-all@lists.linux.dev, pratik.manvar@ifm.com, s.hauer@pengutronix.de, shawnguo@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, xiaoning.wang@nxp.com Subject: Re: [PATCH v3] pwm: imx27: workaround of the pwm output bug Message-ID: <20240103122005.GA3347@francesco-nb> References: <20240103103421.GA3758@francesco-nb> <20240103110200.1018-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: <20240103110200.1018-1-pratikmanvar09@gmail.com> Hello Pratik, On Wed, Jan 03, 2024 at 04:32:00PM +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 > Signed-off-by: Pratik Manvar A very similar patch was already send in 2021 [1], did it had review comments not addressed? Please have a look. In general please refrain from sending a new patch version every other day, while every Linux kernel subsystem has different rules and a difference pace of development, in this specific case sending a v3 just adding your signed-off-by without allowing a little bit of time to wait for more feedback is just not sane. [1] https://lore.kernel.org/all/?q=dfn%3Adrivers%2Fpwm%2Fpwm-imx27.c+AND+b%3A%22Clark+Wang%22 Francesco