New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 606718 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocked on:
issue 608139



Sign in to add a comment

WiFi dynamic power table switching

Project Member Reported by wnhuang@chromium.org, Apr 26 2016

Issue description

Bug for tracking WiFi dynamic power table implementation.
 

Comment 1 by derat@chromium.org, Apr 29 2016

Can you add some more info here (ideally in the form of a link to a design doc)? This bug is linked from https://chromium-review.googlesource.com/#/c/340912/, but I don't have any context about the change. Are you trying to make powerd broadcast the tablet state so that shill can adjust wifi transmit power, or is it something else entirely?

Comment 2 by derat@chromium.org, Apr 29 2016

Cc: derat@chromium.org
Components: OS>Systems>Network
I'm guessing about the component here.

Comment 3 by jleong@chromium.org, Apr 29 2016

Components: OS>Kernel>Power

Comment 4 by wnhuang@google.com, Apr 30 2016

@derat, I have share the design document with you. Sorry for that.

Yes we are trying to broadcast the tablet mode state from powerd to shill, then have shill issue an netlink message to adjust the wifi tx power.

Comment 5 by derat@chromium.org, Apr 30 2016

I'm wondering if using an input event D-Bus signal is the right way to go about doing this. How will shill get the current state if it crashes and restarts, or if it takes longer to start than powerd and misses the initial signal? Does shill also need some way to request the current state from powerd?

Comment 6 by derat@chromium.org, Apr 30 2016

This is perhaps a naive question, but do you plan to add additional code to powerd in the future that depends on the tablet/clamshell state? If not, would it be simpler to just watch for the input events in shill? (This only makes since if there are unambiguous notifications from the kernel about which mode we're in -- if we need to look at the lid angle and infer it from that, it's probably best to keep all this in one place.)

Comment 7 by wnhuang@google.com, Apr 30 2016

You are right.
I think exposing a DBus method in powerd would solve the issue. Shill can query the state of tablet mode every time it starts.
I am not sure if there are future features that requires detection of tablet mode state. But for one, currently Chrome uses sensor polling (polling accel sensor and calculate lid angle) to determine tablet mode. If this is implemented in powerd, We can modify Chrome to use the exposed DBus API too.
I think it's better to leave our options open and implement it in powerd?

Comment 9 by pstew@chromium.org, Apr 30 2016

Personally I wonder why shill would be involved in this at all.  Although related it's not a direct part of the connection management process.  Some other app can receive this signal and send the netlink messages.  The netlink code is available in standalone libraries you can link against.  Presumably there's no direct relationship between these commands and the connection process.

Comment 10 by derat@chromium.org, Apr 30 2016

Linking the doc here so I know where to find it later: https://docs.google.com/document/d/1B5BO2evHuXWXC8ITP4chdyvuWKch-C0VNx8JbzPD0uM/edit?ts=57240107

I don't understand that, exactly. The tablet-detection code currently lives in Chrome. How does duplicating it (or approximating it) in powerd as well improve matters?

Who implemented this in Chrome? Can you loop them into the discussion so we can get their thoughts about this, too?
Cc: flackr@chromium.org jonr...@chromium.org
pstew@, we initially think this could be either done in shill or powerd. Since it's WiFi related we thought it make sense to put it in shill. But given a second though we could probably just put it in powerd, and remove the need to add dbus APIs all together.

@derat, my original design is to add an observer to Chrome's already existing AccelerometerFileReader class and notify shill or powerd via Dbus for tablet mode update. @sanda suggest that we want to eliminate the dependency to Chrome. That is why I want to implement it in powerd. You can follow the discussion in the doc's comment history.
I think AccelerometerFileReader is use not only for determine tablet mode but also the screen orientation in tablet mode, so it kinda make sense it just use the accel value to calculate tablet mod in Chrome.

Add jonross@ and flackr@ for providing more context.
Blockedon: 608139
The Chrome side listens to raw accelerometer events for a few reasons:
  - determining if in clamshell/tablet modes. ShellObserver::OnMaximizeModeStarted/Ended are used by other classes to listen
  - determining the screen orientation
  - implementing a series of web apis which expose accelerometer data

The tablet mode detection being in Chrome was based on discussions where they did not want to do the calculations in the EC. I can't recall the reasoning behind this.
It looks like you're going the route of implementing the actual power-setting in a separate helper binary. Is there any reason that it can't be called from Chrome instead of from powerd? That'll remove the need to add a bunch of code to powerd to approximate the tablet-detection code that's already present in Chrome, right?
It could I suppose.

My reasoning is that we already have similar code for detecting LID switch, adding support for tablet mode switch make sense. Also this feature is a part for Chrome OS core functions, it would be strange to implement it in Chrome instead of Chrome OS daemon (powerd). Nor to mention that there might be some future features that requires knowing the state of tablet mode. It make sense for powerd to provide such information.

Note that the current implementation relies on the actual tablet mode hardware switch, instead of approximating it from the accelerometers.  

Maybe snanda@ can comment on this?
c#9: Paul, this is a change for compliance reasons and not power savings as such.  The change involves finer grained changes (per band power levels) than what powerd generally deals with.  It will cause side-effects (lower data rates, possible disconnects, etc.) that shill may need to react to.

The changes could live in powerd or some other entity but since the changes are very wifi specific shill seems to be the better home for it.
Exactly how do you believe the connection manager should respond to the fact that there are lower data rates and disconnects, which are significantly unique to the that power levels transmitted are lower?  There's already an unknown transmission power level difference between the AP and the client.  For AP selection shill only uses received signal, which is not affected by this change.  Personally it doesn't seem plausible in the near or medium term for connectivity to have a take or concern on this.
The change in tx power level functionality doesn't really have anything to do with powerd so that's not a great home for it.

For ease of debugging and tracking disconnects that may happen due to such tx power transitions it is better for the cause & effect handling to reside in the same daemon.

If you feel strongly, we could implement it outside of shill, but IMO that is still the best home for it since this is very wifi specific functionality that is being added.
From what I'm seeing, I think the tablet mode detection definitely belongs to powerd, as the implementation is symmetric to what we already have for lid detection, and future features may also require this. 

For sending the actually netlink message to kernel, I think both shill or powerd are fine. You can always find argument for both side because the function itself touch both grounds.

I propose let's just go with my current design and implementation:

1) Tablet mode detection in powerd
https://chromium-review.googlesource.com/#/c/340671/

2) netlink message sending in powerd as well, this way we don't have to deal with the state synchronization between shill and powerd, and we can easily implement a new class that implement the InputObserver interface to do that.

A small separate executable is required because we need root access to send the netlink message, so we need to make use of the powerd_setuid_helper. To avoid mixing everything up in powerd_setuid_helper, we have it call an executable 'powerd_set_wifi_tx_power' to send the actually netlink message.
https://chromium-review.googlesource.com/#/c/341519/

I have already tested the above two CLs and it worked pretty well.
Project Member

Comment 20 by bugdroid1@chromium.org, May 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/036d370b01709bc0e88dca460d180afc7484d44e

commit 036d370b01709bc0e88dca460d180afc7484d44e
Author: Daniel Erat <derat@chromium.org>
Date: Wed May 04 21:37:39 2016

power: Watch tablet mode switch.

Convertible Chromebooks have the ability to switch between
clamshell and tablet mode. The hardware exposes a tablet
mode switch, which is similar in functionality to a lid
switch. Nothing is done with tablet mode events yet.

Based on initial work by wnhuang@chromium.org.

BUG= chromium:606718 
TEST=added unit tests

Change-Id: Ia25f750dfa2c16e24f105bc1905b16048f78a3a0
Reviewed-on: https://chromium-review.googlesource.com/340671
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>

[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher_stub.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/event_device.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/event_device.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/event_device_stub.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher_stub.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/common/power_constants.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/event_device_stub.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher_unittest.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_observer.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/event_device_interface.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/policy/input_controller.h
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/common/power_constants.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/policy/input_controller.cc
[modify] https://crrev.com/036d370b01709bc0e88dca460d180afc7484d44e/power_manager/powerd/system/input_watcher_interface.h

Project Member

Comment 21 by bugdroid1@chromium.org, Jul 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/3257c5841c6187c12a486650fbdcc50ea403966e

commit 3257c5841c6187c12a486650fbdcc50ea403966e
Author: Wei-Ning Huang <wnhuang@chromium.org>
Date: Wed May 04 04:00:02 2016

power_manager: install set_wifi_transmit_power

A new helper binary for setting wifi tx power mode  is introduced in
power_manager. Add it to the install script.

BUG= chromium:606718 
TEST=`emerge-oak power_manager`
CQ-DEPEND=CL:341519

Change-Id: I686e86d3d645242817a8fc3a9d33490a8672829a
Reviewed-on: https://chromium-review.googlesource.com/342151
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/3257c5841c6187c12a486650fbdcc50ea403966e/chromeos-base/power_manager/power_manager-9999.ebuild

Project Member

Comment 22 by bugdroid1@chromium.org, Jul 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/51ede93517c4285afdfa4a4dc6d5da89d57c0971

commit 51ede93517c4285afdfa4a4dc6d5da89d57c0971
Author: Wei-Ning Huang <wnhuang@chromium.org>
Date: Mon May 02 06:32:32 2016

power: Implement dynamic wifi power switching

Add dynamic power switching.  On tablet mode changed, call set
set_wifi_transmit_power helper binary via powerd_setuid_helper to send a
netlink message to kernel.

BUG= chromium:606718 
TEST=`FEATURES=test emerge-cyan power_manager`

Change-Id: I3c246e771799d296fa9f87dbe515bd3ffa557299
Reviewed-on: https://chromium-review.googlesource.com/341519
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/powerd/powerd_setuid_helper.cc
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/common/power_constants.cc
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/power_manager.gyp
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/common/power_constants.h
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/powerd/daemon.cc
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/powerd/daemon.h
[add] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/optional_prefs/set_wifi_transmit_power_for_tablet_mode
[modify] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/powerd/policy/input_controller.cc
[add] https://crrev.com/51ede93517c4285afdfa4a4dc6d5da89d57c0971/power_manager/powerd/set_wifi_transmit_power.cc

Status: Fixed (was: Assigned)
The userspace(powerd) implementation is completed.
Project Member

Comment 24 by bugdroid1@chromium.org, Sep 7 2016

Labels: merge-merged-release-R53-8530.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/a61e7b51585ce2212efba495acdfff706a65ad62

commit a61e7b51585ce2212efba495acdfff706a65ad62
Author: Wei-Ning Huang <wnhuang@chromium.org>
Date: Wed May 04 04:00:02 2016

power_manager: install set_wifi_transmit_power

A new helper binary for setting wifi tx power mode  is introduced in
power_manager. Add it to the install script.

BUG= chromium:606718 
TEST=`emerge-oak power_manager`
CQ-DEPEND=CL:341519

Change-Id: I686e86d3d645242817a8fc3a9d33490a8672829a
Reviewed-on: https://chromium-review.googlesource.com/342151
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/381104
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Commit-Queue: Wei-Ning Huang <wnhuang@chromium.org>

[modify] https://crrev.com/a61e7b51585ce2212efba495acdfff706a65ad62/chromeos-base/power_manager/power_manager-9999.ebuild

Project Member

Comment 25 by bugdroid1@chromium.org, Sep 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/1aaa19e35744b94b277380106e2911b94ece288f

commit 1aaa19e35744b94b277380106e2911b94ece288f
Author: Wei-Ning Huang <wnhuang@chromium.org>
Date: Mon May 02 06:32:32 2016

power: Implement dynamic wifi power switching

Add dynamic power switching.  On tablet mode changed, call set
set_wifi_transmit_power helper binary via powerd_setuid_helper to send a
netlink message to kernel.

BUG= chromium:606718 
TEST=`FEATURES=test emerge-cyan power_manager`

Change-Id: I3c246e771799d296fa9f87dbe515bd3ffa557299
Reviewed-on: https://chromium-review.googlesource.com/341519
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/381320
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Commit-Queue: Wei-Ning Huang <wnhuang@chromium.org>

[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/powerd/powerd_setuid_helper.cc
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/common/power_constants.cc
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/power_manager.gyp
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/common/power_constants.h
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/powerd/daemon.cc
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/powerd/daemon.h
[add] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/optional_prefs/set_wifi_transmit_power_for_tablet_mode
[modify] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/powerd/policy/input_controller.cc
[add] https://crrev.com/1aaa19e35744b94b277380106e2911b94ece288f/power_manager/powerd/set_wifi_transmit_power.cc

Project Member

Comment 26 by bugdroid1@chromium.org, Sep 7 2016

Project Member

Comment 27 by bugdroid1@chromium.org, Sep 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/80ebfc9f44f2c22c855371b077738285f998ca63

commit 80ebfc9f44f2c22c855371b077738285f998ca63
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Sep 02 00:32:59 2016

kevin: Add tablet mode control

Allow the detection of tablet mode for sensors and powerd.

BUG= chromium:606718 ,b:28552512
BRANCH=kevin
TEST=Check with evtest that events are send.
Check sensor data is in lid referal in tablet mode.

Change-Id: I0822e7419ccba01d70bf9327593164c15493fb10
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380377
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/80ebfc9f44f2c22c855371b077738285f998ca63/board/kevin/board.h

Project Member

Comment 28 by bugdroid1@chromium.org, Sep 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/6d731f41fbf45d4d31ffa279bca61ccdc9b88c51

commit 6d731f41fbf45d4d31ffa279bca61ccdc9b88c51
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Sep 01 23:44:34 2016

mkbp: Send event when in tablet mode

When tablet mode is detected, send an event to the AP.

BUG= chromium:606718 
BRANCH=none
TEST=Check with evtest that events are sent when the tablet goes in tablet
mode and back to device mode.

Change-Id: I49f2404b5ecf87e71fa5aef4c8ce9c9beda26a15
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380414
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/6d731f41fbf45d4d31ffa279bca61ccdc9b88c51/common/keyboard_mkbp.c
[modify] https://crrev.com/6d731f41fbf45d4d31ffa279bca61ccdc9b88c51/include/config.h

Project Member

Comment 29 by bugdroid1@chromium.org, Sep 9 2016

Labels: merge-merged-firmware-gru-8785.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/d6525ecf46ad0636aab3fd508636de391bccaa6f

commit d6525ecf46ad0636aab3fd508636de391bccaa6f
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Sep 01 23:44:34 2016

mkbp: Send event when in tablet mode

When tablet mode is detected, send an event to the AP.

BUG= chromium:606718 
BRANCH=none
TEST=Check with evtest that events are sent when the tablet goes in tablet
mode and back to device mode.

Change-Id: I49f2404b5ecf87e71fa5aef4c8ce9c9beda26a15
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380414
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit 6d731f41fbf45d4d31ffa279bca61ccdc9b88c51)
Reviewed-on: https://chromium-review.googlesource.com/384019
Reviewed-by: Shawn N <shawnn@chromium.org>
Commit-Queue: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/d6525ecf46ad0636aab3fd508636de391bccaa6f/common/keyboard_mkbp.c
[modify] https://crrev.com/d6525ecf46ad0636aab3fd508636de391bccaa6f/include/config.h

Project Member

Comment 30 by bugdroid1@chromium.org, Sep 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c5f6c41d81e93a3eb5c66cb8682c89ac3c181328

commit c5f6c41d81e93a3eb5c66cb8682c89ac3c181328
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Sep 02 00:32:59 2016

kevin: Add tablet mode control

Allow the detection of tablet mode for sensors and powerd.

BUG= chromium:606718 ,b:28552512
BRANCH=kevin
TEST=Check with evtest that events are send.
Check sensor data is in lid referal in tablet mode.

Change-Id: I0822e7419ccba01d70bf9327593164c15493fb10
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380377
Reviewed-by: Randall Spangler <rspangler@chromium.org>
(cherry picked from commit 80ebfc9f44f2c22c855371b077738285f998ca63)
Reviewed-on: https://chromium-review.googlesource.com/384020
Reviewed-by: Shawn N <shawnn@chromium.org>
Commit-Queue: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/c5f6c41d81e93a3eb5c66cb8682c89ac3c181328/board/kevin/board.h

Labels: VerifyIn-55
Status: Verified (was: Fixed)
Project Member

Comment 33 by bugdroid1@chromium.org, Oct 21 2016

Labels: merge-merged-firmware-glados-7820.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/b588f9d2fdf7cb85b6410d19d6e35d6847b61484

commit b588f9d2fdf7cb85b6410d19d6e35d6847b61484
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Thu Sep 01 23:48:06 2016

UPSTREAM: common: Add TABLET_MODE hook.

Add a hook to act when the a device is going in tablet mode and back.

BUG= chromium:606718 
BRANCH=kevin,cave
TEST=Test with evtest that an event is sent to the AP.

Change-Id: Ic9c3b158f1178504af41abff18b28de8e07fc7a7
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/380412
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/392726

[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/common/hooks.c
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/core/cortex-m/ec.lds.S
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/core/cortex-m0/ec.lds.S
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/include/hooks.h
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/core/host/host_exe.lds
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/include/ec_commands.h
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/core/nds32/ec.lds.S
[modify] https://crrev.com/b588f9d2fdf7cb85b6410d19d6e35d6847b61484/include/link_defs.h

Project Member

Comment 34 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c940f36ceabcf2425284001298f03ebdb4c3079e

commit c940f36ceabcf2425284001298f03ebdb4c3079e
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 21 23:35:12 2016

common: Add tablet_mode API

Simple API to set/get the tablet mode. It can be set via lid angle
calculation or if a board has a dedicated HAL sensor/GPIO.

BUG= chromium:606718 
BRANCH=glados
TEST=Check with Cave that both mode works.

Change-Id: I2ee5130f3e0a1307ec3ea543f7a32d66bc32b31d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402089
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/motion_sense.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/build.mk
[add] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/tablet_mode.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/test/test_config.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/config.h
[add] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/tablet_mode.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/motion_lid.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/motion_lid.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/acpi.c

Project Member

Comment 35 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c940f36ceabcf2425284001298f03ebdb4c3079e

commit c940f36ceabcf2425284001298f03ebdb4c3079e
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 21 23:35:12 2016

common: Add tablet_mode API

Simple API to set/get the tablet mode. It can be set via lid angle
calculation or if a board has a dedicated HAL sensor/GPIO.

BUG= chromium:606718 
BRANCH=glados
TEST=Check with Cave that both mode works.

Change-Id: I2ee5130f3e0a1307ec3ea543f7a32d66bc32b31d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402089
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/motion_sense.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/build.mk
[add] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/tablet_mode.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/test/test_config.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/config.h
[add] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/tablet_mode.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/include/motion_lid.h
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/motion_lid.c
[modify] https://crrev.com/c940f36ceabcf2425284001298f03ebdb4c3079e/common/acpi.c

Project Member

Comment 36 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/0dbf884f7f818fde8e3f488d53d445aeee79b39e

commit 0dbf884f7f818fde8e3f488d53d445aeee79b39e
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 21 23:37:28 2016

cave: Use Tablet GPIO to get tablet mode.

Use the Tablet GPIO instead of lid angle calculation to detect tablet
mode.

BUG= chromium:606718 
BRANCH=glados
TEST=Check with Cave that both mode works: with AIDA64, in tablet mode,
check the sensor value when the lid is opened closed.
If lid is away from the base, the sensor data is not transformed.

Change-Id: I1a842ea8e2842dee83ddf69a9a474debe7f9c180
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402090
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/0dbf884f7f818fde8e3f488d53d445aeee79b39e/board/cave/board.h
[modify] https://crrev.com/0dbf884f7f818fde8e3f488d53d445aeee79b39e/board/cave/board.c

Project Member

Comment 37 by bugdroid1@chromium.org, Oct 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/611d341ff029be82c2f5e66a89481dddaf1ce2ee

commit 611d341ff029be82c2f5e66a89481dddaf1ce2ee
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Sat Oct 22 00:00:24 2016

caroline: Enable Tablet Mode using the lid angle.

Use the lid angle to determine if the device is in tablet mode.

BUG= chromium:606718 
BRANCH=glados
TEST=Compile.

Change-Id: I9445554bb04817f817a00583aa8c48bd2207e142
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/402091
Reviewed-by: Shawn N <shawnn@chromium.org>

[modify] https://crrev.com/611d341ff029be82c2f5e66a89481dddaf1ce2ee/board/caroline/board.h

Project Member

Comment 38 by bugdroid1@chromium.org, Nov 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/9b67ffcd527c6244a9f1946072f40e8e9fd9b940

commit 9b67ffcd527c6244a9f1946072f40e8e9fd9b940
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 21 23:35:12 2016

common: Add tablet_mode API

Simple API to set/get the tablet mode. It can be set via lid angle
calculation or if a board has a dedicated HAL sensor/GPIO.

Merged from glados branch, add MKBP switch support.

BUG= chromium:606718 
BRANCH=gru
TEST=Check with Cave that both mode works.

Reviewed-on: https://chromium-review.googlesource.com/402089
Reviewed-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit c940f36ceabcf2425284001298f03ebdb4c3079e)
Change-Id: I2ee5130f3e0a1307ec3ea543f7a32d66bc32b31d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404915
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/motion_sense.c
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/keyboard_mkbp.c
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/build.mk
[add] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/tablet_mode.c
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/test/test_config.h
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/include/config.h
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/board/kevin/board.h
[add] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/include/tablet_mode.h
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/include/motion_lid.h
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/motion_lid.c
[modify] https://crrev.com/9b67ffcd527c6244a9f1946072f40e8e9fd9b940/common/acpi.c

Project Member

Comment 39 by bugdroid1@chromium.org, Jan 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/416633f956a4ec41074f7de088f40f4fd6984952

commit 416633f956a4ec41074f7de088f40f4fd6984952
Author: Gwendal Grignou <gwendal@chromium.org>
Date: Fri Oct 21 23:35:12 2016

common: Add tablet_mode API

Simple API to set/get the tablet mode. It can be set via lid angle
calculation or if a board has a dedicated HAL sensor/GPIO.

Merged from glados branch, add MKBP switch support.

BUG= chromium:606718 
BRANCH=gru
TEST=Check with Cave that both mode works.

Reviewed-on: https://chromium-review.googlesource.com/402089
Reviewed-by: Shawn N <shawnn@chromium.org>
(cherry picked from commit c940f36ceabcf2425284001298f03ebdb4c3079e)
ORIG-Change-Id: I2ee5130f3e0a1307ec3ea543f7a32d66bc32b31d
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/404915
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

Change-Id: Id08b0252e46e7ff68dae45ff418f7bfcca1c4527
Signed-off-by: james_chao <james_chao@asus.com>
Reviewed-on: https://chromium-review.googlesource.com/430453
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>

[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/pit/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/include/config.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/bob/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/motion_sense.c
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/keyboard_mkbp.c
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/npcx_evb/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/motion_lid.c
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/build.mk
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/test/test_config.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/llama/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/elm/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/oak/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/jerry/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/kevin/board.h
[add] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/include/tablet_mode.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/big/board.h
[add] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/tablet_mode.c
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/host/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/board/npcx_evb_arm/board.h
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/common/acpi.c
[modify] https://crrev.com/416633f956a4ec41074f7de088f40f4fd6984952/include/motion_lid.h

Project Member

Comment 40 by bugdroid1@chromium.org, Apr 9 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/docs/+/c13eb02c6a1dc086b8204d9aff9858089c45169b

commit c13eb02c6a1dc086b8204d9aff9858089c45169b
Author: Wei-Ning Huang <wnhuang@google.com>
Date: Sun Apr 09 08:17:58 2017

Project Member

Comment 41 by bugdroid1@chromium.org, May 9 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chromeos/docs/+/6caf0bd86712d888d465dc0fe33dbe53fb8d3160

commit 6caf0bd86712d888d465dc0fe33dbe53fb8d3160
Author: Wei-Ning Huang <wnhuang@google.com>
Date: Tue May 09 15:02:59 2017

Sign in to add a comment