From 9ed5a4910c477f418ba200252cd6696339ee5ba5 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 11 Jul 2019 11:42:35 -0700 Subject: tablet-mode: Fix header file guard and API definitions This patch adds a usual inclusion guard (#ifdef __CROS_EC_*_H) and fixes API descriptions. Signed-off-by: Daisuke Nojiri BUG=none BRANCH=none TEST=buildall Change-Id: I96149cfe76cff7ab85be4785252a600b565e4a92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1696913 Reviewed-by: Daisuke Nojiri Commit-Queue: Daisuke Nojiri Tested-by: Daisuke Nojiri Auto-Submit: Daisuke Nojiri --- include/tablet_mode.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/include/tablet_mode.h b/include/tablet_mode.h index e4444aca1b..8b527ccadf 100644 --- a/include/tablet_mode.h +++ b/include/tablet_mode.h @@ -3,12 +3,21 @@ * found in the LICENSE file. */ -/* Header for tablet_mode.c */ +#ifndef __CROS_EC_TABLET_MODE_H +#define __CROS_EC_TABLET_MODE_H -#ifdef CONFIG_TABLET_MODE - -/* Return 1 if in tablet mode, 0 otherwise */ +/** + * Get tablet mode state + * + * Return 1 if in tablet mode, 0 otherwise + */ int tablet_get_mode(void); + +/** + * Set tablet mode state + * + * @param mode 1: tablet mode. 0 clamshell mode. + */ void tablet_set_mode(int mode); /** @@ -28,7 +37,7 @@ void hall_sensor_isr(enum gpio_signal signal); */ void hall_sensor_disable(void); -/* +/** * This must be defined when CONFIG_HALL_SENSOR_CUSTOM is defined. This allows * a board to override the default behavior that determines if the 360 sensor is * active: !gpio_get_level(HALL_SENSOR_GPIO_L). @@ -37,4 +46,4 @@ void hall_sensor_disable(void); */ int board_sensor_at_360(void); -#endif +#endif /* __CROS_EC_TABLET_MODE_H */ -- cgit v1.2.1