summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/pinctrl-imx233.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/pinctrl-imx233.h')
-rw-r--r--firmware/target/arm/imx233/pinctrl-imx233.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/pinctrl-imx233.h b/firmware/target/arm/imx233/pinctrl-imx233.h
index a2e02adec4..ec23410442 100644
--- a/firmware/target/arm/imx233/pinctrl-imx233.h
+++ b/firmware/target/arm/imx233/pinctrl-imx233.h
@@ -51,6 +51,8 @@
#define PINCTRL_DRIVE_12mA 2
#define PINCTRL_DRIVE_16mA 3 /* not available on all pins */
+typedef void (*pin_irq_cb_t)(int bank, int pin);
+
static inline void imx233_pinctrl_init(void)
{
__REG_CLR(HW_PINCTRL_CTRL) = __BLOCK_CLKGATE | __BLOCK_SFTRST;
@@ -121,4 +123,9 @@ static inline void imx233_enable_pin_pullup_mask(unsigned bank, uint32_t pin_msk
__REG_CLR(HW_PINCTRL_PULL(bank)) = pin_msk;
}
+/** On irq, the pin irq interrupt is disable and then cb is called;
+ * the setup_pin_irq function needs to be called again to enable it again */
+void imx233_setup_pin_irq(int bank, int pin, bool enable_int,
+ bool level, bool polarity, pin_irq_cb_t cb);
+
#endif /* __PINCTRL_IMX233_H__ */