#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
+#include <linux/gpio.h>
#include <linux/spi/spi.h>
-#ifdef CONFIG_ARCH_OMAP
-#include <mach/gpio.h>
-#endif
-
#include <linux/spi/tsc2005.h>
/**
ts->dav_gpio = dav_gpio;
dev_dbg(&ts->spi->dev, "TSC2005: DAV GPIO = %d\n", dav_gpio);
-#ifdef CONFIG_ARCH_OMAP
- r = omap_request_gpio(dav_gpio);
+ r = gpio_request(dav_gpio, "TSC2005 dav");
if (r < 0) {
dev_err(&ts->spi->dev, "unable to get DAV GPIO");
goto err1;
gpio_direction_input(dav_gpio);
ts->irq = gpio_to_irq(dav_gpio);
dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq);
-#endif
+
init_timer(&ts->penup_timer);
setup_timer(&ts->penup_timer, tsc2005_ts_penup_timer_handler,
(unsigned long)ts);
tsc2005_stop_scan(ts);
input_free_device(idev);
err2:
-#ifdef CONFIG_ARCH_OMAP
- omap_free_gpio(dav_gpio);
-#endif
+ gpio_free(dav_gpio);
err1:
return r;
}
free_irq(ts->irq, ts);
input_unregister_device(ts->idev);
-#ifdef CONFIG_ARCH_OMAP
- omap_free_gpio(ts->dav_gpio);
-#endif
+ gpio_free(ts->dav_gpio);
kfree(ts);
return 0;