Added local_irq_save/restore and gpio_get_value