hello:
I use r3541 version , use Linux API functions gpiod_set_debounce
, When using a 10ms, 1Hz cycle PWM test, blocking GPIO cannot be performed and interrupts will still occur. From the results, use 20ms setting, it seems that it did not play a role in hardware stabilization. The order of executing the relevant code is as follows:
//device tree
input-gpios = <&tegra_main_gpio IN_1 GPIO_ACTIVE_HIGH>,
<&tegra_main_gpio IN_2 GPIO_ACTIVE_HIGH>;
//Driver code
gdev->input_gpios = devm_gpiod_get_array(dev, "output", GPIOD_OUT_LOW);
gdev->num_inputs = gdev->input_gpios->ndescs;
gpiod_set_debounce(gdev->input_gpios->desc[0], 20000);
gdev->irq_nums = devm_kzalloc(dev, sizeof(int) * gdev->num_inputs, GFP_KERNEL);
gdev->irq_nums[i] = gpiod_to_irq(gdev->input_gpios->desc[i]);
ret = devm_request_irq(dev, gdev->irq_nums[i], gpio_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_RISING, IRQ_NAME, gdev);
I want to confirm if this function is supported by SOC and what is the range of hardware jitter parameter values that can be configured? very thanks.