/* Undo a previous pin reservation. Will not affect the hardware configuration.  */
void at32_deselect_pin(unsigned int pin)
/* Undo a previous pin reservation. Will not affect the hardware configuration.  */
void at32_deselect_pin(unsigned int pin)
{
	struct pio_device *pio;
	unsigned int pin_index = pin & 0x1f;
	pio = gpio_to_pio(pin);
	if (unlikely(!pio)) {
		printk("pio: invalid pin %u\n", pin);
		dump_stack();
		return;
	}
	clear_bit(pin_index, &pio->pinmux_mask);
}