~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/board-n8x0.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        static char     announce[] __initdata = KERN_INFO "TUSB 6010\n";
107
107
 
108
108
        /* PM companion chip power control pin */
109
 
        ret = gpio_request(TUSB6010_GPIO_ENABLE, "TUSB6010 enable");
 
109
        ret = gpio_request_one(TUSB6010_GPIO_ENABLE, GPIOF_OUT_INIT_LOW,
 
110
                               "TUSB6010 enable");
110
111
        if (ret != 0) {
111
112
                printk(KERN_ERR "Could not get TUSB power GPIO%i\n",
112
113
                       TUSB6010_GPIO_ENABLE);
113
114
                return;
114
115
        }
115
 
        gpio_direction_output(TUSB6010_GPIO_ENABLE, 0);
116
 
 
117
116
        tusb_set_power(0);
118
117
 
119
118
        ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2,
494
493
 
495
494
static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC];
496
495
 
 
496
static struct gpio n810_emmc_gpios[] __initdata = {
 
497
        { N810_EMMC_VSD_GPIO, GPIOF_OUT_INIT_LOW,  "MMC slot 2 Vddf" },
 
498
        { N810_EMMC_VIO_GPIO, GPIOF_OUT_INIT_LOW,  "MMC slot 2 Vdd"  },
 
499
};
 
500
 
497
501
static void __init n8x0_mmc_init(void)
498
 
 
499
502
{
500
503
        int err;
501
504
 
512
515
                mmc1_data.slots[1].ban_openended = 1;
513
516
        }
514
517
 
515
 
        err = gpio_request(N8X0_SLOT_SWITCH_GPIO, "MMC slot switch");
 
518
        err = gpio_request_one(N8X0_SLOT_SWITCH_GPIO, GPIOF_OUT_INIT_LOW,
 
519
                               "MMC slot switch");
516
520
        if (err)
517
521
                return;
518
522
 
519
 
        gpio_direction_output(N8X0_SLOT_SWITCH_GPIO, 0);
520
 
 
521
523
        if (machine_is_nokia_n810()) {
522
 
                err = gpio_request(N810_EMMC_VSD_GPIO, "MMC slot 2 Vddf");
523
 
                if (err) {
524
 
                        gpio_free(N8X0_SLOT_SWITCH_GPIO);
525
 
                        return;
526
 
                }
527
 
                gpio_direction_output(N810_EMMC_VSD_GPIO, 0);
528
 
 
529
 
                err = gpio_request(N810_EMMC_VIO_GPIO, "MMC slot 2 Vdd");
530
 
                if (err) {
531
 
                        gpio_free(N8X0_SLOT_SWITCH_GPIO);
532
 
                        gpio_free(N810_EMMC_VSD_GPIO);
533
 
                        return;
534
 
                }
535
 
                gpio_direction_output(N810_EMMC_VIO_GPIO, 0);
 
524
                err = gpio_request_array(n810_emmc_gpios,
 
525
                                         ARRAY_SIZE(n810_emmc_gpios));
 
526
                if (err) {
 
527
                        gpio_free(N8X0_SLOT_SWITCH_GPIO);
 
528
                        return;
 
529
                }
536
530
        }
537
531
 
538
532
        mmc_data[0] = &mmc1_data;