summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/tablet_mode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/common/tablet_mode.c b/common/tablet_mode.c
index 5486ffc668..68d90ae772 100644
--- a/common/tablet_mode.c
+++ b/common/tablet_mode.c
@@ -42,9 +42,14 @@ int tablet_get_mode(void)
return tablet_mode;
}
-static void notify_tablet_mode_change(void)
+static inline void print_tablet_mode(void)
{
CPRINTS("tablet mode %sabled", tablet_mode ? "en" : "dis");
+}
+
+static void notify_tablet_mode_change(void)
+{
+ print_tablet_mode();
hook_notify(HOOK_TABLET_MODE_CHANGE);
/*
@@ -168,6 +173,11 @@ void gmr_tablet_switch_disable(void)
static int command_settabletmode(int argc, char **argv)
{
+ if (argc == 1) {
+ print_tablet_mode();
+ return EC_SUCCESS;
+ }
+
if (argc != 2)
return EC_ERROR_PARAM_COUNT;