On Thu, May 3, 2018 at 10:04 AM, Shawn Lin <shawn.lin@xxxxxxxxxxxxxx> wrote: > Could only support PIN_CONFIG_INPUT_DEBOUNCE now as the HW block > is too simple to support others. But even wrt. debounce capability, > it now could only support very limited period of time to satisfy the > real usecase. But still be useful to enable the crippled HW debounce > to prevent any spurious glitches from waking up the system if the > gpio is conguired as wakeup interrupt source. > > Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx> > --- > Hi Linus, > > This patch comes from our early discussion of debounce of cd-gpios for sd card > that I pointed out that rockchip's platform lacks HW debounce support, but I > think it's overkilled. It does have HW debounce but not really useful as the > debounce period is toooo short and almost fixed. But something is better than > nothing, so I'd like to enable it for filtering glitches, since cd-gpios for > sd card is allow to configured as wakeup source. ;) OK with the fat comment in there it sure makes sense like this, so patch applied. What I want to do is to pull in the timer-based debounce emulation from gpio_keys.c into GPIOLIB so this callback will fall back to using timers to provide debounce on all platforms and not needing reimplementations of debounce timers all over the kernel. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html