Source
482
482
483
483
default:
484
484
dev_err(&gpio_dev->pdev->dev, "Invalid type value\n");
485
485
ret = -EINVAL;
486
486
}
487
487
488
488
pin_reg |= CLR_INTR_STAT << INTERRUPT_STS_OFF;
489
489
/*
490
490
* If WAKE_INT_MASTER_REG.MaskStsEn is set, a software write to the
491
491
* debounce registers of any GPIO will block wake/interrupt status
492
-
* generation for *all* GPIOs for a lenght of time that depends on
492
+
* generation for *all* GPIOs for a length of time that depends on
493
493
* WAKE_INT_MASTER_REG.MaskStsLength[11:0]. During this period the
494
494
* INTERRUPT_ENABLE bit will read as 0.
495
495
*
496
496
* We temporarily enable irq for the GPIO whose configuration is
497
497
* changing, and then wait for it to read back as 1 to know when
498
498
* debounce has settled and then disable the irq again.
499
499
* We do this polling with the spinlock held to ensure other GPIO
500
500
* access routines do not read an incorrect value for the irq enable
501
501
* bit of other GPIOs. We keep the GPIO masked while polling to avoid
502
502
* spurious irqs, and disable the irq again after polling.