linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: John Watts <contact@jookia.org>
To: きくちゃんさん <kikuchan98@gmail.com>
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
Date: Thu, 23 May 2024 15:54:00 +1000	[thread overview]
Message-ID: <Zk7Z-MfdF-YKWeJ6@titan> (raw)
In-Reply-To: <CAG40kxFxE_Oj+9aCzGku0a3KFHpuW8ai=gEkV9M8==5gwmjdEA@mail.gmail.com>

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.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-23  5:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAG40kxGMu-TSchNezkcC_A97hzPnWU3KxeL-X-hJfPhjr_COyQ@mail.gmail.com>
2024-05-23  3:04 ` [PATCH v9 0/3] Add support for Allwinner PWM on D1/T113s/R329 SoCs John Watts
2024-05-23  5:30   ` きくちゃんさん
2024-05-23  5:54     ` John Watts [this message]
2024-05-24 11:32       ` きくちゃんさん
2024-05-20 18:42 Aleksandr Shubin
2024-10-08 15:10 ` Chris Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zk7Z-MfdF-YKWeJ6@titan \
    --to=contact@jookia.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=bigunclemax@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fusibrandon13@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kikuchan98@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mkl@pengutronix.de \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=privatesub2@gmail.com \
    --cc=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=ukleinek@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).