summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Wilson <evan@oliodevices.com>2014-12-01 11:59:54 -0800
committerEvan Wilson <evan@oliodevices.com>2014-12-01 11:59:54 -0800
commit96de5754e485d9eca805e1fb38baf62e0fc35ae1 (patch)
treeb8668f1b480056994a4962c915f8461df73d3285
parent1e8641dc351a79cb2f03f91674ae6033c14c0058 (diff)
downloadolio-linux-3.10-96de5754e485d9eca805e1fb38baf62e0fc35ae1.tar.xz
olio-linux-3.10-96de5754e485d9eca805e1fb38baf62e0fc35ae1.zip
omap3h1: Adding atmel maxtouch touch controller to the board file
Change-Id: I4b2d301723e143bbbbd76c8b1442e3f3afaea6c3
-rw-r--r--arch/arm/mach-omap2/board-omap3h1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c
index 04f598778aa..3cf58ab08e9 100644
--- a/arch/arm/mach-omap2/board-omap3h1.c
+++ b/arch/arm/mach-omap2/board-omap3h1.c
@@ -26,6 +26,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
+#include <linux/i2c/atmel_mxt_ts.h>
+#include <linux/gpio.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -55,6 +57,7 @@
#define NAND_CS 0
#define MPUIRQ_GPIO 31
#define LCD_RESET_GPIO 122
+#define ATMEL_MXT_GPIO 105
static struct mtd_partition omap3h1_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
@@ -161,6 +164,10 @@ static struct lm3530_platform_data omap3h1_backlight_platform_data = {
.brt_val = 0x40, /* Max brightness */
};
+static struct mxt_platform_data mxt_data = {
+ .irqflags = IRQF_TRIGGER_FALLING,
+};
+
static struct platform_device bcm20702_bluetooth_device = {
.name = "bcm20702_bluetooth",
.id = -1,
@@ -282,10 +289,17 @@ static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = {
I2C_BOARD_INFO("lm3530-led", 0x38),
.platform_data = &omap3h1_backlight_platform_data,
},
+ {
+ I2C_BOARD_INFO("mXT224", 0x4a),
+ .platform_data = &mxt_data,
+ },
};
static int __init omap3_h1_i2c_init(void)
{
+ gpio_request_one(ATMEL_MXT_GPIO, GPIOF_IN, "atmel_mxt_ts CHG");
+ omap3h1_i2c1_board_info[3].irq = gpio_to_irq(ATMEL_MXT_GPIO);
+
omap_register_i2c_bus(1, 400, omap3h1_i2c1_board_info, ARRAY_SIZE(omap3h1_i2c1_board_info));
return 0;
}
@@ -326,6 +340,9 @@ static struct omap_board_mux board_mux[] __initdata = {
OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
+ // TOUCH_RESET
+ OMAP3_MUX(CAM_D6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#endif