summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-29 14:13:36 -0700
committerGerrit <chrome-bot@google.com>2012-10-30 14:50:03 -0700
commita21ea56e76ff71849d45f59608c0beb7bede4c02 (patch)
treed8e3bd5d57920878f9603cf4c3fee7b39b371188 /include
parent80467aff915c638b1c3f96a51becffd493791962 (diff)
downloadchrome-ec-a21ea56e76ff71849d45f59608c0beb7bede4c02.tar.gz
Rename power_button module to switch
Since it handles not just power button, but also lid switch, AC detect, and other switches. No functional changes; just renaming. BUG=chrome-os-partner:15579 BRANCH=none TEST=boot system, power on/off with power button Change-Id: I51628a52293f7207715f5f6bf368a08fe6c3dbce Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36821
Diffstat (limited to 'include')
-rw-r--r--include/console.h2
-rw-r--r--include/switch.h (renamed from include/power_button.h)22
2 files changed, 12 insertions, 12 deletions
diff --git a/include/console.h b/include/console.h
index a759eec628..8bfdd579b0 100644
--- a/include/console.h
+++ b/include/console.h
@@ -41,9 +41,9 @@ enum console_channel {
CC_LIGHTBAR,
CC_LPC,
CC_PORT80,
- CC_POWERBTN,
CC_PWM,
CC_SPI,
+ CC_SWITCH,
CC_SYSTEM,
CC_TASK,
CC_THERMAL,
diff --git a/include/power_button.h b/include/switch.h
index 12919acf7b..9c4dfef498 100644
--- a/include/power_button.h
+++ b/include/switch.h
@@ -3,41 +3,41 @@
* found in the LICENSE file.
*/
-/* Power button module for Chrome EC */
+/* Switch module for Chrome EC */
-#ifndef __CROS_EC_POWER_BUTTON_H
-#define __CROS_EC_POWER_BUTTON_H
+#ifndef __CROS_EC_SWITCH_H
+#define __CROS_EC_SWITCH_H
#include "common.h"
#include "gpio.h"
/**
- * Interrupt handler for the power button and lid switch.
+ * Interrupt handler for switch inputs.
*
* @param signal Signal which triggered the interrupt.
*/
-void power_button_interrupt(enum gpio_signal signal);
+void switch_interrupt(enum gpio_signal signal);
/**
- * Power button task.
+ * Switch task.
*/
-void power_button_task(void);
+void switch_task(void);
/**
* Return non-zero if AC power is present.
*/
-int power_ac_present(void);
+int switch_get_ac_present(void);
/**
* Return non-zero if lid is open.
*
* Uses the debounced lid state, not the raw signal from the GPIO.
*/
-int power_lid_open_debounced(void);
+int switch_get_lid_open(void);
/**
* Return non-zero if write protect signal is asserted.
*/
-int write_protect_asserted(void);
+int switch_get_write_protect(void);
-#endif /* __CROS_EC_POWER_BUTTON_H */
+#endif /* __CROS_EC_SWITCH_H */