Skip to content

Commit ce3b64f

Browse files
plagniojtomba
authored andcommitted
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 <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent 42110e9 commit ce3b64f

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

arch/arm/mach-at91/board-sam9261ek.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static struct fb_monspecs at91fb_default_stn_monspecs = {
389389
| ATMEL_LCDC_IFWIDTH_4 \
390390
| ATMEL_LCDC_SCANMOD_SINGLE)
391391

392-
static void at91_lcdc_stn_power_control(int on)
392+
static void at91_lcdc_stn_power_control(struct atmel_lcdfb_pdata *pdata, int on)
393393
{
394394
/* backlight */
395395
if (on) { /* power up */
@@ -445,7 +445,7 @@ static struct fb_monspecs at91fb_default_tft_monspecs = {
445445
| ATMEL_LCDC_DISTYPE_TFT \
446446
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
447447

448-
static void at91_lcdc_tft_power_control(int on)
448+
static void at91_lcdc_tft_power_control(struct atmel_lcdfb_pdata *pdata, int on)
449449
{
450450
if (on)
451451
at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */

arch/arm/mach-at91/board-sam9263ek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
275275
| ATMEL_LCDC_DISTYPE_TFT \
276276
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
277277

278-
static void at91_lcdc_power_control(int on)
278+
static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
279279
{
280280
at91_set_gpio_value(AT91_PIN_PA30, on);
281281
}

arch/arm/mach-at91/board-sam9rlek.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static struct fb_monspecs at91fb_default_monspecs = {
170170
| ATMEL_LCDC_DISTYPE_TFT \
171171
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
172172

173-
static void at91_lcdc_power_control(int on)
173+
static void at91_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
174174
{
175175
if (on)
176176
at91_set_gpio_value(AT91_PIN_PC1, 0); /* power up */

arch/avr32/boards/atngw100/evklcd10x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static struct atmel_lcdfb_pdata __initdata atevklcd10x_lcdc_data = {
145145
};
146146
#endif
147147

148-
static void atevklcd10x_lcdc_power_control(int on)
148+
static void atevklcd10x_lcdc_power_control(struct atmel_lcdfb_pdata *pdata, int on)
149149
{
150150
gpio_set_value(GPIO_PIN_PB(15), on);
151151
}

drivers/video/atmel_lcdfb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
293293
struct atmel_lcdfb_pdata *pdata = &sinfo->pdata;
294294

295295
if (pdata->atmel_lcdfb_power_control)
296-
pdata->atmel_lcdfb_power_control(on);
296+
pdata->atmel_lcdfb_power_control(pdata, on);
297297
}
298298

299299
static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {

include/video/atmel_lcdc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ struct atmel_lcdfb_pdata {
4141
u8 lcd_wiring_mode;
4242
unsigned int default_lcdcon2;
4343
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);
4545
struct fb_monspecs *default_monspecs;
46+
47+
struct list_head pwr_gpios;
4648
};
4749

4850
#define ATMEL_LCDC_DMABADDR1 0x00

0 commit comments

Comments
 (0)