mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kumar, Udit" <u-kumar1@ti.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Gokul Praveen" <g-praveen@ti.com>
Cc: "Rafael V. Volkmer" <rafael.v.volkmer@gmail.com>,
	<j-keerthy@ti.com>, <linux-kernel@vger.kernel.org>,
	<linux-pwm@vger.kernel.org>, <n-francis@ti.com>,
	<u-kumar1@ti.com>
Subject: Re: [PATCH v2] pwm: tiehrpwm: Enable EHRPWM controller before setting configuration
Date: Mon, 19 Jan 2026 20:30:08 +0530	[thread overview]
Message-ID: <29dc86d5-080c-4af2-8e19-99a137c55f2f@ti.com> (raw)
In-Reply-To: <hvz5lw4xvujmdruoi2h2wk4dvanyg7y5xp5tp2rs4dygmza3s3@idcjbz6wbxh4>

Hi Uwe/Gokul,

On 1/12/2026 12:52 PM, Uwe Kleine-König wrote:
> Hello Gokul,
>
> On Mon, Jan 12, 2026 at 11:21:50AM +0530, Gokul Praveen wrote:
>> On 10/01/26 04:23, Uwe Kleine-König wrote:
>>> As I cannot reproduce the issue, can you please check if adding
>>>
>>> 	pm_runtime_get_sync(pwmchip_parent(chip));
>>>
>>> to the probe function makes the problem disappear? Also please boot with
>>>
>>> 	trace_event=pwm
>>>
>>> on the command line and provide the content of
>>> /sys/kernel/debug/tracing/trace after reproducing the problem.
>> sure Uwe, I will try this from my side.
>>
>> In the meantime, will you able to test the same on TI J784S4 EVM as the
>> issue was reproduced on this board.
> I don't have such hardware, sorry. The boards with TI SoC on my desk are
> only a Beaglebone Black and a BeaglePlay. (And I didn't setup the
> BeaglePlay yet, it was already quite a hassle to make the boneblack work
> with a recent kernel. In the end it looks trivial, but
> https://salsa.debian.org/kernel-team/linux/-/merge_requests/1777 plus
> unreliable netbooting in the bootloader took me several hours to sort
> out.)

I am able to see this issue on J7200 hardware ,

LTM, it may work on certain devices, depending upon how LPSC (Local 
power state controller) and PSC (power state controller))

are managed.

In original code , while putting sync at

https://elixir.bootlin.com/linux/v6.18.6/source/drivers/pwm/pwm-tiehrpwm.c#L293 


will leads to calling genpd driver [0], which may put PWM IP in powered 
down state, leading to loosing contents.

So, we need retain pm count (genpd on in fact) between config and enable 
call.

Therefore this patch LGTM

https://gist.github.com/uditkumarti/6e36ca14423afc06378b8fa447ca3fe6




> Best regards
> Uwe

  reply	other threads:[~2026-01-19 15:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  5:53 Gokul Praveen
2026-01-07  9:51 ` Uwe Kleine-König
2026-01-07 10:23   ` Gokul Praveen
2026-01-07 19:47   ` Rafael V. Volkmer
2026-01-08  6:40     ` Gokul Praveen
2026-01-08 18:10       ` Uwe Kleine-König
2026-01-09  5:51         ` Gokul Praveen
2026-01-09 22:53           ` Uwe Kleine-König
2026-01-12  5:51             ` Gokul Praveen
2026-01-12  7:22               ` Uwe Kleine-König
2026-01-19 15:00                 ` Kumar, Udit [this message]
2026-01-19 21:33                   ` Uwe Kleine-König
2026-01-20  4:40                     ` Kumar, Udit
2026-01-20  5:53                       ` Gokul Praveen
2026-01-20  8:23                         ` Uwe Kleine-König
2026-01-20  8:34                           ` Gokul Praveen
2026-01-15 10:32             ` Gokul Praveen
2026-01-15 17:17               ` Uwe Kleine-König
2026-01-16  8:41                 ` Gokul Praveen
2026-01-16  9:10                   ` Gokul Praveen
2026-01-19  2:55             ` Rafael V. Volkmer
2026-01-19  6:48               ` Gokul Praveen
2026-01-15  5:20           ` Kumar, Udit
2026-01-15  6:14             ` Gokul Praveen
2026-01-15  7:46               ` Kumar, Udit

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=29dc86d5-080c-4af2-8e19-99a137c55f2f@ti.com \
    --to=u-kumar1@ti.com \
    --cc=g-praveen@ti.com \
    --cc=j-keerthy@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=n-francis@ti.com \
    --cc=rafael.v.volkmer@gmail.com \
    --cc=ukleinek@kernel.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

all inboxes | Powered by JetHome®