public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Johan Hovold <johan@kernel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	Saravana Kannan <saravanak@google.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v3 1/5] PM: sleep: Resume children after resuming the parent
Date: Wed, 7 May 2025 15:39:34 +0100	[thread overview]
Message-ID: <563657c5-5529-45fd-96fa-bab68ca992a9@nvidia.com> (raw)
In-Reply-To: <CAJZ5v0jG+54uKiY-uSc6B+8JuA6eU1j8tGM5d=XsrT0EmabMeQ@mail.gmail.com>


On 07/05/2025 15:25, Rafael J. Wysocki wrote:

...

>>>> So are the devices in question "async"?  To check this, please see the
>>>> "async" attribute in the "power" subdirectory of the sysfs device
>>>> directory for each of them.
>>>
>>> I checked for both the I2C controller and ina3221 and don't see any
>>> 'async' files ...
>>>
>>> $ ls /sys/class/i2c-dev/i2c-2/device/2-0040/power/
>>> autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
>>> control               runtime_status
>>> $ ls /sys/class/i2c-dev/i2c-2/device/2-0041/power/
>>> autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
>>> control               runtime_status
>>> $ ls /sys/class/i2c-dev/i2c-2/power/
>>> autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
>>> control               runtime_status
>>
>> You need to set CONFIG_PM_ADVANCED_DEBUG to see those (and other debug
>> attributes).
>>
>>>> If they are "async", you can write "disable" to this attribute to turn
>>>> them into "sync" devices.  I'd do this and see what happens.
>>
>> You may also turn off async suspend altogether:
>>
>> # echo 0 > /sys/power/pm_async
>>
>> and see if this helps.

This does indeed help!

>>>> Overall, it looks like some dependencies aren't properly represented
>>>> by device links on this platform.
>>>
>>> Yes that would appear to be the case, but at the moment, I don't see
>>> what it is. The ina3221 devices appear to suspend fine AFAICT, but hangs
>>> when suspending I2C controller. Exactly where is still a mystery.
> 
> I checked in the meantime and found that the i2c subsystem enables
> async suspend/resume for all devices, clients and controllers, so the
> devices in question are "async" AFAICS.

So that would make sense given that the above works.

When it fails it appears to hang in dpm_wait_for_subordinate() when 
calling dpm_wait_for_children() from what I can tell.

I will enable the PM_ADVANCED_DEBUG and confirm that making the I2C 
itself non-async works.

Jon

-- 
nvpublic


  reply	other threads:[~2025-05-07 14:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <10629535.nUPlyArG6x@rjwysocki.net>
     [not found] ` <22630663.EfDdHjke4D@rjwysocki.net>
2025-05-01  9:51   ` [PATCH v3 1/5] PM: sleep: Resume children after resuming the parent Jon Hunter
2025-05-02 20:33     ` Rafael J. Wysocki
2025-05-07 13:21       ` Jon Hunter
2025-05-07 13:39         ` Rafael J. Wysocki
2025-05-07 14:25           ` Rafael J. Wysocki
2025-05-07 14:39             ` Jon Hunter [this message]
2025-05-07 14:56               ` Rafael J. Wysocki
2025-05-07 15:39                 ` Jon Hunter
2025-05-07 16:43                   ` Rafael J. Wysocki
2025-05-08 13:38                     ` Jon Hunter
2025-05-08 18:06                       ` Rafael J. Wysocki
2025-05-10 11:39                   ` Rafael J. Wysocki
2025-05-10 11:50                     ` Jon Hunter

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=563657c5-5529-45fd-96fa-bab68ca992a9@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=saravanak@google.com \
    --cc=stern@rowland.harvard.edu \
    --cc=ulf.hansson@linaro.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