summaryrefslogtreecommitdiff
path: root/board/beadrix
diff options
context:
space:
mode:
authorTeddy Shih <teddyshih@ami.corp-partner.google.com>2022-03-23 15:12:11 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-03-23 11:30:36 +0000
commitd2f6303bbe8065f7103c65209a66a73b28616c5c (patch)
tree0af57fa44a48a5063d3c57e52ae8a4be61373044 /board/beadrix
parentc15fb98e35aab9ffc4ba1deeaead95f66d6cb71a (diff)
downloadchrome-ec-d2f6303bbe8065f7103c65209a66a73b28616c5c.tar.gz
beadrix : Update lid sensor
As Beadrix project does not have tablet mode capability, we disable unused lid sensor gpio pin, CONFIG_TABLET_MODE, and CONFIG_LID_ANGLE according to schematic. BRANCH=main BUG=b:226296636 TEST=on beadrix, tablet mode will not be lanuched via Lid sensor. Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com> Change-Id: Ib9201f90996c71481c94d1ef0485dfdac9485f0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3544874 Reviewed-by: Ivan Chen <yulunchen@google.com> Commit-Queue: Ivan Chen <yulunchen@google.com> Reviewed-by: Super Ni <super.ni@intel.corp-partner.google.com> Commit-Queue: Super Ni <super.ni@intel.corp-partner.google.com>
Diffstat (limited to 'board/beadrix')
-rw-r--r--board/beadrix/board.c27
-rw-r--r--board/beadrix/board.h9
-rw-r--r--board/beadrix/gpio.inc2
3 files changed, 1 insertions, 37 deletions
diff --git a/board/beadrix/board.c b/board/beadrix/board.c
index e72238e14b..a22c2946e0 100644
--- a/board/beadrix/board.c
+++ b/board/beadrix/board.c
@@ -33,7 +33,6 @@
#include "pwm_chip.h"
#include "switch.h"
#include "system.h"
-#include "tablet_mode.h"
#include "task.h"
#include "temp_sensor.h"
#include "uart.h"
@@ -556,32 +555,6 @@ const struct temp_sensor_t temp_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT);
-/* This callback disables keyboard when convertibles are fully open */
-__override void lid_angle_peripheral_enable(int enable)
-{
- int chipset_in_s0 = chipset_in_state(CHIPSET_STATE_ON);
-
- /*
- * If the lid is in tablet position via other sensors,
- * ignore the lid angle, which might be faulty then
- * disable keyboard.
- */
- if (tablet_get_mode())
- enable = 0;
-
- if (enable) {
- keyboard_scan_enable(1, KB_SCAN_DISABLE_LID_ANGLE);
- } else {
- /*
- * Ensure that the chipset is off before disabling the keyboard.
- * When the chipset is on, the EC keeps the keyboard enabled and
- * the AP decides whether to ignore input devices or not.
- */
- if (!chipset_in_s0)
- keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_ANGLE);
- }
-}
-
static const struct ec_response_keybd_config keybd1 = {
.num_top_row_keys = 10,
.action_keys = {
diff --git a/board/beadrix/board.h b/board/beadrix/board.h
index c3ab0325ae..81c20a44af 100644
--- a/board/beadrix/board.h
+++ b/board/beadrix/board.h
@@ -57,15 +57,6 @@
#define CONFIG_ACCEL_FIFO_SIZE 256
#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3)
-#define CONFIG_LID_ANGLE
-#define CONFIG_LID_ANGLE_UPDATE
-#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
-#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
-
-#define CONFIG_TABLET_MODE
-#define CONFIG_TABLET_MODE_SWITCH
-#define CONFIG_GMR_TABLET_MODE
-
/* TCPC */
#define CONFIG_USB_PD_TCPM_ANX7447 /* C1: MUX only*/
#define CONFIG_USB_PD_TCPM_MUX
diff --git a/board/beadrix/gpio.inc b/board/beadrix/gpio.inc
index fdd0a3d16c..6b90aba1c8 100644
--- a/board/beadrix/gpio.inc
+++ b/board/beadrix/gpio.inc
@@ -35,7 +35,6 @@ GPIO_INT(USB_C0_CCSBU_OVP_ODL, PIN(K, 6), GPIO_INT_FALLING | GPIO_PULL_UP, c0_cc
/* Other interrupts */
GPIO_INT(LID_OPEN, PIN(F, 3), GPIO_INT_BOTH, lid_interrupt)
-GPIO_INT(LID_360_L, PIN(A, 7), GPIO_INT_BOTH, gmr_tablet_switch_isr)
GPIO_INT(VOLDN_BTN_ODL, PIN(I, 6), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO_INT(VOLUP_BTN_ODL, PIN(I, 7), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt)
GPIO_INT(BASE_SIXAXIS_INT_L, PIN(J, 0), GPIO_INT_FALLING | GPIO_SEL_1P8V, lsm6dsm_interrupt)
@@ -109,6 +108,7 @@ GPIO(EC_LED_B_ODL, PIN(A, 3), GPIO_OUT_LOW)
/* NC pins, enable internal pull-down to avoid floating state. */
GPIO(GPIOA0_NC, PIN(A, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOA2_NC, PIN(A, 2), GPIO_INPUT | GPIO_PULL_DOWN)
+GPIO(GPIOA7_NC, PIN(A, 7), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOB5_NC, PIN(B, 5), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC0_NC, PIN(C, 0), GPIO_INPUT | GPIO_PULL_DOWN)
GPIO(GPIOC3_NC, PIN(C, 3), GPIO_INPUT | GPIO_PULL_DOWN)