Home
last modified time | relevance | path

Searched refs:debounce (Results 1 – 25 of 32) sorted by relevance

12

/drivers/gpio/
Dgpio-menz127.c42 unsigned debounce) in men_z127_debounce() argument
49 if (!MEN_Z127_DB_IN_RANGE(debounce)) { in men_z127_debounce()
50 dev_err(dev, "debounce value %u out of range", debounce); in men_z127_debounce()
54 if (debounce > 0) { in men_z127_debounce()
56 rnd = fls(debounce) - 1; in men_z127_debounce()
58 if (rnd && (debounce & BIT(rnd - 1))) in men_z127_debounce()
59 debounce = roundup(debounce, MEN_Z127_DB_MIN_US); in men_z127_debounce()
61 debounce = rounddown(debounce, MEN_Z127_DB_MIN_US); in men_z127_debounce()
63 if (debounce > MEN_Z127_DB_MAX_US) in men_z127_debounce()
64 debounce = MEN_Z127_DB_MAX_US; in men_z127_debounce()
[all …]
Dgpio-bcm-kona.c263 unsigned debounce) in bcm_kona_gpio_set_debounce() argument
273 if ((debounce > 0 && debounce < 1000) || debounce > 128000) { in bcm_kona_gpio_set_debounce()
275 debounce); in bcm_kona_gpio_set_debounce()
280 if (debounce != 0) { in bcm_kona_gpio_set_debounce()
282 debounce /= 1000; in bcm_kona_gpio_set_debounce()
284 res = fls(debounce) - 1; in bcm_kona_gpio_set_debounce()
286 if (res > 0 && (debounce & BIT(res - 1))) in bcm_kona_gpio_set_debounce()
296 if (debounce == 0) { in bcm_kona_gpio_set_debounce()
314 u32 debounce; in bcm_kona_gpio_set_config() local
319 debounce = pinconf_to_config_argument(config); in bcm_kona_gpio_set_config()
[all …]
Dgpio-twl4030.c424 static int gpio_twl4030_debounce(u32 debounce, u8 mmc_cd) in gpio_twl4030_debounce() argument
431 message[0] = (debounce & 0xff) | (mmc_cd & 0x03); in gpio_twl4030_debounce()
432 debounce >>= 8; in gpio_twl4030_debounce()
433 message[1] = (debounce & 0xff); in gpio_twl4030_debounce()
434 debounce >>= 8; in gpio_twl4030_debounce()
435 message[2] = (debounce & 0x03); in gpio_twl4030_debounce()
459 &omap_twl_info->debounce); in of_gpio_twl4030()
531 ret = gpio_twl4030_debounce(pdata->debounce, pdata->mmc_cd); in gpio_twl4030_probe()
534 pdata->debounce, pdata->mmc_cd, ret); in gpio_twl4030_probe()
Dgpio-omap.c47 u32 debounce; member
215 unsigned debounce) in omap2_set_gpio_debounce() argument
220 bool enable = !!debounce; in omap2_set_gpio_debounce()
226 debounce = DIV_ROUND_UP(debounce, 31) - 1; in omap2_set_gpio_debounce()
227 if ((debounce & OMAP4_GPIO_DEBOUNCINGTIME_MASK) != debounce) in omap2_set_gpio_debounce()
234 reg = bank->base + bank->regs->debounce; in omap2_set_gpio_debounce()
235 writel_relaxed(debounce, reg); in omap2_set_gpio_debounce()
258 bank->context.debounce = debounce; in omap2_set_gpio_debounce()
291 bank->context.debounce = 0; in omap_clear_gpio_debounce()
292 writel_relaxed(bank->context.debounce, bank->base + in omap_clear_gpio_debounce()
[all …]
Dgpio-wm831x.c105 unsigned debounce) in wm831x_gpio_set_debounce() argument
123 if (debounce >= 32 && debounce <= 64) in wm831x_gpio_set_debounce()
125 else if (debounce >= 4000 && debounce <= 8000) in wm831x_gpio_set_debounce()
Dgpio-merrifield.c172 unsigned int debounce) in mrfld_gpio_set_debounce() argument
181 if (debounce) in mrfld_gpio_set_debounce()
195 u32 debounce; in mrfld_gpio_set_config() local
200 debounce = pinconf_to_config_argument(config); in mrfld_gpio_set_config()
201 return mrfld_gpio_set_debounce(chip, offset, debounce); in mrfld_gpio_set_config()
Dgpio-max77620.c157 unsigned int debounce) in max77620_gpio_set_debounce() argument
162 switch (debounce) { in max77620_gpio_set_debounce()
176 dev_err(mgpio->dev, "Illegal value %u\n", debounce); in max77620_gpio_set_debounce()
Dgpio-ep93xx.c299 u32 debounce; in ep93xx_gpio_set_config() local
307 debounce = pinconf_to_config_argument(config); in ep93xx_gpio_set_config()
308 ep93xx_gpio_int_debounce(irq, debounce ? true : false); in ep93xx_gpio_set_config()
Dgpio-dwapb.c299 unsigned offset, unsigned debounce) in dwapb_gpio_set_debounce() argument
309 if (debounce) in dwapb_gpio_set_debounce()
322 u32 debounce; in dwapb_gpio_set_config() local
327 debounce = pinconf_to_config_argument(config); in dwapb_gpio_set_config()
328 return dwapb_gpio_set_debounce(gc, offset, debounce); in dwapb_gpio_set_config()
Dgpio-tegra.c214 unsigned int debounce) in tegra_gpio_set_debounce() argument
218 unsigned int debounce_ms = DIV_ROUND_UP(debounce, 1000); in tegra_gpio_set_debounce()
249 u32 debounce; in tegra_gpio_set_config() local
254 debounce = pinconf_to_config_argument(config); in tegra_gpio_set_config()
255 return tegra_gpio_set_debounce(chip, offset, debounce); in tegra_gpio_set_config()
/drivers/input/misc/
Dgpio_input.c38 uint8_t debounce; member
64 uint8_t debounce; in gpio_event_input_timer_func() local
79 debounce = key_state->debounce; in gpio_event_input_timer_func()
80 if (debounce & DEBOUNCE_WAIT_IRQ) in gpio_event_input_timer_func()
82 if (key_state->debounce & DEBOUNCE_UNSTABLE) { in gpio_event_input_timer_func()
83 debounce = key_state->debounce = DEBOUNCE_UNKNOWN; in gpio_event_input_timer_func()
93 if (debounce & DEBOUNCE_POLL) { in gpio_event_input_timer_func()
94 if (pressed == !(debounce & DEBOUNCE_PRESSED)) { in gpio_event_input_timer_func()
96 key_state->debounce = DEBOUNCE_UNKNOWN; in gpio_event_input_timer_func()
105 if (pressed && (debounce & DEBOUNCE_NOTPRESSED)) { in gpio_event_input_timer_func()
[all …]
Dbfin_rotary.c39 unsigned short debounce; member
105 writew(rotary->debounce & DPRESCALE, in bfin_rotary_open()
187 rotary->debounce = pdata->debounce; in bfin_rotary_probe()
/drivers/mmc/core/
Dslot-gpio.c188 unsigned int debounce) in mmc_gpio_request_cd() argument
203 if (debounce) { in mmc_gpio_request_cd()
204 ret = gpio_set_debounce(gpio, debounce); in mmc_gpio_request_cd()
234 unsigned int debounce, bool *gpio_invert) in mmc_gpiod_request_cd() argument
244 if (debounce) { in mmc_gpiod_request_cd()
245 ret = gpiod_set_debounce(desc, debounce); in mmc_gpiod_request_cd()
285 unsigned int debounce, bool *gpio_invert) in mmc_gpiod_request_ro() argument
295 if (debounce) { in mmc_gpiod_request_ro()
296 ret = gpiod_set_debounce(desc, debounce); in mmc_gpiod_request_ro()
/drivers/input/touchscreen/
Dmk712.c85 static int debounce = 1; in mk712_interrupt() local
94 debounce = 1; in mk712_interrupt()
99 debounce = 1; in mk712_interrupt()
104 if (debounce) { in mk712_interrupt()
105 debounce = 0; in mk712_interrupt()
Dts4800-ts.c46 int debounce; member
55 ts->debounce = DEBOUNCE_COUNT; in ts4800_ts_open()
82 if (ts->debounce) { in ts4800_ts_poll()
83 ts->debounce--; in ts4800_ts_poll()
100 ts->debounce = DEBOUNCE_COUNT; in ts4800_ts_poll()
/drivers/pinctrl/
Dpinctrl-amd.c108 unsigned debounce) in amd_gpio_set_debounce() argument
119 if (debounce) { in amd_gpio_set_debounce()
132 if (debounce < 61) { in amd_gpio_set_debounce()
136 } else if (debounce < 976) { in amd_gpio_set_debounce()
137 time = debounce / 61; in amd_gpio_set_debounce()
141 } else if (debounce < 3900) { in amd_gpio_set_debounce()
142 time = debounce / 244; in amd_gpio_set_debounce()
146 } else if (debounce < 250000) { in amd_gpio_set_debounce()
147 time = debounce / 15600; in amd_gpio_set_debounce()
151 } else if (debounce < 1000000) { in amd_gpio_set_debounce()
[all …]
/drivers/extcon/
Dextcon-gpio.c79 if (pdata->debounce) { in gpio_extcon_init()
81 pdata->debounce * 1000); in gpio_extcon_init()
84 msecs_to_jiffies(pdata->debounce); in gpio_extcon_init()
Dextcon-palmas.c242 u32 debounce; in palmas_usb_probe() local
244 if (of_property_read_u32(node, "debounce-delay-ms", &debounce)) in palmas_usb_probe()
245 debounce = USB_GPIO_DEBOUNCE_MS; in palmas_usb_probe()
248 debounce * 1000); in palmas_usb_probe()
250 palmas_usb->sw_debounce_jiffies = msecs_to_jiffies(debounce); in palmas_usb_probe()
/drivers/pinctrl/intel/
Dpinctrl-baytrail.c1114 u32 conf, pull, val, debounce; in byt_pin_config_get() local
1149 debounce = readl(db_reg); in byt_pin_config_get()
1152 switch (debounce & BYT_DEBOUNCE_PULSE_MASK) { in byt_pin_config_get()
1199 u32 conf, val, debounce; in byt_pin_config_set() local
1260 debounce = readl(db_reg); in byt_pin_config_set()
1261 debounce &= ~BYT_DEBOUNCE_PULSE_MASK; in byt_pin_config_set()
1270 debounce |= BYT_DEBOUNCE_PULSE_375US; in byt_pin_config_set()
1273 debounce |= BYT_DEBOUNCE_PULSE_750US; in byt_pin_config_set()
1276 debounce |= BYT_DEBOUNCE_PULSE_1500US; in byt_pin_config_set()
1279 debounce |= BYT_DEBOUNCE_PULSE_3MS; in byt_pin_config_set()
[all …]
/drivers/mfd/
Dwm8350-gpio.c189 int pol, int pull, int invert, int debounce) in wm8350_gpio_config() argument
213 if (wm8350_gpio_set_debounce(wm8350, gpio, debounce)) in wm8350_gpio_config()
/drivers/usb/phy/
Dphy-tegra-usb.c168 u16 debounce; member
178 .debounce = 0x7530,
186 .debounce = 0x7EF4,
194 .debounce = 0xBB80,
202 .debounce = 0xFDE8,
422 val |= UTMIP_BIAS_DEBOUNCE_A(phy->freq->debounce); in utmi_phy_power_on()
/drivers/input/keyboard/
Dlm8323.c337 int debounce = lm->debounce_time >> 2; in lm8323_configure() local
344 if (debounce >= active) in lm8323_configure()
345 active = debounce + 3; in lm8323_configure()
351 lm8323_write(lm, 2, LM8323_CMD_SET_DEBOUNCE, debounce); in lm8323_configure()
/drivers/staging/greybus/
Dgpio.c481 u32 debounce; in gb_gpio_set_config() local
486 debounce = pinconf_to_config_argument(config); in gb_gpio_set_config()
487 if (debounce > U16_MAX) in gb_gpio_set_config()
490 return gb_gpio_set_debounce_operation(ggc, (u8)offset, (u16)debounce); in gb_gpio_set_config()
/drivers/pinctrl/mediatek/
Dpinctrl-mtk-common.c1001 unsigned debounce) in mtk_gpio_set_debounce() argument
1027 if (debounce <= debounce_time[i]) { in mtk_gpio_set_debounce()
1060 u32 debounce; in mtk_gpio_set_config() local
1065 debounce = pinconf_to_config_argument(config); in mtk_gpio_set_config()
1066 return mtk_gpio_set_debounce(chip, offset, debounce); in mtk_gpio_set_config()
/drivers/pinctrl/sunxi/
Dpinctrl-sunxi.c1207 u32 debounce; in sunxi_pinctrl_setup_debounce() local
1210 i, &debounce); in sunxi_pinctrl_setup_debounce()
1214 if (!debounce) in sunxi_pinctrl_setup_debounce()
1217 debounce_freq = DIV_ROUND_CLOSEST(USEC_PER_SEC, debounce); in sunxi_pinctrl_setup_debounce()

12