At present powerd keeps its read-only config in files that we install on the root filesystem
https://cs.corp.google.com/chromeos_public/src/platform2/power_manager/common/prefs.cc
Some default prefs are here:
https://cs.corp.google.com/chromeos_public/src/platform2/power_manager/default_prefs/
Most of these are integers. We should support putting read-only preferences in the master config through a binding that supports existing preferences.
It should be fairly easy to add CrosConfig as another source for preferences in GetPrefStrings, for example.
One question is whether we should put the preferences in sub-nodes, like:
power {
powerd {
battery-stabilized-after {
power-connected-ms = <123>;
power-disconnected-ms = <234>;
};
keyboard-backlight {
ais-steps = <2>;
keep-on-ms = <10>;
};
};
};
Steps:
- Write up a little proposal doc (go/greendoc)
- Writing the binding / add to cros_config schema
- Implement in powerd
- Convert reef-uni
Comment 1 by lannm@google.com
, Nov 16 2017