/* enable/disable the glitch filter. mostly used with IRQ handling.  */
int at91_pio3_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
/* enable/disable the glitch filter. mostly used with IRQ handling.  */
int at91_pio3_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
{
	struct at91_port *at91_port = at91_pio_get_port(port);
	u32 mask;
	if (at91_port && (pin < GPIO_PER_BANK)) {
		mask = 1 << pin;
		if (is_on) {
			writel(mask, &at91_port->mux.pio3.ifscdr);
			writel(mask, &at91_port->ifer);
		} else {
			writel(mask, &at91_port->ifdr);
		}
	}
	return 0;
}