diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-ap325rxa/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 6 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 16 | ||||
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 7 | ||||
-rw-r--r-- | arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | 6 |
5 files changed, 10 insertions, 31 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c index 9e963c1d1447..5620e33c18a0 100644 --- a/arch/sh/boards/mach-ap325rxa/setup.c +++ b/arch/sh/boards/mach-ap325rxa/setup.c | |||
@@ -179,11 +179,6 @@ static int ap320_wvga_set_brightness(int brightness) | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
182 | static int ap320_wvga_get_brightness(void) | ||
183 | { | ||
184 | return gpio_get_value(GPIO_PTS3); | ||
185 | } | ||
186 | |||
187 | static void ap320_wvga_power_on(void) | 182 | static void ap320_wvga_power_on(void) |
188 | { | 183 | { |
189 | msleep(100); | 184 | msleep(100); |
@@ -232,7 +227,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
232 | .name = "sh_mobile_lcdc_bl", | 227 | .name = "sh_mobile_lcdc_bl", |
233 | .max_brightness = 1, | 228 | .max_brightness = 1, |
234 | .set_brightness = ap320_wvga_set_brightness, | 229 | .set_brightness = ap320_wvga_set_brightness, |
235 | .get_brightness = ap320_wvga_get_brightness, | ||
236 | }, | 230 | }, |
237 | } | 231 | } |
238 | }; | 232 | }; |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 64559e8af14b..3fede4556c91 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -329,11 +329,6 @@ static int ecovec24_set_brightness(int brightness) | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static int ecovec24_get_brightness(void) | ||
333 | { | ||
334 | return gpio_get_value(GPIO_PTR1); | ||
335 | } | ||
336 | |||
337 | static struct sh_mobile_lcdc_info lcdc_info = { | 332 | static struct sh_mobile_lcdc_info lcdc_info = { |
338 | .ch[0] = { | 333 | .ch[0] = { |
339 | .interface_type = RGB18, | 334 | .interface_type = RGB18, |
@@ -347,7 +342,6 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
347 | .name = "sh_mobile_lcdc_bl", | 342 | .name = "sh_mobile_lcdc_bl", |
348 | .max_brightness = 1, | 343 | .max_brightness = 1, |
349 | .set_brightness = ecovec24_set_brightness, | 344 | .set_brightness = ecovec24_set_brightness, |
350 | .get_brightness = ecovec24_get_brightness, | ||
351 | }, | 345 | }, |
352 | } | 346 | } |
353 | }; | 347 | }; |
diff --git a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c index c148b36ecb65..c62050332629 100644 --- a/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c +++ b/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | |||
@@ -283,7 +283,7 @@ void kfr2r09_lcd_start(void *sohandle, struct sh_mobile_lcdc_sys_bus_ops *so) | |||
283 | #define MAIN_MLED4 0x40 | 283 | #define MAIN_MLED4 0x40 |
284 | #define MAIN_MSW 0x80 | 284 | #define MAIN_MSW 0x80 |
285 | 285 | ||
286 | static int kfr2r09_lcd_backlight(int on) | 286 | int kfr2r09_lcd_set_brightness(int brightness) |
287 | { | 287 | { |
288 | struct i2c_adapter *a; | 288 | struct i2c_adapter *a; |
289 | struct i2c_msg msg; | 289 | struct i2c_msg msg; |
@@ -295,7 +295,7 @@ static int kfr2r09_lcd_backlight(int on) | |||
295 | return -ENODEV; | 295 | return -ENODEV; |
296 | 296 | ||
297 | buf[0] = 0x00; | 297 | buf[0] = 0x00; |
298 | if (on) | 298 | if (brightness) |
299 | buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; | 299 | buf[1] = CTRL_CPSW | CTRL_C10 | CTRL_CKSW; |
300 | else | 300 | else |
301 | buf[1] = 0; | 301 | buf[1] = 0; |
@@ -309,7 +309,7 @@ static int kfr2r09_lcd_backlight(int on) | |||
309 | return -ENODEV; | 309 | return -ENODEV; |
310 | 310 | ||
311 | buf[0] = 0x01; | 311 | buf[0] = 0x01; |
312 | if (on) | 312 | if (brightness) |
313 | buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; | 313 | buf[1] = MAIN_MSW | MAIN_MLED4 | 0x0c; |
314 | else | 314 | else |
315 | buf[1] = 0; | 315 | buf[1] = 0; |
@@ -324,13 +324,3 @@ static int kfr2r09_lcd_backlight(int on) | |||
324 | 324 | ||
325 | return 0; | 325 | return 0; |
326 | } | 326 | } |
327 | |||
328 | void kfr2r09_lcd_on(void) | ||
329 | { | ||
330 | kfr2r09_lcd_backlight(1); | ||
331 | } | ||
332 | |||
333 | void kfr2r09_lcd_off(void) | ||
334 | { | ||
335 | kfr2r09_lcd_backlight(0); | ||
336 | } | ||
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index f2a4304fbe23..ab502f12ef57 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -158,8 +158,11 @@ static struct sh_mobile_lcdc_info kfr2r09_sh_lcdc_info = { | |||
158 | .height = 58, | 158 | .height = 58, |
159 | .setup_sys = kfr2r09_lcd_setup, | 159 | .setup_sys = kfr2r09_lcd_setup, |
160 | .start_transfer = kfr2r09_lcd_start, | 160 | .start_transfer = kfr2r09_lcd_start, |
161 | .display_on = kfr2r09_lcd_on, | 161 | }, |
162 | .display_off = kfr2r09_lcd_off, | 162 | .bl_info = { |
163 | .name = "sh_mobile_lcdc_bl", | ||
164 | .max_brightness = 1, | ||
165 | .set_brightness = kfr2r09_lcd_set_brightness, | ||
163 | }, | 166 | }, |
164 | .sys_bus_cfg = { | 167 | .sys_bus_cfg = { |
165 | .ldmt2r = 0x07010904, | 168 | .ldmt2r = 0x07010904, |
diff --git a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h index ba3d93d333f8..c20c9e5f5eab 100644 --- a/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h +++ b/arch/sh/include/mach-kfr2r09/mach/kfr2r09.h | |||
@@ -4,15 +4,13 @@ | |||
4 | #include <video/sh_mobile_lcdc.h> | 4 | #include <video/sh_mobile_lcdc.h> |
5 | 5 | ||
6 | #if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE) | 6 | #if defined(CONFIG_FB_SH_MOBILE_LCDC) || defined(CONFIG_FB_SH_MOBILE_LCDC_MODULE) |
7 | void kfr2r09_lcd_on(void); | 7 | int kfr2r09_lcd_set_brightness(int brightness); |
8 | void kfr2r09_lcd_off(void); | ||
9 | int kfr2r09_lcd_setup(void *sys_ops_handle, | 8 | int kfr2r09_lcd_setup(void *sys_ops_handle, |
10 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 9 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
11 | void kfr2r09_lcd_start(void *sys_ops_handle, | 10 | void kfr2r09_lcd_start(void *sys_ops_handle, |
12 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 11 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
13 | #else | 12 | #else |
14 | static void kfr2r09_lcd_on(void) {} | 13 | static int kfr2r09_lcd_set_brightness(int brightness) {} |
15 | static void kfr2r09_lcd_off(void) {} | ||
16 | static int kfr2r09_lcd_setup(void *sys_ops_handle, | 14 | static int kfr2r09_lcd_setup(void *sys_ops_handle, |
17 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops) | 15 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops) |
18 | { | 16 | { |