Commit 24109afd authored by Arnd Bergmann's avatar Arnd Bergmann
parents 659fb32d 512b7938
...@@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = { ...@@ -573,10 +573,10 @@ static struct pxafb_mode_info sharp_lq043t3dx02_mode = {
.xres = 480, .xres = 480,
.yres = 272, .yres = 272,
.bpp = 16, .bpp = 16,
.hsync_len = 4, .hsync_len = 41,
.left_margin = 2, .left_margin = 2,
.right_margin = 1, .right_margin = 1,
.vsync_len = 1, .vsync_len = 10,
.upper_margin = 3, .upper_margin = 3,
.lower_margin = 1, .lower_margin = 1,
.sync = 0, .sync = 0,
...@@ -596,29 +596,31 @@ static void __init raumfeld_lcd_init(void) ...@@ -596,29 +596,31 @@ static void __init raumfeld_lcd_init(void)
{ {
int ret; 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"); ret = gpio_request(GPIO_TFT_VA_EN, "display VA enable");
if (ret < 0) if (ret < 0)
pr_warning("Unable to request GPIO_TFT_VA_EN\n"); pr_warning("Unable to request GPIO_TFT_VA_EN\n");
else else
gpio_direction_output(GPIO_TFT_VA_EN, 1); gpio_direction_output(GPIO_TFT_VA_EN, 1);
msleep(100);
ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable"); ret = gpio_request(GPIO_DISPLAY_ENABLE, "display enable");
if (ret < 0) if (ret < 0)
pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n"); pr_warning("Unable to request GPIO_DISPLAY_ENABLE\n");
else else
gpio_direction_output(GPIO_DISPLAY_ENABLE, 1); 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); platform_device_register(&pxa3xx_device_gcu);
} }
...@@ -657,10 +659,10 @@ static struct lis3lv02d_platform_data lis3_pdata = { ...@@ -657,10 +659,10 @@ static struct lis3lv02d_platform_data lis3_pdata = {
#define SPI_AK4104 \ #define SPI_AK4104 \
{ \ { \
.modalias = "ak4104", \ .modalias = "ak4104-codec", \
.max_speed_hz = 10000, \ .max_speed_hz = 10000, \
.bus_num = 0, \ .bus_num = 0, \
.chip_select = 0, \ .chip_select = 0, \
.controller_data = (void *) GPIO_SPDIF_CS, \ .controller_data = (void *) GPIO_SPDIF_CS, \
} }
......
...@@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) ...@@ -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; 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)]; return &pxa_gpio_chips[gpio_to_bank(gpio)];
} }
...@@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) ...@@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type)
int gpio = irq_to_gpio(d->irq); int gpio = irq_to_gpio(d->irq);
unsigned long gpdr, mask = GPIO_bit(gpio); unsigned long gpdr, mask = GPIO_bit(gpio);
c = gpio_to_chip(gpio); c = gpio_to_pxachip(gpio);
if (type == IRQ_TYPE_PROBE) { if (type == IRQ_TYPE_PROBE) {
/* Don't mess with enabled GPIOs using preconfigured edges or /* 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,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
static void pxa_ack_muxed_gpio(struct irq_data *d) static void pxa_ack_muxed_gpio(struct irq_data *d)
{ {
int gpio = irq_to_gpio(d->irq); 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); __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET);
} }
...@@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) ...@@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d)
static void pxa_mask_muxed_gpio(struct irq_data *d) static void pxa_mask_muxed_gpio(struct irq_data *d)
{ {
int gpio = irq_to_gpio(d->irq); 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; uint32_t grer, gfer;
c->irq_mask &= ~GPIO_bit(gpio); c->irq_mask &= ~GPIO_bit(gpio);
...@@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) ...@@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d)
static void pxa_unmask_muxed_gpio(struct irq_data *d) static void pxa_unmask_muxed_gpio(struct irq_data *d)
{ {
int gpio = irq_to_gpio(d->irq); 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); c->irq_mask |= GPIO_bit(gpio);
update_edge_detect(c); update_edge_detect(c);
......
...@@ -76,10 +76,10 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt) ...@@ -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) static void vpac270_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
{ {
if (skt->nr == 0) if (skt->nr == 0)
gpio_request_array(vpac270_pcmcia_gpios, gpio_free_array(vpac270_pcmcia_gpios,
ARRAY_SIZE(vpac270_pcmcia_gpios)); ARRAY_SIZE(vpac270_pcmcia_gpios));
else else
gpio_request_array(vpac270_cf_gpios, gpio_free_array(vpac270_cf_gpios,
ARRAY_SIZE(vpac270_cf_gpios)); ARRAY_SIZE(vpac270_cf_gpios));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment