From: Saravana Kannan <saravanak@google.com>
To: Jonathan Corbet <corbet@lwn.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>,
Abel Vesa <abel.vesa@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Doug Anderson <dianders@chromium.org>,
Matthias Kaehlcke <mka@chromium.org>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: [PATCH v1 0/2] Give more control of sync_state()
Date: Thu, 23 Feb 2023 23:05:02 -0800 [thread overview]
Message-ID: <20230224070506.4157738-1-saravanak@google.com> (raw)
In systems where some devices don't have drivers, sync_state() will
never get called for suppliers of those devices. This is working as
intended since those consumer devices might be powered on, and cutting
resources to those consumer devices might make the system unstable.
However, not all systems will the same concern. For example, the
consumer device might have been left powered off and unused. In such
cases, sync_state() never getting called might cause an unnecessary
power regression if the bootloader had left the supplier in a powered on
state.
So give more control of sync_state() in the form of a kernel commandline
for a global timeout or a per device sysfs control to trigger
sync_state().
These patches have been tested on my end and seem to work well.
Thanks,
Saravana
Cc: Abel Vesa <abel.vesa@linaro.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Matthias Kaehlcke <mka@chromium.org>
Saravana Kannan (2):
driver core: Add fw_devlink.sync_state command line param
driver core: Make state_synced device attribute writeable
.../ABI/testing/sysfs-devices-state_synced | 5 ++
.../admin-guide/kernel-parameters.txt | 12 ++++
drivers/base/base.h | 9 +++
drivers/base/core.c | 63 +++++++++++++++++--
drivers/base/dd.c | 24 ++++++-
5 files changed, 108 insertions(+), 5 deletions(-)
--
2.39.2.637.g21b0678d19-goog
next reply other threads:[~2023-02-24 7:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 7:05 Saravana Kannan [this message]
2023-02-24 7:05 ` [PATCH v1 1/2] driver core: Add fw_devlink.sync_state command line param Saravana Kannan
2023-02-28 22:33 ` Doug Anderson
2023-03-04 0:52 ` Saravana Kannan
2023-03-08 15:39 ` Doug Anderson
2023-03-08 17:14 ` Matthias Kaehlcke
2023-02-24 7:05 ` [PATCH v1 2/2] driver core: Make state_synced device attribute writeable Saravana Kannan
2023-02-28 22:33 ` Doug Anderson
2023-03-04 0:52 ` Saravana Kannan
2023-03-08 17:35 ` Doug Anderson
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=20230224070506.4157738-1-saravanak@google.com \
--to=saravanak@google.com \
--cc=abel.vesa@linaro.org \
--cc=andersson@kernel.org \
--cc=corbet@lwn.net \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=rafael@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;
as well as URLs for NNTP newsgroup(s).