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

« back to all changes in this revision

Viewing changes to arch/arm/mach-pxa/palmte2.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:
136
136
/******************************************************************************
137
137
 * Backlight
138
138
 ******************************************************************************/
 
139
static struct gpio palmte_bl_gpios[] = {
 
140
        { GPIO_NR_PALMTE2_BL_POWER, GPIOF_INIT_LOW, "Backlight power" },
 
141
        { GPIO_NR_PALMTE2_LCD_POWER, GPIOF_INIT_LOW, "LCD power" },
 
142
};
 
143
 
139
144
static int palmte2_backlight_init(struct device *dev)
140
145
{
141
 
        int ret;
142
 
 
143
 
        ret = gpio_request(GPIO_NR_PALMTE2_BL_POWER, "BL POWER");
144
 
        if (ret)
145
 
                goto err;
146
 
        ret = gpio_direction_output(GPIO_NR_PALMTE2_BL_POWER, 0);
147
 
        if (ret)
148
 
                goto err2;
149
 
        ret = gpio_request(GPIO_NR_PALMTE2_LCD_POWER, "LCD POWER");
150
 
        if (ret)
151
 
                goto err2;
152
 
        ret = gpio_direction_output(GPIO_NR_PALMTE2_LCD_POWER, 0);
153
 
        if (ret)
154
 
                goto err3;
155
 
 
156
 
        return 0;
157
 
err3:
158
 
        gpio_free(GPIO_NR_PALMTE2_LCD_POWER);
159
 
err2:
160
 
        gpio_free(GPIO_NR_PALMTE2_BL_POWER);
161
 
err:
162
 
        return ret;
 
146
        return gpio_request_array(ARRAY_AND_SIZE(palmte_bl_gpios));
163
147
}
164
148
 
165
149
static int palmte2_backlight_notify(struct device *dev, int brightness)
171
155
 
172
156
static void palmte2_backlight_exit(struct device *dev)
173
157
{
174
 
        gpio_free(GPIO_NR_PALMTE2_BL_POWER);
175
 
        gpio_free(GPIO_NR_PALMTE2_LCD_POWER);
 
158
        gpio_free_array(ARRAY_AND_SIZE(palmte_bl_gpios));
176
159
}
177
160
 
178
161
static struct platform_pwm_backlight_data palmte2_backlight_data = {
363
346
        pxa_set_btuart_info(NULL);
364
347
        pxa_set_stuart_info(NULL);
365
348
 
366
 
        set_pxa_fb_info(&palmte2_lcd_screen);
 
349
        pxa_set_fb_info(NULL, &palmte2_lcd_screen);
367
350
        pxa_set_mci_info(&palmte2_mci_platform_data);
368
351
        palmte2_udc_init();
369
352
        pxa_set_ac97_info(&palmte2_ac97_pdata);