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_to_irq 将 GPIO 转换为中断号,并...
pm805->irq_audio_short1 = irq_short1 + chip->irq_base; pm805->irq_audio_short2 = irq_short2 + chip->irq_base; INIT_WORK(&pm805->work_short, pm805_short_work); ret =devm_request_threaded_irq(&pdev->dev, pm805->irq_audio_short1,NULL, pm805_short_handler, IRQF_ONESHOT,"aud...
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...
- IRQF_TRIGGER_RISING, ldo->name, ldo); + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, + wm831x_ldo_uv_irq, + IRQF_TRIGGER_RISING, ldo->name, ldo); if (ret != 0) { dev_err(&pdev->dev, "Failed to request UV IRQ %d: %d\n", irq, ret); @@ -536,8 +53...
+ 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); ...