diff options
Diffstat (limited to 'src/soc/intel/fsp_baytrail/gpio.c')
-rw-r--r-- | src/soc/intel/fsp_baytrail/gpio.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/soc/intel/fsp_baytrail/gpio.c b/src/soc/intel/fsp_baytrail/gpio.c index 63135966f9..3497a637be 100644 --- a/src/soc/intel/fsp_baytrail/gpio.c +++ b/src/soc/intel/fsp_baytrail/gpio.c @@ -266,6 +266,18 @@ uint8_t read_score_gpio(uint8_t gpio_num) return retval; } +/** \brief sets an output SCORE GPIO to desired value + * + * @param gpio_num The GPIO number being read + * @param val The value this output must be set to (0 or 1) + * @return void + */ +void write_score_gpio(uint8_t gpio_num, uint8_t val) +{ + if (gpio_num < GPSCORE_COUNT) + score_set_gpio(gpscore_gpio_to_pad[gpio_num], val); +} + /** \brief returns the input / output value from an SSUS GPIO * * @param gpio_num The GPIO number being read @@ -280,6 +292,18 @@ uint8_t read_ssus_gpio(uint8_t gpio_num) return retval; } +/** \brief sets an output SSUS GPIO to desired value + * + * @param gpio_num The GPIO number being read + * @param val The value this output must be set to (0 or 1) + * @return void + */ +void write_ssus_gpio(uint8_t gpio_num, uint8_t val) +{ + if (gpio_num < GPSSUS_COUNT) + ssus_set_gpio(gpssus_gpio_to_pad[gpio_num], val); +} + /** \brief Sets up the function, pulls, and Input/Output of a Baytrail * SSUS (S5) or SCORE (S0) GPIO * |