mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 19:04:59 +00:00
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>
20 lines
489 B
C
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);
|