summaryrefslogtreecommitdiff
path: root/src/soc/intel/common/block
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/common/block')
-rw-r--r--src/soc/intel/common/block/gpio/gpio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/gpio/gpio.c b/src/soc/intel/common/block/gpio/gpio.c
index 4b27f3074c..08fce94be4 100644
--- a/src/soc/intel/common/block/gpio/gpio.c
+++ b/src/soc/intel/common/block/gpio/gpio.c
@@ -523,6 +523,18 @@ int gpio_get(gpio_t gpio_num)
return !!(reg & PAD_CFG0_RX_STATE);
}
+int gpio_tx_get(gpio_t gpio_num)
+{
+ const struct pad_community *comm = gpio_get_community(gpio_num);
+ uint16_t config_offset;
+ uint32_t reg;
+
+ config_offset = pad_config_offset(comm, gpio_num);
+ reg = pcr_read32(comm->port, config_offset);
+
+ return !!(reg & PAD_CFG0_TX_STATE);
+}
+
static void
gpio_pad_config_lock_using_sbi(const struct gpio_lock_config *pad_info,
uint8_t pid, uint16_t offset, const uint32_t bit_mask)