Lines Matching full:debounce
43 u32 debounce; member
158 * Disable debounce before cutting it's clock. If debounce is in omap_gpio_dbck_disable()
170 * omap2_set_gpio_debounce - low level gpio debounce time
173 * @debounce: debounce time to use
175 * OMAP's debounce time is in 31us steps
176 * <debounce time> = (GPIO_DEBOUNCINGTIME[7:0].DEBOUNCETIME + 1) x 31
182 unsigned debounce) in omap2_set_gpio_debounce() argument
186 bool enable = !!debounce; in omap2_set_gpio_debounce()
192 debounce = DIV_ROUND_UP(debounce, 31) - 1; in omap2_set_gpio_debounce()
193 if ((debounce & OMAP4_GPIO_DEBOUNCINGTIME_MASK) != debounce) in omap2_set_gpio_debounce()
200 writel_relaxed(debounce, bank->base + bank->regs->debounce); in omap2_set_gpio_debounce()
207 * Enable debounce clock per module. in omap2_set_gpio_debounce()
216 bank->context.debounce = debounce; in omap2_set_gpio_debounce()
224 * omap_clear_gpio_debounce - clear debounce settings for a gpio
228 * If a gpio is using debounce, then clear the debounce enable bit and if
229 * this is the only gpio in this bank using debounce, then clear the debounce
230 * time too. The debounce clock will also be disabled when calling this function
231 * if this is the only gpio in the bank using debounce.
249 bank->context.debounce = 0; in omap_clear_gpio_debounce()
250 writel_relaxed(bank->context.debounce, bank->base + in omap_clear_gpio_debounce()
251 bank->regs->debounce); in omap_clear_gpio_debounce()
913 unsigned debounce) in omap_gpio_debounce() argument
922 ret = omap2_set_gpio_debounce(bank, offset, debounce); in omap_gpio_debounce()
927 "Could not set line %u debounce to %u microseconds (%d)", in omap_gpio_debounce()
928 offset, debounce, ret); in omap_gpio_debounce()
936 u32 debounce; in omap_gpio_set_config() local
946 debounce = pinconf_to_config_argument(config); in omap_gpio_set_config()
947 ret = omap_gpio_debounce(chip, offset, debounce); in omap_gpio_set_config()
1125 writel_relaxed(bank->context.debounce, base + regs->debounce); in omap_gpio_restore_context()
1322 .debounce = OMAP24XX_GPIO_DEBOUNCE_VAL,
1348 .debounce = OMAP4_GPIO_DEBOUNCINGTIME,
1455 "Could not get gpio dbck. Disable debounce\n"); in omap_gpio_probe()