Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp788791lqp; Wed, 22 May 2024 22:55:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUcwAI/p/nf8jYRXKP94COkPP920Ntj0pAX41CEx2ASB9ElpWPuUGyfNsb72K50gdUvzD9Q+6vt0KpJ9zdkl0Q0/Zw9BkMirD7ruMY9qw== X-Google-Smtp-Source: AGHT+IEQCr0o7pypBfOdsz5Bzcog11y7FZlO9WDfu4Ywsx+gLDMBx5qPOTcEPtKsV64JIAKwTD17 X-Received: by 2002:ac2:4989:0:b0:51f:567b:c398 with SMTP id 2adb3069b0e04-526bdb5dbf2mr2520790e87.28.1716443747401; Wed, 22 May 2024 22:55:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716443747; cv=pass; d=google.com; s=arc-20160816; b=SJxtlgJ4PikGoJ9sLn3R9P30yWYyY6GpEUX6H6okW5xLKRJjXMy8Ial3nY+0EbOafw Dk7vvSzw64BvVxrQOVgE0tEowFH2d197jWyGvotUOABTzhItT4XLyTr6keenrEOoprME 5ZEjPEY4Qpt20QBF3FJSIlGSp4qzc3UM2jnjXcZoRott2i3FahlpEpw7DZlIJJ4FVtyL VbVWI937PjNCfzMMwihZ0+TJH4wv0yHstmKRCVIeDrntRE3vJe8B5pqfa7zdrz44L/ws eWS96eCvEPrlqa7pmgCJD7nGemln/V5VjKNxMQEcFOq57gCyaMPX3dQuCMUVrvUjfP2k PwqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jY3OZs3TRZ5fmpHwmF6ZDWmp14tMvpciAkxRyO1/MQo=; fh=c8teXOqdYD4g+8mJwdTj2OjrbqX+y+K0tjJ6KlN8w5Y=; b=rxtQqHja3eo5zzOSMvjo2krXpcHRKCX4xH18ACcipJ5nKUevQBS9wNqRqhbkzsDVE4 6MPmzimO/oW4jvJKJvRTMqiYEp9gIG6npkq5/2fooqRyzXVcR1XZru4yW4jDRwrMLG3k 4CQ7hA9P9UwX9WTRhCIILXEvejrnqnvlv6xJFw1+NGpnScg2GXqQuYMBmvfMQYKPrAFQ I85zDdvfqQc5LArNET85T0QhscQA064byoCGusD0nDejG3YK3KMJzglB0gjSg9hMcuOf fA7N2R93oLvfQp9yRfPBljl9Uj8YW3zSAheGTgGsXyN0efdAR8tOxAOq9QHO7HhGxGBo TxHQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jookia.org header.s=key1 header.b=hytQWbFK; arc=pass (i=1 dkim=pass dkdomain=jookia.org dmarc=pass fromdomain=jookia.org); spf=pass (google.com: domain of linux-kernel+bounces-187020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jookia.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-574ece1d0a7si10089671a12.115.2024.05.22.22.55.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 22:55:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187020-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; dkim=pass header.i=@jookia.org header.s=key1 header.b=hytQWbFK; arc=pass (i=1 dkim=pass dkdomain=jookia.org dmarc=pass fromdomain=jookia.org); spf=pass (google.com: domain of linux-kernel+bounces-187020-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187020-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=jookia.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 21DB71F21C36 for ; Thu, 23 May 2024 05:55:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56E9913B2B2; Thu, 23 May 2024 05:55:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jookia.org header.i=@jookia.org header.b="hytQWbFK" Received: from out-185.mta1.migadu.com (out-185.mta1.migadu.com [95.215.58.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC4A5537F5; Thu, 23 May 2024 05:55:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716443739; cv=none; b=JgnKp+nvryWuzHxodqZkTfZNR5firWO6Set/GaarVODhJMJG8q5DFvJ3SVEY2j58/ZXO4/bHQUjIxnzUnLFa5i9KqpgsnTB2h9tv239AYtBPeuhvV1JvkRSfCkRc70iSGfu1DlE0ZgIUJNfz2fsAHdYOpPkaMLTldHXY4vEQBaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716443739; c=relaxed/simple; bh=SxmqM88Y/QvoBAEDVZtTfuZXc6MFXor/37QPRIkhkfo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lQepr3TEs2DCHcX8S09pYZKsYLCURah9riQwIQQYvm601TGOcnaa1yt4j0w4IbVARWU++ScZPxiebtVrrSdeWvzoNf7ra3yPbP1cqIdhJjRRQKFSEQGoEsutlCw0CDdT+HiWYub+kIJHfeTNbTzn9Cb7uPGouEjWcIammjgXUP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jookia.org; spf=none smtp.mailfrom=jookia.org; dkim=pass (2048-bit key) header.d=jookia.org header.i=@jookia.org header.b=hytQWbFK; arc=none smtp.client-ip=95.215.58.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jookia.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=jookia.org X-Envelope-To: kikuchan98@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jookia.org; s=key1; t=1716443735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jY3OZs3TRZ5fmpHwmF6ZDWmp14tMvpciAkxRyO1/MQo=; b=hytQWbFKB3vS3t96pRQn4SK+Ur5QZdeFozP0miOBgRAvWcITv47RA+H3y/L8s41jv2Jvwp 2V3mqNq/STuUork+Ia76faXDFhZL4ZPVJp4uVFqRYa0t0qWzpkA9rgFdAB+oeV0c72NYxL PBbUgqJ5mADP46bcP+qBEZ1ZEOAA+KlwrEcGFSrsbgy2FCZJd+5S03xqmAqedwC1PPR2pc H6K1usInzBMeoeP8VMe/OUHo7JdQqZjr1RwS3T5ADMI6Z6G4iS0BOeMVvQ7846Mdwo0MU3 rQenItiIfmJmr5/f+6MwV4ChKBt6E+oDXNL7sWK6sv2hGNZn32pWDadZJw9llw== X-Envelope-To: privatesub2@gmail.com X-Envelope-To: aou@eecs.berkeley.edu X-Envelope-To: bigunclemax@gmail.com X-Envelope-To: conor+dt@kernel.org X-Envelope-To: devicetree@vger.kernel.org X-Envelope-To: fusibrandon13@gmail.com X-Envelope-To: jernej.skrabec@gmail.com X-Envelope-To: krzk+dt@kernel.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: linux-pwm@vger.kernel.org X-Envelope-To: linux-riscv@lists.infradead.org X-Envelope-To: linux-sunxi@lists.linux.dev X-Envelope-To: mkl@pengutronix.de X-Envelope-To: p.zabel@pengutronix.de X-Envelope-To: palmer@dabbelt.com X-Envelope-To: paul.walmsley@sifive.com X-Envelope-To: robh@kernel.org X-Envelope-To: samuel@sholland.org X-Envelope-To: ukleinek@kernel.org X-Envelope-To: wens@csie.org Date: Thu, 23 May 2024 15:54:00 +1000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: John Watts To: =?utf-8?B?44GN44GP44Gh44KD44KT44GV44KT?= Cc: privatesub2@gmail.com, aou@eecs.berkeley.edu, bigunclemax@gmail.com, conor+dt@kernel.org, devicetree@vger.kernel.org, fusibrandon13@gmail.com, jernej.skrabec@gmail.com, krzk+dt@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev, mkl@pengutronix.de, p.zabel@pengutronix.de, palmer@dabbelt.com, paul.walmsley@sifive.com, robh@kernel.org, samuel@sholland.org, ukleinek@kernel.org, wens@csie.org Subject: Re: [PATCH v9 0/3] Add support for Allwinner PWM on D1/T113s/R329 SoCs Message-ID: References: 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT On Thu, May 23, 2024 at 02:30:32PM +0900, きくちゃんさん wrote: > Hello John, Hello, > > Your method is quite impressive and challenging. > > I think PWM is not only for LCD backlighting, but also for signal generation. > For instance, imagine an application software that sends a stream to > one PWM channel to synthesize sound by changing its period (plays a > square wave). > By your method, if the other PWM channel is used for LCD backlighting, > it may flicker repeatedly on DIV_M changes. > (Or simply both channels for streo sound synthesize, you may hear lots > of pop noise) > > It means the setting of one channel can affect the other, which users > may not anticipate. Does Linux guarantee a flicker-free experience with setting up PWM channels, or that it doesn't affect other channels? How do other drivers handle this situation? Maybe out-sourcing the clocking to the device tree and letting people set the clock and common divisor in the DT would be a good idea, with the HOSC and a common divisor of 1 by default, then error if the value can't be found. This would work for periods from 41ns up to 687ms by default. Using APB would give a better resolution as by default it hangs around 5ns which is nice and divisible by 10. > > Best regards, > kikuchan. John.