Commit c2439398170be9d7af28eb3ab59593369cb303f3

Authored by Guennadi Liakhovetski
Committed by Paul Mundt
1 parent b90884c886

sh: add a parameter to LCDC driver's .display_on() callback

HDMI support for the sh_mobile_lcdc framebuffer driver will require a 'struct
fb_info *' pointer for its .display_on() callback. While at it fix kfr2r09
framebuffer modular build.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Showing 7 changed files with 17 additions and 15 deletions Side-by-side Diff

arch/sh/boards/mach-ap325rxa/setup.c
... ... @@ -154,7 +154,7 @@
154 154 #define PORT_DRVCRA 0xA405018A
155 155 #define PORT_DRVCRB 0xA405018C
156 156  
157   -static void ap320_wvga_power_on(void *board_data)
  157 +static void ap320_wvga_power_on(void *board_data, struct fb_info *info)
158 158 {
159 159 msleep(100);
160 160  
arch/sh/boards/mach-kfr2r09/Makefile
1   -obj-y := setup.o sdram.o
2   -obj-$(CONFIG_FB_SH_MOBILE_LCDC) += lcd_wqvga.o
  1 +obj-y := setup.o sdram.o
  2 +ifneq ($(CONFIG_FB_SH_MOBILE_LCDC),)
  3 +obj-y += lcd_wqvga.o
  4 +endif
arch/sh/boards/mach-kfr2r09/lcd_wqvga.c
... ... @@ -327,7 +327,7 @@
327 327 return 0;
328 328 }
329 329  
330   -void kfr2r09_lcd_on(void *board_data)
  330 +void kfr2r09_lcd_on(void *board_data, struct fb_info *info)
331 331 {
332 332 kfr2r09_lcd_backlight(1);
333 333 }
arch/sh/include/mach-kfr2r09/mach/kfr2r09.h
... ... @@ -3,23 +3,23 @@
3 3  
4 4 #include <video/sh_mobile_lcdc.h>
5 5  
6   -#ifdef CONFIG_FB_SH_MOBILE_LCDC
7   -void kfr2r09_lcd_on(void *board_data);
  6 +#if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE)
  7 +void kfr2r09_lcd_on(void *board_data, struct fb_info *info);
8 8 void kfr2r09_lcd_off(void *board_data);
9 9 int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
10 10 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
11 11 void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
12 12 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
13 13 #else
14   -static inline void kfr2r09_lcd_on(void *board_data) {}
15   -static inline void kfr2r09_lcd_off(void *board_data) {}
16   -static inline int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
17   - struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
  14 +static void kfr2r09_lcd_on(void *board_data) {}
  15 +static void kfr2r09_lcd_off(void *board_data) {}
  16 +static int kfr2r09_lcd_setup(void *board_data, void *sys_ops_handle,
  17 + struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
18 18 {
19 19 return -ENODEV;
20 20 }
21   -static inline void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
22   - struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
  21 +static void kfr2r09_lcd_start(void *board_data, void *sys_ops_handle,
  22 + struct sh_mobile_lcdc_sys_bus_ops *sys_ops)
23 23 {
24 24 }
25 25 #endif
drivers/video/sh_mipi_dsi.c
... ... @@ -100,7 +100,7 @@
100 100 sh_mipi_dsi_enable(mipi, false);
101 101 }
102 102  
103   -static void mipi_display_on(void *arg)
  103 +static void mipi_display_on(void *arg, struct fb_info *info)
104 104 {
105 105 struct sh_mipi *mipi = arg;
106 106  
drivers/video/sh_mobile_lcdcfb.c
... ... @@ -577,7 +577,7 @@
577 577  
578 578 board_cfg = &ch->cfg.board_cfg;
579 579 if (board_cfg->display_on)
580   - board_cfg->display_on(board_cfg->board_data);
  580 + board_cfg->display_on(board_cfg->board_data, ch->info);
581 581 }
582 582  
583 583 return 0;
include/video/sh_mobile_lcdc.h
... ... @@ -55,7 +55,7 @@
55 55 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
56 56 void (*start_transfer)(void *board_data, void *sys_ops_handle,
57 57 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
58   - void (*display_on)(void *board_data);
  58 + void (*display_on)(void *board_data, struct fb_info *info);
59 59 void (*display_off)(void *board_data);
60 60 };
61 61