Re: [PATCH v6 05/14] drm/exynos: dsi: add TE interrupt handler to support LCD I80 interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Varka,

This irq handler should be registered in attach() and unregistered in detach().

The devm_* APIs are released(freed) in remove(), right?

Logically the panel could be attached and detached several times after dsi is probed and not removed.
So I don't use devm_* APIs.

Thank you.
Best regards YJ

On 07/22/2014 07:57 PM, Varka Bhadram wrote:
On 07/22/2014 04:19 PM, YoungJun Cho wrote:

(...)

+    ret = gpio_request_one(dsi->te_gpio, GPIOF_IN, "te_gpio");

devm_* APIs..?

+    if (ret) {
+        dev_err(dsi->dev, "gpio request failed with %d\n", ret);
+        goto out;
+    }
+
+    /*
+     * This TE GPIO IRQ should not be set to IRQ_NOAUTOEN, because panel
+     * calls drm_panel_init() first then calls mipi_dsi_attach() in
probe().
+     * It means that te_gpio is invalid when exynos_dsi_enable_irq() is
+     * called by drm_panel_init() before panel is attached.
+     */
+    ret = request_threaded_irq(gpio_to_irq(dsi->te_gpio),
+                    exynos_dsi_te_irq_handler, NULL,
+                    IRQF_TRIGGER_RISING, "TE", dsi);

why don't we use devm_request_threaded_irq()..?



--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux