linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings
Date: Fri, 27 Aug 2010 09:49:50 +0000	[thread overview]
Message-ID: <w3pk4ncidvm.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <w3p1v9weglx.wl%kuninori.morimoto.gx@renesas.com>

This patch modify x_plate_ohms to correct value for tsc2007,
and removed un-necessary ts_get_pendown_state().
gpio_pull_up() was removed also.

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

diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 23d472f..46e75a2 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -716,7 +716,6 @@ device_initcall(hdmi_init_pm_clock);
  * FIXME !!
  *
  * gpio_no_direction
- * gpio_pull_up
  * are quick_hack.
  *
  * current gpio frame work doesn't have
@@ -728,58 +727,12 @@ static void __init gpio_no_direction(u32 addr)
 	__raw_writeb(0x00, addr);
 }
 
-static void __init gpio_pull_up(u32 addr)
-{
-	u8 data = __raw_readb(addr);
-
-	data &= 0x0F;
-	data |= 0xC0;
-	__raw_writeb(data, addr);
-}
-
 /* TouchScreen */
 #define IRQ28	evt2irq(0x3380) /* IRQ28A */
 #define IRQ7	evt2irq(0x02e0) /* IRQ7A */
-static int ts_get_pendown_state(void)
-{
-	int val1, val2;
-
-	gpio_free(GPIO_FN_IRQ28_123);
-	gpio_free(GPIO_FN_IRQ7_40);
-
-	gpio_request(GPIO_PORT123, NULL);
-	gpio_request(GPIO_PORT40, NULL);
-
-	gpio_direction_input(GPIO_PORT123);
-	gpio_direction_input(GPIO_PORT40);
-
-	val1 = gpio_get_value(GPIO_PORT123);
-	val2 = gpio_get_value(GPIO_PORT40);
-
-	gpio_request(GPIO_FN_IRQ28_123, NULL);	/* for QHD */
-	gpio_request(GPIO_FN_IRQ7_40, NULL);	/* for WVGA */
-
-	return val1 ^ val2;
-}
-
-#define PORT40CR	0xE6051028
-#define PORT123CR	0xE605007B
-static int ts_init(void)
-{
-	gpio_request(GPIO_FN_IRQ28_123, NULL);	/* for QHD */
-	gpio_request(GPIO_FN_IRQ7_40, NULL);	/* for WVGA */
-
-	gpio_pull_up(PORT40CR);
-	gpio_pull_up(PORT123CR);
-
-	return 0;
-}
-
 static struct tsc2007_platform_data tsc2007_info = {
 	.model			= 2007,
-	.x_plate_ohms		= 180,
-	.get_pendown_state	= ts_get_pendown_state,
-	.init_platform_hw	= ts_init,
+	.x_plate_ohms		= 1000,
 };
 
 static struct i2c_board_info tsc_device = {
@@ -968,6 +921,7 @@ static void __init ap4evb_init(void)
 	gpio_request(GPIO_FN_KEYIN4,     NULL);
 
 	/* enable TouchScreen */
+	gpio_request(GPIO_FN_IRQ28_123, NULL);
 	set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW);
 
 	tsc_device.irq = IRQ28;
@@ -1043,6 +997,7 @@ static void __init ap4evb_init(void)
 	lcdc_info.ch[0].lcd_size_cfg.height	= 91;
 
 	/* enable TouchScreen */
+	gpio_request(GPIO_FN_IRQ7_40, NULL);
 	set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
 
 	tsc_device.irq = IRQ7;
-- 
1.7.0.4


  parent reply	other threads:[~2010-08-27  9:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18  3:37 [PATCH] ARM: mach-shmobile: ap4evb: modify FSI2 ID Kuninori Morimoto
2010-08-18  7:31 ` Paul Mundt
2010-08-27  9:49 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform settings Kuninori Morimoto
2010-08-27  9:49 ` Kuninori Morimoto [this message]
2010-08-31  9:59 ` Magnus Damm
2010-09-01  5:02 ` [PATCH] ARM: mach-shmobile: ap4evb: modify tsc2007 platform Kuninori Morimoto
2010-09-07  2:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify touchpanel judgment Kuninori Morimoto
2010-10-20  2:53 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC1 irq number Kuninori Morimoto
2010-10-25  1:42 ` Paul Mundt
2011-03-02  9:05 ` [PATCH] ARM: mach-shmobile: ap4evb: modify LCDC clock divider value Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=w3pk4ncidvm.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).