aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-cpuimx35.c
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2010-10-02 11:15:26 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-04 02:26:38 -0400
commit54dc3f4674fbaf362d6e969904bfcece3cfebef1 (patch)
tree0d9c59e6fc647d4ac6c20c2b1e17e4e5b570f2aa /arch/arm/mach-mx3/mach-cpuimx35.c
parentbd9e310dca15c9987256f67af19f9f42426e7493 (diff)
mach-cpuimx35: remove unecessary tsc2007 functions + style cleanup
- remove functions which are no more necessary for tsc2007 - indent platform_data for better readability Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mach-cpuimx35.c')
-rw-r--r--arch/arm/mach-mx3/mach-cpuimx35.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 2a4f8b781ba4..ea0a85f1c9aa 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -31,6 +31,7 @@
31#include <linux/usb/otg.h> 31#include <linux/usb/otg.h>
32#include <linux/usb/ulpi.h> 32#include <linux/usb/ulpi.h>
33#include <linux/fsl_devices.h> 33#include <linux/fsl_devices.h>
34#include <linux/i2c-gpio.h>
34 35
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
@@ -53,39 +54,16 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
53}; 54};
54 55
55static const struct imxi2c_platform_data 56static const struct imxi2c_platform_data
56eukrea_cpuimx35_i2c0_data __initconst = { 57 eukrea_cpuimx35_i2c0_data __initconst = {
57 .bitrate = 50000, 58 .bitrate = 100000,
58}; 59};
59 60
60#define TSC2007_IRQGPIO (2 * 32 + 2)
61static int ts_get_pendown_state(void)
62{
63 int val = 0;
64 gpio_free(TSC2007_IRQGPIO);
65 gpio_request(TSC2007_IRQGPIO, NULL);
66 gpio_direction_input(TSC2007_IRQGPIO);
67
68 val = gpio_get_value(TSC2007_IRQGPIO);
69
70 gpio_free(TSC2007_IRQGPIO);
71 gpio_request(TSC2007_IRQGPIO, NULL);
72
73 return val ? 0 : 1;
74}
75
76static int ts_init(void)
77{
78 gpio_request(TSC2007_IRQGPIO, NULL);
79 return 0;
80}
81
82static struct tsc2007_platform_data tsc2007_info = { 61static struct tsc2007_platform_data tsc2007_info = {
83 .model = 2007, 62 .model = 2007,
84 .x_plate_ohms = 180, 63 .x_plate_ohms = 180,
85 .get_pendown_state = ts_get_pendown_state,
86 .init_platform_hw = ts_init,
87}; 64};
88 65
66#define TSC2007_IRQGPIO (2 * 32 + 2)
89static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = { 67static struct i2c_board_info eukrea_cpuimx35_i2c_devices[] = {
90 { 68 {
91 I2C_BOARD_INFO("pcf8563", 0x51), 69 I2C_BOARD_INFO("pcf8563", 0x51),
@@ -135,7 +113,7 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
135}; 113};
136 114
137static const struct mxc_nand_platform_data 115static const struct mxc_nand_platform_data
138eukrea_cpuimx35_nand_board_info __initconst = { 116 eukrea_cpuimx35_nand_board_info __initconst = {
139 .width = 1, 117 .width = 1,
140 .hw_ecc = 1, 118 .hw_ecc = 1,
141 .flash_bbt = 1, 119 .flash_bbt = 1,