On Tue, Nov 12, 2024 at 4:59 PM Eugen Hristev <eugen.hris...@linaro.org> wrote: > > > > On 11/12/24 17:57, Zixun LI wrote: > > Hello, > > > > > > On Tue, Nov 12, 2024 at 2:13 PM Eugen Hristev <eugen.hris...@linaro.org> > > wrote: > >> > >> > >>> +static bool at91_get_port_pio(struct at91_port *at91_port, int offset) > >> > >> The name get_port_pio is a bit confusing, can you rename it to something > >> more meaningful, like maybe is_periph_func or something ? > > > > How about at91_is_port_pio_active, more inline to the datasheet. > > > I am not sure. It appears confusing to me. > The pin is either in GPIO or peripheral function mode. > Being 'PIO active' appears to be something different, or common to both > options. > What does the datasheet say exactly ?
>From SAM9G25 datasheet, 22.6.3 PIO Status Register 0: PIO is inactive on the corresponding I/O line (peripheral is active). 1: PIO is active on the corresponding I/O line (peripheral is inactive). "PIO" is the port controller itself but also means GPIO which is not very clear. Or at91_is_port_gpio ?