aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-11-20 03:26:17 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-11-21 16:09:27 -0500
commit506ee557b75d4e77f4876ca4189cb855397d617b (patch)
tree566aa37636a8ca40110fb3fb8ed089fe3170c00c /arch/arm/mach-omap1
parent4a83eecff65bd327bf5cb3b400b96fa975c73308 (diff)
OMAP: nokia770: remove custom implementation of ads7846_get_pendown_state
The default implementation matches exactly our custom one so we can switch to using the default one. As a bonus the driver will take care of setting GPIO line for us. Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 7d5c06d6a52a..be6490b5eb23 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -112,17 +112,6 @@ static void __init mipid_dev_init(void)
112 omapfb_set_lcd_config(&nokia770_lcd_config); 112 omapfb_set_lcd_config(&nokia770_lcd_config);
113} 113}
114 114
115static void __init ads7846_dev_init(void)
116{
117 if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0)
118 printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
119}
120
121static int ads7846_get_pendown_state(void)
122{
123 return !gpio_get_value(ADS7846_PENDOWN_GPIO);
124}
125
126static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { 115static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
127 .x_max = 0x0fff, 116 .x_max = 0x0fff,
128 .y_max = 0x0fff, 117 .y_max = 0x0fff,
@@ -131,7 +120,7 @@ static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata =
131 .debounce_max = 10, 120 .debounce_max = 10,
132 .debounce_tol = 3, 121 .debounce_tol = 3,
133 .debounce_rep = 1, 122 .debounce_rep = 1,
134 .get_pendown_state = ads7846_get_pendown_state, 123 .gpio_pendown = ADS7846_PENDOWN_GPIO,
135}; 124};
136 125
137static struct spi_board_info nokia770_spi_board_info[] __initdata = { 126static struct spi_board_info nokia770_spi_board_info[] __initdata = {
@@ -241,7 +230,6 @@ static void __init omap_nokia770_init(void)
241 omap_serial_init(); 230 omap_serial_init();
242 omap_register_i2c_bus(1, 100, NULL, 0); 231 omap_register_i2c_bus(1, 100, NULL, 0);
243 hwa742_dev_init(); 232 hwa742_dev_init();
244 ads7846_dev_init();
245 mipid_dev_init(); 233 mipid_dev_init();
246 omap1_usb_init(&nokia770_usb_config); 234 omap1_usb_init(&nokia770_usb_config);
247 nokia770_mmc_init(); 235 nokia770_mmc_init();