Implement sysfs interface for EC MOTIONSENSE_CMD_KB_WAKE_ANGLE |
||
Issue descriptionA new power_manager feature ( issue 552049 ) needs to send an EC command to set the keyboard wake angle. I first implemented this by calling ectool, but it has now turned out that using ectool on production images is not desired. Therefore, we need a new sysfs API that allows userspace to write the wake angle. In order to support older convertibles, this needs to be backported at least back to 3.14.
,
Mar 18 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b22f158e6e66396448448e5756613e79b92f7700 commit b22f158e6e66396448448e5756613e79b92f7700 Author: Julius Werner <jwerner@chromium.org> Date: Wed Mar 16 22:17:21 2016 chromeos-accelerometer-init: Make udev grant kb wake access to powerd This patch extends the udev init script for the EC accelerometer driver to grant write access of the in_angl_offset or kb_wake_angle node (one of which controls the motionsense kb_wake property on the EC, depending on kernel version) to the power group. It is used by powerd to control wakeup behavior. BUG= chromium:594037 TEST=Deployed on Minnie and confirmed the access rights were changed accordingly after reboot. Change-Id: I59f0ed2b4c9c57388355729d8608cdde870644e4 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/333075 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> [rename] https://crrev.com/b22f158e6e66396448448e5756613e79b92f7700/chromeos-base/chromeos-accelerometer-init/chromeos-accelerometer-init-0.0.1-r8.ebuild [modify] https://crrev.com/b22f158e6e66396448448e5756613e79b92f7700/chromeos-base/chromeos-accelerometer-init/files/udev/accelerometer-init.sh
,
Mar 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/8d36df646da90c32667222ad4b7ffae41fb323ee commit 8d36df646da90c32667222ad4b7ffae41fb323ee Author: Julius Werner <jwerner@chromium.org> Date: Wed Mar 16 22:13:15 2016 power: Reenable EcWakeupHelper via sysfs access This patch reenables the EcWakeupHelper class that was disabled in CL:332260 and implements the EC keyboard wake angle control through this interface. Since it changed from 3.14 to 3.18 kernels and we want to support older devices as well, we need to implement support and detection for two slightly different interfaces. Also remove the old powerd_setuid_helper code that calls ectool since it is no longer needed. CQ-DEPEND=CL:333075 BUG= chromium:594037 TEST=Deployed on Minnie, confirmed that keyboard wakeup behavior was as expected. Built with unit tests for Falco. Deployed on Oak and confirmed that kb_wake property on the EC was written correctly. Change-Id: I4c263feec6f35c3811ff4ec3149a18a59fd61257 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/333038 Commit-Ready: Dan Shi <dshi@google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> [modify] https://crrev.com/8d36df646da90c32667222ad4b7ffae41fb323ee/power_manager/powerd/powerd_setuid_helper.cc [modify] https://crrev.com/8d36df646da90c32667222ad4b7ffae41fb323ee/power_manager/powerd/system/ec_wakeup_helper.h [modify] https://crrev.com/8d36df646da90c32667222ad4b7ffae41fb323ee/power_manager/powerd/system/ec_wakeup_helper.cc
,
Mar 19 2016
Thanks for all the help with this, Gwendal! |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Mar 11 2016