linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Give more control of sync_state()
@ 2023-02-24  7:05 Saravana Kannan
  2023-02-24  7:05 ` [PATCH v1 1/2] driver core: Add fw_devlink.sync_state command line param Saravana Kannan
  2023-02-24  7:05 ` [PATCH v1 2/2] driver core: Make state_synced device attribute writeable Saravana Kannan
  0 siblings, 2 replies; 10+ messages in thread
From: Saravana Kannan @ 2023-02-24  7:05 UTC (permalink / raw)
  To: Jonathan Corbet, Greg Kroah-Hartman, Rafael J. Wysocki
  Cc: Saravana Kannan, Abel Vesa, Bjorn Andersson, Dmitry Baryshkov,
	Doug Anderson, Matthias Kaehlcke, kernel-team, linux-kernel,
	linux-doc

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-03-08 17:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24  7:05 [PATCH v1 0/2] Give more control of sync_state() Saravana Kannan
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

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).