summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2018-02-16 17:02:49 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-14 01:19:40 +0000
commitdea8458d610154787d49e9cc3847b07a5f09a457 (patch)
treed036da5717c08401f294d0e4b26d06688c55f8fe /chip
parentce6c064480a0d300ab1502539e578585197893fe (diff)
downloadchrome-ec-dea8458d610154787d49e9cc3847b07a5f09a457.tar.gz
cr50: remove set capabilities from powerbtn
Cr50 cannot override the state of the power button. It was possible with dev cr50 chips, but the capability was removed in prod chips. Change the console command, so it is only used to get the state of the power button. Remove all of the commands used to override the power button. BUG=b:73557298 BRANCH=none TEST=none Change-Id: I99cb5e8a18dd972fba460c434364702f06a26305 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/926964 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org> (cherry picked from commit 64a4e6b7045861c57505bcbbc8ad3a5ad6e0e5ed) Reviewed-on: https://chromium-review.googlesource.com/949069 Tested-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/g/rbox.c25
-rw-r--r--chip/g/rbox.h15
2 files changed, 0 insertions, 40 deletions
diff --git a/chip/g/rbox.c b/chip/g/rbox.c
index fc09b8792a..c30e80a871 100644
--- a/chip/g/rbox.c
+++ b/chip/g/rbox.c
@@ -10,36 +10,11 @@
#define POWER_BUTTON 2
-static uint8_t val;
-
int rbox_powerbtn_is_pressed(void)
{
return !GREAD_FIELD(RBOX, CHECK_OUTPUT, PWRB_OUT);
}
-int rbox_powerbtn_override_is_enabled(void)
-{
- return GREAD_FIELD(RBOX, OVERRIDE_OUTPUT, EN) & (1 << POWER_BUTTON);
-}
-
-void rbox_powerbtn_release(void)
-{
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, EN, 0);
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, OEN, 0);
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, VAL, val);
-}
-
-void rbox_powerbtn_press(void)
-{
- if (rbox_powerbtn_override_is_enabled())
- return;
-
- val = GREAD_FIELD(RBOX, OVERRIDE_OUTPUT, VAL);
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, VAL, ~(1 << POWER_BUTTON) & val);
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, OEN, 1 << POWER_BUTTON);
- GWRITE_FIELD(RBOX, OVERRIDE_OUTPUT, EN, 1 << POWER_BUTTON);
-}
-
static void rbox_release_ec_reset(void)
{
/* Unfreeze the PINMUX */
diff --git a/chip/g/rbox.h b/chip/g/rbox.h
index e327faaf8e..5d08118c54 100644
--- a/chip/g/rbox.h
+++ b/chip/g/rbox.h
@@ -10,19 +10,4 @@
* Return true if the power button output shows it is pressed
*/
int rbox_powerbtn_is_pressed(void);
-
-/**
- * Return true if power button rbox output override is enabled
- */
-int rbox_powerbtn_override_is_enabled(void);
-
-/**
- * Disable the output override
- */
-void rbox_powerbtn_release(void);
-
-/**
- * Override power button output to force a power button press
- */
-void rbox_powerbtn_press(void);
#endif /* __CROS_RBOX_H */