int irq = gpio_to_irq(gpio); int ret = devm_request_threaded_irq(dev, irq, NULL, irq_handler, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "my_interrupt", NULL); if (ret) { dev_err(dev, "Unable to request IRQ: %d\n", irq); return ret; } ``` 在上面的代码示例中,我们首先通过 gpio...
irq = gpiod_to_irq(data->id_gpiod);if(irq <0) { dev_err(&pdev->dev,"failed to translate ID_OUT GPIO to IRQ\n");returnirq; } err =devm_request_threaded_irq(&pdev->dev, irq,NULL, max3355_id_irq, IRQF_ONESHOT | IRQF_NO_SUSPEND | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING...
irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); - ret = request_threaded_irq(irq, NULL, wm831x_ldo_uv_irq, - IRQF_TRIGGER_RISING, ldo->name, - ldo); + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + wm831x_ldo_uv_irq, + IRQF_TRIGGER_RISING...
irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "UV")); - ret = request_threaded_irq(irq, NULL, wm831x_dcdc_uv_irq, - IRQF_TRIGGER_RISING, dcdc->name, dcdc); + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + wm831x_dcdc_uv_irq, + IRQF_TRIGGER_RISING...
+ ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + wm831x_isink_irq, + IRQF_TRIGGER_RISING, isink->name, + isink); if (ret != 0) { dev_err(&pdev->dev, "Failed to request ISINK IRQ %d: %d\n", irq, ret); ...