Files
OpenCellular/include/tablet_mode.h
Daisuke Nojiri c7559fea4e tablet_mode: Define common interrupt handler for tablet switch
This patch adds an interrupt handler for a tablet switch and an init
hook to enable the interrupt.

The handler does the typical tasks for convertible devices: 1. sets
tablet mode then 2. disables peripherals if tablet mode is on.

Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>

BUG=b:77298177
BRANCH=none
TEST=buildall. Verify on Nami.

Change-Id: If7fb5ea15f388d2b6084d800d2bc05efafd1945e
Reviewed-on: https://chromium-review.googlesource.com/1043057
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2018-05-09 14:40:08 -07:00

20 lines
489 B
C

/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Header for tablet_mode.c */
/* Return 1 if in tablet mode, 0 otherwise */
int tablet_get_mode(void);
void tablet_set_mode(int mode);
/**
* Interrupt service routine for tablet switch.
*
* TABLET_MODE_GPIO_L must be defined.
*
* @param signal: GPIO signal
*/
void tablet_mode_isr(enum gpio_signal signal);