Lines Matching full:debounce

42 	u32 debounce;  member
156 * Disable debounce before cutting it's clock. If debounce is in omap_gpio_dbck_disable()
168 * omap2_set_gpio_debounce - low level gpio debounce time
171 * @debounce: debounce time to use
173 * OMAP's debounce time is in 31us steps
174 * <debounce time> = (GPIO_DEBOUNCINGTIME[7:0].DEBOUNCETIME + 1) x 31
180 unsigned debounce) in omap2_set_gpio_debounce() argument
184 bool enable = !!debounce; in omap2_set_gpio_debounce()
190 debounce = DIV_ROUND_UP(debounce, 31) - 1; in omap2_set_gpio_debounce()
191 if ((debounce & OMAP4_GPIO_DEBOUNCINGTIME_MASK) != debounce) in omap2_set_gpio_debounce()
198 writel_relaxed(debounce, bank->base + bank->regs->debounce); in omap2_set_gpio_debounce()
205 * Enable debounce clock per module. in omap2_set_gpio_debounce()
214 bank->context.debounce = debounce; in omap2_set_gpio_debounce()
222 * omap_clear_gpio_debounce - clear debounce settings for a gpio
226 * If a gpio is using debounce, then clear the debounce enable bit and if
227 * this is the only gpio in this bank using debounce, then clear the debounce
228 * time too. The debounce clock will also be disabled when calling this function
229 * if this is the only gpio in the bank using debounce.
247 bank->context.debounce = 0; in omap_clear_gpio_debounce()
248 writel_relaxed(bank->context.debounce, bank->base + in omap_clear_gpio_debounce()
249 bank->regs->debounce); in omap_clear_gpio_debounce()
876 unsigned debounce) in omap_gpio_debounce() argument
885 ret = omap2_set_gpio_debounce(bank, offset, debounce); in omap_gpio_debounce()
890 "Could not set line %u debounce to %u microseconds (%d)", in omap_gpio_debounce()
891 offset, debounce, ret); in omap_gpio_debounce()
899 u32 debounce; in omap_gpio_set_config() local
909 debounce = pinconf_to_config_argument(config); in omap_gpio_set_config()
910 ret = omap_gpio_debounce(chip, offset, debounce); in omap_gpio_set_config()
1104 writel_relaxed(bank->context.debounce, base + regs->debounce); in omap_gpio_restore_context()
1296 .debounce = OMAP24XX_GPIO_DEBOUNCE_VAL,
1321 .debounce = OMAP4_GPIO_DEBOUNCINGTIME,
1451 "Could not get gpio dbck. Disable debounce\n"); in omap_gpio_probe()