linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 6/6] ARM: mach-shmobile: kzm9g: add ST1232 Touchscreen support
@ 2012-04-11  3:58 Kuninori Morimoto
  2012-04-23  6:54 ` [PATCH 6/6] ARM: mach-shmobile: kzm9g: add PCF8757 gpio-key Kuninori Morimoto
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Kuninori Morimoto @ 2012-04-11  3:58 UTC (permalink / raw)
  To: linux-sh

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm/mach-shmobile/board-kzm9g.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index 145341d..c846531 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -21,6 +21,7 @@
 #include <linux/gpio.h>
 #include <linux/io.h>
 #include <linux/irq.h>
+#include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/smsc911x.h>
 #include <linux/usb/r8a66597.h>
@@ -146,6 +147,13 @@ static struct platform_device lcdc_device = {
 	},
 };
 
+static struct i2c_board_info i2c1_devices[] = {
+	{
+		I2C_BOARD_INFO("st1232-ts", 0x55),
+		.irq = intcs_evt2irq(0x300), /* IRQ8 */
+	},
+};
+
 static struct platform_device *kzm_devices[] __initdata = {
 	&smsc_device,
 	&usb_host_device,
@@ -253,11 +261,17 @@ static void __init kzm_init(void)
 	gpio_request(GPIO_PORT222,	NULL);
 	gpio_direction_output(GPIO_PORT222, 1);
 
+	/* Touchscreen */
+	gpio_request(GPIO_PORT223, NULL); /* IRQ8 */
+	gpio_direction_input(GPIO_PORT223);
+
 #ifdef CONFIG_CACHE_L2X0
 	/* Early BRESP enable, Shared attribute override enable, 64K*8way */
 	l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
 #endif
 
+	i2c_register_board_info(1, i2c1_devices, ARRAY_SIZE(i2c1_devices));
+
 	sh73a0_add_standard_devices();
 	platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
 }
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-25  7:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-11  3:58 [PATCH 6/6] ARM: mach-shmobile: kzm9g: add ST1232 Touchscreen support Kuninori Morimoto
2012-04-23  6:54 ` [PATCH 6/6] ARM: mach-shmobile: kzm9g: add PCF8757 gpio-key Kuninori Morimoto
2012-04-24 23:55 ` Simon Horman
2012-04-25  0:11 ` Kuninori Morimoto
2012-04-25  6:19 ` Simon Horman
2012-04-25  7:25 ` Kuninori Morimoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).