aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2013-03-28 14:05:47 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-09-27 02:26:20 -0400
commitce3b64f5f1ba9126c7f97115c15abe9c322d24e1 (patch)
treeaf88f88cb46c7ceb388a1b7bc7320e7602e24ce1
parent42110e91de7f66f6276afdec8040aedbb8c5a6fd (diff)
video: atmel_lcdfb: pass the pdata as params
so we can use have list gpio as example (probe via DT) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c4
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c2
-rw-r--r--arch/avr32/boards/atngw100/evklcd10x.c2
-rw-r--r--drivers/video/atmel_lcdfb.c2
-rw-r--r--include/video/atmel_lcdc.h4
6 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 4ab1ba7557e4..473546b9408b 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -389,7 +389,7 @@ static struct fb_monspecs at91fb_default_stn_monspecs = {
389 | ATMEL_LCDC_IFWIDTH_4 \ 389 | ATMEL_LCDC_IFWIDTH_4 \
390 | ATMEL_LCDC_SCANMOD_SINGLE) 390 | ATMEL_LCDC_SCANMOD_SINGLE)
391 391
392static void at91_lcdc_stn_power_control(int on) 392static void at91_lcdc_stn_power_control(struct atmel_lcdfb_pdata *pdata, int on)
393{ 393{
394 /* backlight */ 394 /* backlight */
395 if (on) { /* power up */ 395 if (on) { /* power up */
@@ -445,7 +445,7 @@ static struct fb_monspecs at91fb_default_tft_monspecs = {
445 | ATMEL_LCDC_DISTYPE_TFT \ 445 | ATMEL_LCDC_DISTYPE_TFT \
446 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) 446 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
447 447
448static void at91_lcdc_tft_power_control(int on) 448static void at91_lcdc_tft_power_control(struct atmel_lcdfb_pdata *pdata, int on)
449{ 449{
450 if (on) 450 if (on)
451 at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */ 451 at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 0fdae3f1541d..8b4942cbb6d9 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -275,7 +275,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
275 | ATMEL_LCDC_DISTYPE_TFT \ 275 | ATMEL_LCDC_DISTYPE_TFT \
276 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) 276 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
277 277
278static void at91_lcdc_power_control(int on) 278static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
279{ 279{
280 at91_set_gpio_value(AT91_PIN_PA30, on); 280 at91_set_gpio_value(AT91_PIN_PA30, on);
281} 281}
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index b77d7a9febd8..604eecf6cd70 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -170,7 +170,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
170 | ATMEL_LCDC_DISTYPE_TFT \ 170 | ATMEL_LCDC_DISTYPE_TFT \
171 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) 171 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
172 172
173static void at91_lcdc_power_control(int on) 173static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
174{ 174{
175 if (on) 175 if (on)
176 at91_set_gpio_value(AT91_PIN_PC1, 0); /* power up */ 176 at91_set_gpio_value(AT91_PIN_PC1, 0); /* power up */
diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c
index dc4280413e9d..64919b0da7aa 100644
--- a/arch/avr32/boards/atngw100/evklcd10x.c
+++ b/arch/avr32/boards/atngw100/evklcd10x.c
@@ -145,7 +145,7 @@ static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
145}; 145};
146#endif 146#endif
147 147
148static void atevklcd10x_lcdc_power_control(int on) 148static void atevklcd10x_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
149{ 149{
150 gpio_set_value(GPIO_PIN_PB(15), on); 150 gpio_set_value(GPIO_PIN_PB(15), on);
151} 151}
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index 3c7609c1c6fe..790a501538b0 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -293,7 +293,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
293 struct atmel_lcdfb_pdata *pdata = &sinfo->pdata; 293 struct atmel_lcdfb_pdata *pdata = &sinfo->pdata;
294 294
295 if (pdata->atmel_lcdfb_power_control) 295 if (pdata->atmel_lcdfb_power_control)
296 pdata->atmel_lcdfb_power_control(on); 296 pdata->atmel_lcdfb_power_control(pdata, on);
297} 297}
298 298
299static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { 299static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index f197c54712b0..c79f38131926 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -41,8 +41,10 @@ struct atmel_lcdfb_pdata {
41 u8 lcd_wiring_mode; 41 u8 lcd_wiring_mode;
42 unsigned int default_lcdcon2; 42 unsigned int default_lcdcon2;
43 unsigned int default_dmacon; 43 unsigned int default_dmacon;
44 void (*atmel_lcdfb_power_control)(int on); 44 void (*atmel_lcdfb_power_control)(struct atmel_lcdfb_pdata *pdata, int on);
45 struct fb_monspecs *default_monspecs; 45 struct fb_monspecs *default_monspecs;
46
47 struct list_head pwr_gpios;
46}; 48};
47 49
48#define ATMEL_LCDC_DMABADDR1 0x00 50#define ATMEL_LCDC_DMABADDR1 0x00