aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-palmz71.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-palmz71.c')
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index e719294250b1..cc05257eb1cd 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -239,7 +239,7 @@ static struct platform_device *devices[] __initdata = {
239static int 239static int
240palmz71_get_pendown_state(void) 240palmz71_get_pendown_state(void)
241{ 241{
242 return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO); 242 return !gpio_get_value(PALMZ71_PENIRQ_GPIO);
243} 243}
244 244
245static const struct ads7846_platform_data palmz71_ts_info = { 245static const struct ads7846_platform_data palmz71_ts_info = {
@@ -267,16 +267,6 @@ static struct omap_usb_config palmz71_usb_config __initdata = {
267 .pins[0] = 2, 267 .pins[0] = 2,
268}; 268};
269 269
270static struct omap_mmc_config palmz71_mmc_config __initdata = {
271 .mmc[0] = {
272 .enabled = 1,
273 .wire4 = 0,
274 .wp_pin = PALMZ71_MMC_WP_GPIO,
275 .power_pin = -1,
276 .switch_pin = PALMZ71_MMC_IN_GPIO,
277 },
278};
279
280static struct omap_lcd_config palmz71_lcd_config __initdata = { 270static struct omap_lcd_config palmz71_lcd_config __initdata = {
281 .ctrl_name = "internal", 271 .ctrl_name = "internal",
282}; 272};
@@ -287,7 +277,6 @@ static struct omap_uart_config palmz71_uart_config __initdata = {
287 277
288static struct omap_board_config_kernel palmz71_config[] __initdata = { 278static struct omap_board_config_kernel palmz71_config[] __initdata = {
289 {OMAP_TAG_USB, &palmz71_usb_config}, 279 {OMAP_TAG_USB, &palmz71_usb_config},
290 {OMAP_TAG_MMC, &palmz71_mmc_config},
291 {OMAP_TAG_LCD, &palmz71_lcd_config}, 280 {OMAP_TAG_LCD, &palmz71_lcd_config},
292 {OMAP_TAG_UART, &palmz71_uart_config}, 281 {OMAP_TAG_UART, &palmz71_uart_config},
293}; 282};
@@ -295,13 +284,13 @@ static struct omap_board_config_kernel palmz71_config[] __initdata = {
295static irqreturn_t 284static irqreturn_t
296palmz71_powercable(int irq, void *dev_id) 285palmz71_powercable(int irq, void *dev_id)
297{ 286{
298 if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) { 287 if (gpio_get_value(PALMZ71_USBDETECT_GPIO)) {
299 printk(KERN_INFO "PM: Power cable connected\n"); 288 printk(KERN_INFO "PM: Power cable connected\n");
300 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 289 set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
301 IRQ_TYPE_EDGE_FALLING); 290 IRQ_TYPE_EDGE_FALLING);
302 } else { 291 } else {
303 printk(KERN_INFO "PM: Power cable disconnected\n"); 292 printk(KERN_INFO "PM: Power cable disconnected\n");
304 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 293 set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
305 IRQ_TYPE_EDGE_RISING); 294 IRQ_TYPE_EDGE_RISING);
306 } 295 }
307 return IRQ_HANDLED; 296 return IRQ_HANDLED;
@@ -323,29 +312,28 @@ palmz71_gpio_setup(int early)
323{ 312{
324 if (early) { 313 if (early) {
325 /* Only set GPIO1 so we have a working serial */ 314 /* Only set GPIO1 so we have a working serial */
326 omap_set_gpio_dataout(1, 1); 315 gpio_direction_output(1, 1);
327 omap_set_gpio_direction(1, 0);
328 } else { 316 } else {
329 /* Set MMC/SD host WP pin as input */ 317 /* Set MMC/SD host WP pin as input */
330 if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) { 318 if (gpio_request(PALMZ71_MMC_WP_GPIO, "MMC WP") < 0) {
331 printk(KERN_ERR "Could not reserve WP GPIO!\n"); 319 printk(KERN_ERR "Could not reserve WP GPIO!\n");
332 return; 320 return;
333 } 321 }
334 omap_set_gpio_direction(PALMZ71_MMC_WP_GPIO, 1); 322 gpio_direction_input(PALMZ71_MMC_WP_GPIO);
335 323
336 /* Monitor the Power-cable-connected signal */ 324 /* Monitor the Power-cable-connected signal */
337 if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) { 325 if (gpio_request(PALMZ71_USBDETECT_GPIO, "USB detect") < 0) {
338 printk(KERN_ERR 326 printk(KERN_ERR
339 "Could not reserve cable signal GPIO!\n"); 327 "Could not reserve cable signal GPIO!\n");
340 return; 328 return;
341 } 329 }
342 omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1); 330 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
343 if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 331 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
344 palmz71_powercable, IRQF_SAMPLE_RANDOM, 332 palmz71_powercable, IRQF_SAMPLE_RANDOM,
345 "palmz71-cable", 0)) 333 "palmz71-cable", 0))
346 printk(KERN_ERR 334 printk(KERN_ERR
347 "IRQ request for power cable failed!\n"); 335 "IRQ request for power cable failed!\n");
348 palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0); 336 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0);
349 } 337 }
350} 338}
351 339