aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/qcom_tlmm/qcom_tlmm_ipq4018_hw.c1
-rw-r--r--sys/dev/qcom_tlmm/qcom_tlmm_pin.c5
-rw-r--r--sys/dev/qcom_tlmm/qcom_tlmm_var.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018_hw.c b/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018_hw.c
index 12aa1b7f8305..14d1055f195a 100644
--- a/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018_hw.c
+++ b/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018_hw.c
@@ -314,6 +314,7 @@ qcom_tlmm_ipq4018_hw_pin_set_pupd_config(
reg |= QCOM_TLMM_IPQ4018_REG_PIN_CONTROL_PUPD_PULLDOWN
<< QCOM_TLMM_IPQ4018_REG_PIN_CONTROL_PUPD_SHIFT;
break;
+ case QCOM_TLMM_PIN_PUPD_CONFIG_STRONG_PULL_UP:
case QCOM_TLMM_PIN_PUPD_CONFIG_PULL_UP:
reg |= QCOM_TLMM_IPQ4018_REG_PIN_CONTROL_PUPD_PULLUP
<< QCOM_TLMM_IPQ4018_REG_PIN_CONTROL_PUPD_SHIFT;
diff --git a/sys/dev/qcom_tlmm/qcom_tlmm_pin.c b/sys/dev/qcom_tlmm/qcom_tlmm_pin.c
index 27d6f904d664..fcdcb20f6c95 100644
--- a/sys/dev/qcom_tlmm/qcom_tlmm_pin.c
+++ b/sys/dev/qcom_tlmm/qcom_tlmm_pin.c
@@ -101,6 +101,7 @@ qcom_tlmm_pin_configure(struct qcom_tlmm_softc *sc,
pin->gp_flags |= GPIO_PIN_PULLUP;
sc->sc_hw->qcom_tlmm_hw_pin_set_pupd_config(sc, pin->gp_pin,
QCOM_TLMM_PIN_PUPD_CONFIG_PULL_UP);
+ /* XXX todo: i2c strong pull-up? */
} else if (flags & GPIO_PIN_PULLDOWN) {
pin->gp_flags |= GPIO_PIN_PULLDOWN;
sc->sc_hw->qcom_tlmm_hw_pin_set_pupd_config(sc, pin->gp_pin,
@@ -197,6 +198,10 @@ qcom_tlmm_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags)
case QCOM_TLMM_PIN_PUPD_CONFIG_PULL_UP:
*flags |= GPIO_PIN_PULLUP;
break;
+ case QCOM_TLMM_PIN_PUPD_CONFIG_STRONG_PULL_UP:
+ /* XXX flag i2c "strong" pull-up? */
+ *flags |= GPIO_PIN_PULLUP;
+ break;
case QCOM_TLMM_PIN_PUPD_CONFIG_BUS_HOLD:
*flags |= (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN);
break;
diff --git a/sys/dev/qcom_tlmm/qcom_tlmm_var.h b/sys/dev/qcom_tlmm/qcom_tlmm_var.h
index 4fd37f83192e..f9b9bcd9a3c8 100644
--- a/sys/dev/qcom_tlmm/qcom_tlmm_var.h
+++ b/sys/dev/qcom_tlmm/qcom_tlmm_var.h
@@ -95,6 +95,7 @@ typedef enum {
QCOM_TLMM_PIN_PUPD_CONFIG_PULL_DOWN = 1,
QCOM_TLMM_PIN_PUPD_CONFIG_PULL_UP = 2,
QCOM_TLMM_PIN_PUPD_CONFIG_BUS_HOLD = 3,
+ QCOM_TLMM_PIN_PUPD_CONFIG_STRONG_PULL_UP = 4, /* i2c */
} qcom_tlmm_pin_pupd_config_t;