| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <soc/addressmap.h> |
| 4 | #include <gpio.h> |
| 5 | |
| 6 | void gpio_calc_eint_pos_bit(gpio_t gpio, u32 *pos, u32 *bit) |
| 7 | { |
| 8 | *pos = gpio.id / MAX_EINT_REG_BITS; |
| 9 | *bit = gpio.id % MAX_EINT_REG_BITS; |
| 10 | } |
| 11 | |
| 12 | struct eint_regs *gpio_get_eint_reg(gpio_t gpio) |
| 13 | { |
| 14 | return (struct eint_regs *)(EINT_BASE); |
| 15 | } |