diff options
author | Edward Hill <ecgh@chromium.org> | 2019-10-10 15:50:32 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-25 18:52:10 +0000 |
commit | ae8a4284f2cef0afb2235ddfa8e66cc5c1925609 (patch) | |
tree | d9cf217d53cd016bc7a98bf1f85425e46bcf068a /include/gpio.h | |
parent | 9f392b0d616f6fec17d213736e6bf9f4217392e4 (diff) | |
download | chrome-ec-ae8a4284f2cef0afb2235ddfa8e66cc5c1925609.tar.gz |
usb_port_power_smart: Add support for IO expander GPIOs
Allow CONFIG_USB_PORT_POWER_SMART GPIO signals to be either local GPIOs
or IO expander GPIOs.
BUG=b:138600691
BRANCH=none
TEST=CONFIG_USB_PORT_POWER_SMART with IO expander signals works on Trembyle
Change-Id: Ic5273926ec4f428586370175a136bff68900a323
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1854779
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r-- | include/gpio.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/gpio.h b/include/gpio.h index 50270cfcbc..75f23c5935 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -195,10 +195,20 @@ int gpio_get_default_flags(enum gpio_signal signal); * Set the value of a signal. * * @param signal Signal to set - * @param value New value for signal (0 = low, != high */ + * @param value New value for signal (0 = low, 1 = high) + */ void gpio_set_level(enum gpio_signal signal, int value); /** + * Set the value of a signal that could be either a local GPIO or an IO + * expander GPIO. + * + * @param signal GPIO_* or IOEX_* signal to set + * @param value New value for signal (0 = low, 1 = high) + */ +void gpio_or_ioex_set_level(int signal, int value); + +/** * Reset the GPIO flags and alternate function state * * This returns the GPIO to it's default state of being a GPIO (not |