From: Ulf Hansson <firstname.lastname@example.org> To: Kishon Vijay Abraham I <email@example.com>, firstname.lastname@example.org Cc: "Rafael J . Wysocki" <email@example.com>, firstname.lastname@example.org, Yoshihiro Shimoda <email@example.com>, Geert Uytterhoeven <firstname.lastname@example.org>, email@example.com, Ulf Hansson <firstname.lastname@example.org>, Jonathan Corbet <email@example.com>, firstname.lastname@example.org Subject: [PATCH v2 3/3] phy: core: Update the runtime PM section in the docs to reflect changes Date: Wed, 20 Dec 2017 15:09:20 +0100 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> Let's update and clarify he phy documentation, to reflect the latest changes around the runtime PM deployment in the phy core. Cc: Jonathan Corbet <email@example.com> Cc: firstname.lastname@example.org Signed-off-by: Ulf Hansson <email@example.com> --- Documentation/phy.txt | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Documentation/phy.txt b/Documentation/phy.txt index 457c3e0..1c2c761 100644 --- a/Documentation/phy.txt +++ b/Documentation/phy.txt @@ -160,19 +160,22 @@ associated with this PHY. PM Runtime ========== -This subsystem is pm runtime enabled. So while creating the PHY, -pm_runtime_enable of the phy device created by this subsystem is called and -while destroying the PHY, pm_runtime_disable is called. Note that the phy -device created by this subsystem will be a child of the device that calls -phy_create (PHY provider device). - -So pm_runtime_get_sync of the phy_device created by this subsystem will invoke -pm_runtime_get_sync of PHY provider device because of parent-child relationship. -It should also be noted that phy_power_on and phy_power_off performs -phy_pm_runtime_get_sync and phy_pm_runtime_put respectively. -There are exported APIs like phy_pm_runtime_get, phy_pm_runtime_get_sync, -phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and -phy_pm_runtime_forbid for performing PM operations. +This subsystem deploys runtime PM support. More precisely, calls to +pm_runtime_get_sync() and to pm_runtime_put() surrounds calls to the phy +provider callbacks, ->init|exit(), in phy_init|exit(). At phy_power_on(), the +runtime PM usage count is raised again, via pm_runtime_get_sync(). The usage +count remain raised, until the internal phy power on count reaches zero in +phy_power_off(), at which point pm_runtime_put() is called to restore the +runtime PM usage count. In this way, the device is guranteed to stay runtime +resumed as long as the phy is powered on. + +In regards to the runtime PM deployment in the phy core, it should also be +noted that it's deployed for the phy provider device, which is the parent of +the phy child device. In other words, the phy device created by the phy core +remains runtime PM disabled. Of course, whether runtime PM is really used or +not, depends on whether the phy provider driver has enabled runtime PM for its +provider device. More exactly, pm_runtime_enable() needs to be called prior +calling phy_create() or devm_phy_create(). PHY Mappings ============ -- 2.7.4
prev parent reply other threads:[~2017-12-20 14:09 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-20 14:09 [PATCH v2 0/3] phy: core: Re-work runtime PM deployment and fix an issue Ulf Hansson 2017-12-20 14:09 ` [PATCH v2 1/3] phy: core: Move runtime PM reference counting to the parent device Ulf Hansson 2017-12-21 1:39 ` Rafael J. Wysocki 2017-12-21 10:50 ` Ulf Hansson 2017-12-23 1:35 ` Rafael J. Wysocki 2017-12-23 1:50 ` Rafael J. Wysocki 2017-12-23 12:37 ` Ulf Hansson 2017-12-23 12:47 ` Rafael J. Wysocki 2017-12-23 12:39 ` Rafael J. Wysocki 2017-12-23 15:09 ` Ulf Hansson 2017-12-24 12:00 ` Rafael J. Wysocki 2018-01-02 13:28 ` Ulf Hansson 2017-12-20 14:09 ` [PATCH v2 2/3] phy: core: Drop unused runtime PM APIs Ulf Hansson 2017-12-21 10:33 ` Yoshihiro Shimoda 2017-12-21 10:33 ` Yoshihiro Shimoda 2017-12-21 10:57 ` Ulf Hansson 2017-12-21 10:57 ` Ulf Hansson 2017-12-21 12:24 ` Yoshihiro Shimoda 2017-12-21 12:24 ` Yoshihiro Shimoda 2017-12-21 14:23 ` Ulf Hansson 2017-12-21 14:23 ` Ulf Hansson 2017-12-23 9:55 ` kbuild test robot 2017-12-23 9:55 ` kbuild test robot 2017-12-23 10:08 ` kbuild test robot 2017-12-23 10:08 ` kbuild test robot 2017-12-20 14:09 ` Ulf Hansson [this message]
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 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH v2 3/3] phy: core: Update the runtime PM section in the docs to reflect changes' \ /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
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.