diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2011-07-11 17:26:16 -0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2011-07-11 17:26:16 -0400 |
| commit | 24109afd17426e1a2b72141e4a2b730057e1a0ea (patch) | |
| tree | 590f708decdc1144dd50d4723c5d106d4e248452 | |
| parent | 659fb32d1b67476f4ade25e9ea0e2642a5b9c4b5 (diff) | |
| parent | 512b7938fefd03d512463aa597a1216cf088dfe3 (diff) | |
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes
| -rw-r--r-- | arch/arm/mach-pxa/raumfeld.c | 36 | ||||
| -rw-r--r-- | arch/arm/plat-pxa/gpio.c | 10 | ||||
| -rw-r--r-- | drivers/pcmcia/pxa2xx_vpac270.c | 4 |
3 files changed, 26 insertions, 24 deletions
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index d130f77b6d11..2f37d43f51b6 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
| @@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = { | |||
| 573 | .xres = 480, | 573 | .xres = 480, |
| 574 | .yres = 272, | 574 | .yres = 272, |
| 575 | .bpp = 16, | 575 | .bpp = 16, |
| 576 | .hsync_len = 4, | 576 | .hsync_len = 41, |
| 577 | .left_margin = 2, | 577 | .left_margin = 2, |
| 578 | .right_margin = 1, | 578 | .right_margin = 1, |
| 579 | .vsync_len = 1, | 579 | .vsync_len = 10, |
| 580 | .upper_margin = 3, | 580 | .upper_margin = 3, |
| 581 | .lower_margin = 1, | 581 | .lower_margin = 1, |
| 582 | .sync = 0, | 582 | .sync = 0, |
| @@ -596,29 +596,31 @@ static void __init raumfeld_lcd_init(void) | |||
| 596 | { | 596 | { |
| 597 | int ret; | 597 | int ret; |
| 598 | 598 | ||
| 599 | pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); | ||
| 600 | |||
| 601 | /* Earlier devices had the backlight regulator controlled | ||
| 602 | * via PWM, later versions use another controller for that */ | ||
| 603 | if ((system_rev & 0xff) < 2) { | ||
| 604 | mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT; | ||
| 605 | pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1); | ||
| 606 | platform_device_register(&raumfeld_pwm_backlight_device); | ||
| 607 | } else | ||
| 608 | platform_device_register(&raumfeld_lt3593_device); | ||
| 609 | |||
| 610 | ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); | 599 | ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable"); |
| 611 | if (ret < 0) | 600 | if (ret < 0) |
| 612 | pr_warning("Unable to request GPIO_TFT_VA_EN\n"); | 601 | pr_warning("Unable to request GPIO_TFT_VA_EN\n"); |
| 613 | else | 602 | else |
| 614 | gpio_direction_output(GPIO_TFT_VA_EN, 1); | 603 | gpio_direction_output(GPIO_TFT_VA_EN, 1); |
| 615 | 604 | ||
| 605 | msleep(100); | ||
| 606 | |||
| 616 | ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); | 607 | ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); |
| 617 | if (ret < 0) | 608 | if (ret < 0) |
| 618 | pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n"); | 609 | pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n"); |
| 619 | else | 610 | else |
| 620 | gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); | 611 | gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); |
| 621 | 612 | ||
| 613 | /* Hardware revision 2 has the backlight regulator controlled | ||
| 614 | * by an LT3593, earlier and later devices use PWM for that. */ | ||
| 615 | if ((system_rev & 0xff) == 2) { | ||
| 616 | platform_device_register(&raumfeld_lt3593_device); | ||
| 617 | } else { | ||
| 618 | mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT; | ||
| 619 | pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1); | ||
| 620 | platform_device_register(&raumfeld_pwm_backlight_device); | ||
| 621 | } | ||
| 622 | |||
| 623 | pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info); | ||
| 622 | platform_device_register(&pxa3xx_device_gcu); | 624 | platform_device_register(&pxa3xx_device_gcu); |
| 623 | } | 625 | } |
| 624 | 626 | ||
| @@ -657,10 +659,10 @@ static struct lis3lv02d_platform_data lis3_pdata = { | |||
| 657 | 659 | ||
| 658 | #define SPI_AK4104 \ | 660 | #define SPI_AK4104 \ |
| 659 | { \ | 661 | { \ |
| 660 | .modalias = "ak4104", \ | 662 | .modalias = "ak4104-codec", \ |
| 661 | .max_speed_hz = 10000, \ | 663 | .max_speed_hz = 10000, \ |
| 662 | .bus_num = 0, \ | 664 | .bus_num = 0, \ |
| 663 | .chip_select = 0, \ | 665 | .chip_select = 0, \ |
| 664 | .controller_data = (void *) GPIO_SPDIF_CS, \ | 666 | .controller_data = (void *) GPIO_SPDIF_CS, \ |
| 665 | } | 667 | } |
| 666 | 668 | ||
diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c index 48ebb9479b61..a11dc3670505 100644 --- a/arch/arm/plat-pxa/gpio.c +++ b/arch/arm/plat-pxa/gpio.c | |||
| @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) | |||
| 50 | return container_of(c, struct pxa_gpio_chip, chip)->regbase; | 50 | return container_of(c, struct pxa_gpio_chip, chip)->regbase; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) | 53 | static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) |
| 54 | { | 54 | { |
| 55 | return &pxa_gpio_chips[gpio_to_bank(gpio)]; | 55 | return &pxa_gpio_chips[gpio_to_bank(gpio)]; |
| 56 | } | 56 | } |
| @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) | |||
| 161 | int gpio = irq_to_gpio(d->irq); | 161 | int gpio = irq_to_gpio(d->irq); |
| 162 | unsigned long gpdr, mask = GPIO_bit(gpio); | 162 | unsigned long gpdr, mask = GPIO_bit(gpio); |
| 163 | 163 | ||
| 164 | c = gpio_to_chip(gpio); | 164 | c = gpio_to_pxachip(gpio); |
| 165 | 165 | ||
| 166 | if (type == IRQ_TYPE_PROBE) { | 166 | if (type == IRQ_TYPE_PROBE) { |
| 167 | /* Don't mess with enabled GPIOs using preconfigured edges or | 167 | /* Don't mess with enabled GPIOs using preconfigured edges or |
| @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) | |||
| 230 | static void pxa_ack_muxed_gpio(struct irq_data *d) | 230 | static void pxa_ack_muxed_gpio(struct irq_data *d) |
| 231 | { | 231 | { |
| 232 | int gpio = irq_to_gpio(d->irq); | 232 | int gpio = irq_to_gpio(d->irq); |
| 233 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 233 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
| 234 | 234 | ||
| 235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); | 235 | __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); |
| 236 | } | 236 | } |
| @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) | |||
| 238 | static void pxa_mask_muxed_gpio(struct irq_data *d) | 238 | static void pxa_mask_muxed_gpio(struct irq_data *d) |
| 239 | { | 239 | { |
| 240 | int gpio = irq_to_gpio(d->irq); | 240 | int gpio = irq_to_gpio(d->irq); |
| 241 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 241 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
| 242 | uint32_t grer, gfer; | 242 | uint32_t grer, gfer; |
| 243 | 243 | ||
| 244 | c->irq_mask &= ~GPIO_bit(gpio); | 244 | c->irq_mask &= ~GPIO_bit(gpio); |
| @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) | |||
| 252 | static void pxa_unmask_muxed_gpio(struct irq_data *d) | 252 | static void pxa_unmask_muxed_gpio(struct irq_data *d) |
| 253 | { | 253 | { |
| 254 | int gpio = irq_to_gpio(d->irq); | 254 | int gpio = irq_to_gpio(d->irq); |
| 255 | struct pxa_gpio_chip *c = gpio_to_chip(gpio); | 255 | struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); |
| 256 | 256 | ||
| 257 | c->irq_mask |= GPIO_bit(gpio); | 257 | c->irq_mask |= GPIO_bit(gpio); |
| 258 | update_edge_detect(c); | 258 | update_edge_detect(c); |
diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/drivers/pcmcia/pxa2xx_vpac270.c index 712baab3c83d..e956f659089a 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/drivers/pcmcia/pxa2xx_vpac270.c | |||
| @@ -76,10 +76,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
| 76 | static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 76 | static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) |
| 77 | { | 77 | { |
| 78 | if (skt->nr == 0) | 78 | if (skt->nr == 0) |
| 79 | gpio_request_array(vpac270_pcmcia_gpios, | 79 | gpio_free_array(vpac270_pcmcia_gpios, |
| 80 | ARRAY_SIZE(vpac270_pcmcia_gpios)); | 80 | ARRAY_SIZE(vpac270_pcmcia_gpios)); |
| 81 | else | 81 | else |
| 82 | gpio_request_array(vpac270_cf_gpios, | 82 | gpio_free_array(vpac270_cf_gpios, |
| 83 | ARRAY_SIZE(vpac270_cf_gpios)); | 83 | ARRAY_SIZE(vpac270_cf_gpios)); |
| 84 | } | 84 | } |
| 85 | 85 | ||
