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

Issue 608139 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 606718



Sign in to add a comment

Implement EC to AP input event path

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

Issue description

The current implementation of powerd monitors the input event generated by the gpio-keys drivers to determine the LID state.  However, some newer boards does not have LID gpio connected to AP, so we have the EC send input events to AP, then use the cros_ec_input driver to relay the input event.

Another use case is to notify AP when device is switched to tablet mode. The device may have a real tablet mode switch, or use LID angle to determine tablet mode.

This bug is used to track the related CL and discussion.
 
I have two functional working WIP CL:

https://chromium-review.googlesource.com/#/c/341294/
https://chromium-review.googlesource.com/#/c/341403/

However, we still have to discuss how to detect tablet mode and call the 'input_send_event' method provided by input.c

1) For devices without tablet mode switch, use accel sensor to determine tablet mode, then call input_send_event.
2) For devices with tablet mode switch, call input_send_event when GPIO is asserted/release.

I think it's time for refactoring lid_switch.c, motion_lid.c and motion_sense.c so we can provide a interface for coping with both lid_switch and tablet_mode switch (since they are essentially the same thing).

gwendal@, do you have any thought on this?
Hi gewndal,

With https://chromium-review.googlesource.com/#/c/341294/ I have drop the input event path and use the original EC host event.
We still need code in EC to deal with tablet mode switch. Can you help with this?
Labels: -Pri-3 Pri-2

Comment 4 by jleong@chromium.org, May 30 2016

Cc: -gwendal@chromium.org wnhuang@chromium.org
Owner: gwendal@chromium.org

Comment 5 by tbroch@chromium.org, Jul 19 2016

Cc: tbroch@chromium.org
Cc: sha...@chromium.org diand...@chromium.org dtor@chromium.org
+ others

Loops like we may have implemented some of this in http://crosbug.com/p/54976 (and related EC bugs)? It's landing in the cros_ec keyboard driver. Would have been nice to have better communication on this...
Components: OS>Kernel Internals>Input
Labels: OS-Chrome
right.. I'll abandon my changes and add tablet mode switch EC_MKBP_TABLET_MODE enum.
Status: Fixed (was: Assigned)
Fixed with kernel changes (CL/373160) and EC firmware changes (kevin: CL/373042)
Labels: VerifyIn-55

Comment 11 by ka...@chromium.org, Nov 18 2016

Status: Verified (was: Fixed)

Sign in to add a comment