summaryrefslogtreecommitdiff
path: root/include/eoption.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-10 13:50:29 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-10 14:09:40 -0700
commit322eebbae40c6e4450ab4867de31d56e37471436 (patch)
tree22957b3bdd4eef72730bb36a6b1aebd4b3a39002 /include/eoption.h
parenteac723c3e5567a8c968e25773da9875bd1e66e1e (diff)
downloadchrome-ec-322eebbae40c6e4450ab4867de31d56e37471436.tar.gz
Add fake developer switch
Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:8884 TEST=manual optget fake_dev_switch --> 0 optset fake_dev_switch 1 optget fake_dev_switch --> 1 optset fake_dev_switch 0 optget fake_dev_switch --> 0 Reboot by holding ESC+D and tapping power optget fake_dev_switch --> 1 Reboot by holding ESC+F and tapping power optget fake_dev_switch --> 0 Change-Id: Iccb3bc8b3d571e551e204892769efc4161858055
Diffstat (limited to 'include/eoption.h')
-rw-r--r--include/eoption.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/eoption.h b/include/eoption.h
new file mode 100644
index 0000000000..da75f34346
--- /dev/null
+++ b/include/eoption.h
@@ -0,0 +1,27 @@
+/* Copyright (c) 2012 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.
+ */
+
+/* Persistent EC options stored in EEPROM */
+
+#ifndef __CROS_EC_EOPTION_H
+#define __CROS_EC_EOPTION_H
+
+#include "common.h"
+
+/* Boolean options */
+enum eoption_bool {
+ EOPTION_BOOL_FAKE_DEV = 0, /* Fake developer switch */
+};
+
+/* Initialize the module. */
+int eoption_init(void);
+
+/* Return the current value of a boolean option. */
+int eoption_get_bool(enum eoption_bool opt);
+
+/* Set the value of a boolean option (0 = clear, non-zero=set). */
+int eoption_set_bool(enum eoption_bool opt, int value);
+
+#endif /* __CROS_EC_EOPTION_H */