video: atmel_lcdfb: pass the pdata as params
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Thu, 28 Mar 2013 18:05:47 +0000 (02:05 +0800)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 27 Sep 2013 06:26:20 +0000 (09:26 +0300)
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>
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9rlek.c
arch/avr32/boards/atngw100/evklcd10x.c
drivers/video/atmel_lcdfb.c
include/video/atmel_lcdc.h

index 4ab1ba7557e429ed368611794e7ffda01412ab4f..473546b9408bf087a6b1a38950a9cf2157b3497f 100644 (file)
@@ -389,7 +389,7 @@ static struct fb_monspecs at91fb_default_stn_monspecs = {
                                        | ATMEL_LCDC_IFWIDTH_4 \
                                        | ATMEL_LCDC_SCANMOD_SINGLE)
 
-static void at91_lcdc_stn_power_control(int on)
+static void at91_lcdc_stn_power_control(struct atmel_lcdfb_pdata *pdata, int on)
 {
        /* backlight */
        if (on) {       /* power up */
@@ -445,7 +445,7 @@ static struct fb_monspecs at91fb_default_tft_monspecs = {
                                        | ATMEL_LCDC_DISTYPE_TFT    \
                                        | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
 
-static void at91_lcdc_tft_power_control(int on)
+static void at91_lcdc_tft_power_control(struct atmel_lcdfb_pdata *pdata, int on)
 {
        if (on)
                at91_set_gpio_value(AT91_PIN_PA12, 0);  /* power up */
index 0fdae3f1541da10fb6511c77081e8f323ba3fa81..8b4942cbb6d9a62ffdb1f88e9676670817b7a107 100644 (file)
@@ -275,7 +275,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
                                        | ATMEL_LCDC_DISTYPE_TFT \
                                        | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
 
-static void at91_lcdc_power_control(int on)
+static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
 {
        at91_set_gpio_value(AT91_PIN_PA30, on);
 }
index b77d7a9febd8a4f07c66a7250acaf52df798ddad..604eecf6cd70d03b57c34e6a2736f9feceb5be98 100644 (file)
@@ -170,7 +170,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
                                        | ATMEL_LCDC_DISTYPE_TFT \
                                        | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
 
-static void at91_lcdc_power_control(int on)
+static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
 {
        if (on)
                at91_set_gpio_value(AT91_PIN_PC1, 0);   /* power up */
index dc4280413e9dc10441b50fb7e43fa047910a801c..64919b0da7aa53a5464a4dff92452c5aa94b46b1 100644 (file)
@@ -145,7 +145,7 @@ static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
 };
 #endif
 
-static void atevklcd10x_lcdc_power_control(int on)
+static void atevklcd10x_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
 {
        gpio_set_value(GPIO_PIN_PB(15), on);
 }
index 3c7609c1c6fe7a39883742d99a568a7f155a3596..790a501538b050d2949b22a0afdac4095fc00d9e 100644 (file)
@@ -293,7 +293,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
        struct atmel_lcdfb_pdata *pdata = &sinfo->pdata;
 
        if (pdata->atmel_lcdfb_power_control)
-               pdata->atmel_lcdfb_power_control(on);
+               pdata->atmel_lcdfb_power_control(pdata, on);
 }
 
 static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
index f197c54712b09ceef3307bc2c56df721ede2f9ba..c79f3813192675c96ecea7ecd57c41d2fd522422 100644 (file)
@@ -41,8 +41,10 @@ struct atmel_lcdfb_pdata {
        u8                      lcd_wiring_mode;
        unsigned int            default_lcdcon2;
        unsigned int            default_dmacon;
-       void (*atmel_lcdfb_power_control)(int on);
+       void (*atmel_lcdfb_power_control)(struct atmel_lcdfb_pdata *pdata, int on);
        struct fb_monspecs      *default_monspecs;
+
+       struct list_head        pwr_gpios;
 };
 
 #define ATMEL_LCDC_DMABADDR1   0x00