With unified builds we need to bring together the power settings in power daemon so that it can support multiple models at run-time. Some design thoughts are collected here: https://docs.google.com/document/d/1XG8motvGyn-yevrzkskhUuhynWi3o86VjrlGs9p94fw/edit#bookmark=id.sku8zln4ku0x
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/55af648d1595a7bf69d1927707f2a79c71285248 commit 55af648d1595a7bf69d1927707f2a79c71285248 Author: Benjamin Gordon <bmgordon@chromium.org> Date: Tue Apr 18 05:50:19 2017 chromeos-config: Add command-line utility This is a very thin wrapper that just passes the path and property into the library. To be used for fetching config values from shell scripts. BUG= chromium:709982 TEST=Ran newly-added unit tests. Change-Id: Ia4097ddc18578adff99e50e10b346586bedf4585 Reviewed-on: https://chromium-review.googlesource.com/478173 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [add] https://crrev.com/55af648d1595a7bf69d1927707f2a79c71285248/chromeos-config/cros_config_main.cc [modify] https://crrev.com/55af648d1595a7bf69d1927707f2a79c71285248/chromeos-config/chromeos-config.gyp [add] https://crrev.com/55af648d1595a7bf69d1927707f2a79c71285248/chromeos-config/cros_config_main_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/fd0e4ad1e44ea4eaaca5cd9cb2154c214cfc79e6 commit fd0e4ad1e44ea4eaaca5cd9cb2154c214cfc79e6 Author: Benjamin Gordon <bmgordon@chromium.org> Date: Sat Apr 22 04:57:43 2017 Add cros_config binary and test to ebuild The binary and test were added in https://chromium-review.googlesource.com/#/c/478173/ BUG= chromium:709982 TEST=Ran new unit tests. Change-Id: I42e9be5114743838a97dfa7457d2070cab69a975 Reviewed-on: https://chromium-review.googlesource.com/478311 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/fd0e4ad1e44ea4eaaca5cd9cb2154c214cfc79e6/chromeos-base/chromeos-config-tools/chromeos-config-tools-9999.ebuild
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/3249fe596fc4935b376258217ca65c8cafafc811 commit 3249fe596fc4935b376258217ca65c8cafafc811 Author: Daniel Erat <derat@chromium.org> Date: Tue May 02 04:54:06 2017 power: Remove powerd's --prefs_dir and --default_prefs_dir. Remove two command-line flags that gave a false illusion of a choice of preference directories. Other non-powerd binaries like get_powerd_initial_backlight_level and power_supply_info depend on prefs living in the default directories, and these flags were never used to pass anything besides the defaults to powerd. BUG= chromium:709982 TEST=none Change-Id: Ia22eea29bfc1ff5420f64235d15098c9e6cad2d3 Reviewed-on: https://chromium-review.googlesource.com/484980 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/init/systemd/powerd.service [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/powerd/main.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/tools/power_supply_info.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/prefs.h [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/tools/get_powerd_initial_backlight_level.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/util.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/tools/dump_power_status.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/prefs.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/power_constants.h [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/tools/check_powerd_config.cc [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/init/upstart/powerd.conf [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/util.h [modify] https://crrev.com/3249fe596fc4935b376258217ca65c8cafafc811/power_manager/common/power_constants.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/349d410abeb936f9dad64e674acb53a692a6221d commit 349d410abeb936f9dad64e674acb53a692a6221d Author: Benjamin Gordon <bmgordon@chromium.org> Date: Fri May 26 00:15:51 2017 power_manager: Add model-specific prefs support If the master config contains a powerd_prefs key, the new model-specific directory specified there is inserted into the list of prefs directories ahead of the board-specific directory. BUG= chromium:709982 TEST=FEATURES=test emerge-reef power_manager CQ-DEPEND=CL:514403 Change-Id: Icf438f58faf8c4efa2520d9de74dc1ae6f44ccc1 Reviewed-on: https://chromium-review.googlesource.com/514402 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/349d410abeb936f9dad64e674acb53a692a6221d/chromeos-config/README.md [modify] https://crrev.com/349d410abeb936f9dad64e674acb53a692a6221d/power_manager/power_manager.gyp [modify] https://crrev.com/349d410abeb936f9dad64e674acb53a692a6221d/power_manager/common/prefs.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/ea1ed31d9cd9e62f25cfa2a6e480534e2f87496b commit ea1ed31d9cd9e62f25cfa2a6e480534e2f87496b Author: Benjamin Gordon <bmgordon@chromium.org> Date: Fri May 26 00:15:50 2017 Add chromeos-config dependencies to power_manager. This will allow pulling the model-specific prefs subdirectory from the master config in https://chromium-review.googlesource.com/c/514402/. BUG= chromium:709982 TEST=FEATURES=test emerge-reef power_manager Change-Id: Ic864405e83c924afad0918fecee69c5bb67dc895 Reviewed-on: https://chromium-review.googlesource.com/514403 Commit-Ready: Benjamin Gordon <bmgordon@chromium.org> Tested-by: Benjamin Gordon <bmgordon@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/ea1ed31d9cd9e62f25cfa2a6e480534e2f87496b/chromeos-base/power_manager/power_manager-9999.ebuild
Comment 1 by sjg@chromium.org
, Apr 10 2017