diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-05-08 12:18:42 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-05-08 21:00:38 -0700 |
commit | 8ea7983c298cb33b7e1b0a063a3a98408d2779ab (patch) | |
tree | 679cd5a4ee57e9cdaa2963f76897814865bbca59 /include | |
parent | 2615d8cdaebfa017af86380b48b1b01aa2a208e5 (diff) | |
download | chrome-ec-8ea7983c298cb33b7e1b0a063a3a98408d2779ab.tar.gz |
Add gpio_set_flags() and system_get_board_version()
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9117
TEST=version; board version should be 0 on proto1 and 1 on EVT
Change-Id: Ic64ad0d009151fbda09f5c1605ef50ae708cb6ae
Diffstat (limited to 'include')
-rw-r--r-- | include/gpio.h | 12 | ||||
-rw-r--r-- | include/system.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/gpio.h b/include/gpio.h index bb19c91a6f..b70e40f9a1 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -62,7 +62,7 @@ extern const struct gpio_info gpio_list[GPIO_COUNT]; * set up. */ int gpio_pre_init(void); -/* Gets the current value of a signal (0=low, 1=hi). */ +/* Get the current value of a signal (0=low, 1=hi). */ int gpio_get_level(enum gpio_signal signal); /** @@ -73,11 +73,15 @@ int gpio_get_level(enum gpio_signal signal); */ const char *gpio_get_name(enum gpio_signal signal); -/* Sets the current value of a signal. Returns error if the signal is - * not supported or is an input signal. */ +/* Set the flags for a signal. Note that this does not set the signal level + * based on the presence/absence of GPIO_HIGH; call gpio_set_level() afterwards + * to do that if needed. */ +int gpio_set_flags(enum gpio_signal signal, int flags); + +/* Set the current value of a signal. */ int gpio_set_level(enum gpio_signal signal, int value); -/* Enables interrupts for the signal. The signal must have been defined with +/* Enable interrupts for the signal. The signal must have been defined with * an interrupt handler. Normally called by the module which handles the * interrupt, once it's ready to start processing interrupts. */ int gpio_enable_interrupt(enum gpio_signal signal); diff --git a/include/system.h b/include/system.h index 3246242971..4aeac7b2c6 100644 --- a/include/system.h +++ b/include/system.h @@ -105,6 +105,10 @@ int system_run_image_copy(enum system_image_copy_t copy, * currently-running image. */ const char *system_get_version(enum system_image_copy_t copy); +/* Return the board version number. The meaning of this number is + * board-dependent; see enum board_version in board.h for known versions. */ +int system_get_board_version(void); + /* Returns information about the build including the version * the build date and user/machine. */ |