/* read the pin's value (works even if it's not muxed as a gpio).  */
int at91_get_pio_value(unsigned port, unsigned pin)
/* read the pin's value (works even if it's not muxed as a gpio).  */
int at91_get_pio_value(unsigned port, unsigned pin)
{
	struct at91_port *at91_port = at91_pio_get_port(port);
	if (at91_port && (pin < GPIO_PER_BANK))
		return at91_get_port_value(at91_port, pin);
	return 0;
}