Skip to content

Commit

Permalink
Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/y…
Browse files Browse the repository at this point in the history
…cmiao/pxa-linux-2.6 into fixes
  • Loading branch information
arndb committed Jul 11, 2011
2 parents 659fb32 + 512b793 commit 24109af
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
36 changes: 19 additions & 17 deletions arch/arm/mach-pxa/raumfeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = {
.xres = 480,
.yres = 272,
.bpp = 16,
.hsync_len = 4,
.hsync_len = 41,
.left_margin = 2,
.right_margin = 1,
.vsync_len = 1,
.vsync_len = 10,
.upper_margin = 3,
.lower_margin = 1,
.sync = 0,
Expand All @@ -596,29 +596,31 @@ static void __init raumfeld_lcd_init(void)
{
int ret;

pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);

/* Earlier devices had the backlight regulator controlled
* via PWM, later versions use another controller for that */
if ((system_rev & 0xff) < 2) {
mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
platform_device_register(&raumfeld_pwm_backlight_device);
} else
platform_device_register(&raumfeld_lt3593_device);

ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable");
if (ret < 0)
pr_warning("Unable to request GPIO_TFT_VA_EN\n");
else
gpio_direction_output(GPIO_TFT_VA_EN, 1);

msleep(100);

ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable");
if (ret < 0)
pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n");
else
gpio_direction_output(GPIO_DISPLAY_ENABLE, 1);

/* Hardware revision 2 has the backlight regulator controlled
* by an LT3593, earlier and later devices use PWM for that. */
if ((system_rev & 0xff) == 2) {
platform_device_register(&raumfeld_lt3593_device);
} else {
mfp_cfg_t raumfeld_pwm_pin_config = GPIO17_PWM0_OUT;
pxa3xx_mfp_config(&raumfeld_pwm_pin_config, 1);
platform_device_register(&raumfeld_pwm_backlight_device);
}

pxa_set_fb_info(NULL, &raumfeld_sharp_lcd_info);
platform_device_register(&pxa3xx_device_gcu);
}

Expand Down Expand Up @@ -657,10 +659,10 @@ static struct lis3lv02d_platform_data lis3_pdata = {

#define SPI_AK4104 \
{ \
.modalias = "ak4104", \
.max_speed_hz = 10000, \
.bus_num = 0, \
.chip_select = 0, \
.modalias = "ak4104-codec", \
.max_speed_hz = 10000, \
.bus_num = 0, \
.chip_select = 0, \
.controller_data = (void *) GPIO_SPDIF_CS, \
}

Expand Down
10 changes: 5 additions & 5 deletions arch/arm/plat-pxa/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c)
return container_of(c, struct pxa_gpio_chip, chip)->regbase;
}

static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio)
static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio)
{
return &pxa_gpio_chips[gpio_to_bank(gpio)];
}
Expand Down Expand Up @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type)
int gpio = irq_to_gpio(d->irq);
unsigned long gpdr, mask = GPIO_bit(gpio);

c = gpio_to_chip(gpio);
c = gpio_to_pxachip(gpio);

if (type == IRQ_TYPE_PROBE) {
/* Don't mess with enabled GPIOs using preconfigured edges or
Expand Down Expand Up @@ -230,15 +230,15 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
static void pxa_ack_muxed_gpio(struct irq_data *d)
{
int gpio = irq_to_gpio(d->irq);
struct pxa_gpio_chip *c = gpio_to_chip(gpio);
struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);

__raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET);
}

static void pxa_mask_muxed_gpio(struct irq_data *d)
{
int gpio = irq_to_gpio(d->irq);
struct pxa_gpio_chip *c = gpio_to_chip(gpio);
struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);
uint32_t grer, gfer;

c->irq_mask &= ~GPIO_bit(gpio);
Expand All @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d)
static void pxa_unmask_muxed_gpio(struct irq_data *d)
{
int gpio = irq_to_gpio(d->irq);
struct pxa_gpio_chip *c = gpio_to_chip(gpio);
struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);

c->irq_mask |= GPIO_bit(gpio);
update_edge_detect(c);
Expand Down
4 changes: 2 additions & 2 deletions drivers/pcmcia/pxa2xx_vpac270.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
{
if (skt->nr == 0)
gpio_request_array(vpac270_pcmcia_gpios,
gpio_free_array(vpac270_pcmcia_gpios,
ARRAY_SIZE(vpac270_pcmcia_gpios));
else
gpio_request_array(vpac270_cf_gpios,
gpio_free_array(vpac270_cf_gpios,
ARRAY_SIZE(vpac270_cf_gpios));
}

Expand Down

0 comments on commit 24109af

Please sign in to comment.