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