Re: [PATCH 2/2] Input: add wm97xx accelerated driver for AVR32 AT32AP700X microprocessors

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

 



--- /dev/null
+++ b/drivers/input/touchscreen/at32-wm97xx.c
+static void at32_wm97xx_pen_timer(unsigned long data)

Wouldn't be delayed_work more appropriate (and convenient) here?

+{
+	struct at32_wm97xx *at32_wm97xx = (struct at32_wm97xx *)data;
+	struct wm97xx *wm = at32_wm97xx->wm;
+	int pen_down = gpio_get_value(at32_wm97xx->gpio_pen);
+
+	if (pen_down != 0) {
+		mod_timer(&at32_wm97xx->pen_timer, jiffies
+				+ msecs_to_jiffies(1));
+	} else {
+		input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
+		input_sync(wm->input_dev);
+	}
+}

+static int __init at32_wm97xx_probe(struct platform_device *pdev)
+{
[...]
+	at32_wm97xx->regs	= (void *)AT32_WM97XX_AC97C_IOMEM;

(void __iomem *)?
Did you feed it through sparse?

+	ret = request_irq(at32_wm97xx->ac97c_irq,
+			at32_wm97xx_channel_b_interrupt,
+			IRQF_SHARED, "at32-wm97xx-ch-b", at32_wm97xx);
[...]
+	return wm97xx_register_mach_ops(wm,&at32_mach_ops);

In case it fails, irq remains set up.

+#ifdef CONFIG_PM
+static int at32_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
+{
+	struct at32_wm97xx *at32_wm97xx = platform_get_drvdata(pdev);
+
+	ac97c_writel(at32_wm97xx, IDR, AC97C_INT_CBEVT);
+	disable_irq(at32_wm97xx->gpio_irq);

Here, you should call disable_irq_sync() (that's what I meant by _sync in the last post).
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux