summaryrefslogtreecommitdiff
path: root/include/device_event.h
Commit message (Collapse)AuthorAgeFilesLines
* include/device_event.h: Format with clang-formatJack Rosenthal2022-06-281-1/+1
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I6549aab717f79faf0aa4cffa61b9a26e103f0079 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730239 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* PCHG: Enable device event on suspend completeDaisuke Nojiri2021-05-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | Currently, PCHG can send a device event any time. When a signal is sent to the host while it's attempting to suspend, suspend is delayed by 10 seconds. A solution is to make Powerd disable a corresponding PCHG event (i.e. EC_DEVICE_EVENT_WLC) when it's notifying an upcoming suspend to other processes. This patch makes PCHG re-enable EC_DEVICE_EVENT_WLC after suspend is complete. BUG=b:182973695, b:173235954 BRANCH=trogdor TEST=Verify CoachZ suspends without a delay. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I10d7fcf234a7e0e05ce5d77b8e930a0cf0748331 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2863564 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
* device_event: Don't notify host of disabled eventsDaisuke Nojiri2021-01-301-0/+2
| | | | | | | | | | | | | | | | | | | | Currently, device_set_events notifies the host even when the device is masked by device_enabled_events. This patch makes it skip notification for disabled devices. This patch also makes device_event skip notification if it's already set. Host reads & clears device_current_events atomically (by device _get_and_clear_events). So, 1->1 transition means host has already been notified but hasn't read it yet. BUG=b:36024430, b:178537669, b:177664326 BRANCH=Trogdor TEST=CoachZ. Verified host event isn't sent until powerd enables WLC. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I075845873b052dab2a50c73e97b0bf55adf9c159 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659684 Reviewed-by: Duncan Laurie <dlaurie@google.com>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-191-1/+1
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Add support for reporting device eventsDuncan Laurie2017-06-301-0/+44
In order to report specific wake events from differernt devices add a host command that allows setting device event mask, and triggering a host event when that device event is set. This is done as a separate command and mask because we are running out of host events, and it takes over the unused thermal overload event that was never used in EC or BIOS. The first use case for this is platforms that have AP wake events that go to the EC, for instance devices that use Deep S3 and have a limited set of wake pins. (such as Eve) This allows the AP to determine the exact wake source for an event so it can be logged and acted on by the AP if necessary. BUG=b:36024430 BRANCH=eve TEST=manual testing on eve with trackpad and dsp wake events Change-Id: I48d94014c00dc1dad098ab96af0ddc7860229762 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/555632 Reviewed-by: Scott Collyer <scollyer@chromium.org>