aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 85f51a849a50..af06753eb809 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -41,6 +41,7 @@
41#include <linux/mtd/physmap.h> 41#include <linux/mtd/physmap.h>
42#include <linux/mtd/sh_flctl.h> 42#include <linux/mtd/sh_flctl.h>
43#include <linux/pinctrl/machine.h> 43#include <linux/pinctrl/machine.h>
44#include <linux/platform_data/gpio_backlight.h>
44#include <linux/pm_clock.h> 45#include <linux/pm_clock.h>
45#include <linux/regulator/fixed.h> 46#include <linux/regulator/fixed.h>
46#include <linux/regulator/machine.h> 47#include <linux/regulator/machine.h>
@@ -49,7 +50,6 @@
49#include <linux/tca6416_keypad.h> 50#include <linux/tca6416_keypad.h>
50#include <linux/usb/renesas_usbhs.h> 51#include <linux/usb/renesas_usbhs.h>
51#include <linux/dma-mapping.h> 52#include <linux/dma-mapping.h>
52
53#include <video/sh_mobile_hdmi.h> 53#include <video/sh_mobile_hdmi.h>
54#include <video/sh_mobile_lcdc.h> 54#include <video/sh_mobile_lcdc.h>
55#include <media/sh_mobile_ceu.h> 55#include <media/sh_mobile_ceu.h>
@@ -346,7 +346,7 @@ static struct platform_device meram_device = {
346 }, 346 },
347}; 347};
348 348
349/* LCDC */ 349/* LCDC and backlight */
350static struct fb_videomode mackerel_lcdc_modes[] = { 350static struct fb_videomode mackerel_lcdc_modes[] = {
351 { 351 {
352 .name = "WVGA Panel", 352 .name = "WVGA Panel",
@@ -362,13 +362,6 @@ static struct fb_videomode mackerel_lcdc_modes[] = {
362 }, 362 },
363}; 363};
364 364
365static int mackerel_set_brightness(int brightness)
366{
367 gpio_set_value(31, brightness);
368
369 return 0;
370}
371
372static const struct sh_mobile_meram_cfg lcd_meram_cfg = { 365static const struct sh_mobile_meram_cfg lcd_meram_cfg = {
373 .icb[0] = { 366 .icb[0] = {
374 .meram_size = 0x40, 367 .meram_size = 0x40,
@@ -393,11 +386,6 @@ static struct sh_mobile_lcdc_info lcdc_info = {
393 .width = 152, 386 .width = 152,
394 .height = 91, 387 .height = 91,
395 }, 388 },
396 .bl_info = {
397 .name = "sh_mobile_lcdc_bl",
398 .max_brightness = 1,
399 .set_brightness = mackerel_set_brightness,
400 },
401 .meram_cfg = &lcd_meram_cfg, 389 .meram_cfg = &lcd_meram_cfg,
402 } 390 }
403}; 391};
@@ -425,6 +413,20 @@ static struct platform_device lcdc_device = {
425 }, 413 },
426}; 414};
427 415
416static struct gpio_backlight_platform_data gpio_backlight_data = {
417 .fbdev = &lcdc_device.dev,
418 .gpio = 31,
419 .def_value = 1,
420 .name = "backlight",
421};
422
423static struct platform_device gpio_backlight_device = {
424 .name = "gpio-backlight",
425 .dev = {
426 .platform_data = &gpio_backlight_data,
427 },
428};
429
428/* HDMI */ 430/* HDMI */
429static struct sh_mobile_hdmi_info hdmi_info = { 431static struct sh_mobile_hdmi_info hdmi_info = {
430 .flags = HDMI_SND_SRC_SPDIF, 432 .flags = HDMI_SND_SRC_SPDIF,
@@ -1231,6 +1233,7 @@ static struct platform_device *mackerel_devices[] __initdata = {
1231 &nor_flash_device, 1233 &nor_flash_device,
1232 &smc911x_device, 1234 &smc911x_device,
1233 &lcdc_device, 1235 &lcdc_device,
1236 &gpio_backlight_device,
1234 &usbhs0_device, 1237 &usbhs0_device,
1235 &usbhs1_device, 1238 &usbhs1_device,
1236 &leds_device, 1239 &leds_device,
@@ -1441,9 +1444,6 @@ static void __init mackerel_init(void)
1441 ARRAY_SIZE(mackerel_pinctrl_map)); 1444 ARRAY_SIZE(mackerel_pinctrl_map));
1442 sh7372_pinmux_init(); 1445 sh7372_pinmux_init();
1443 1446
1444 /* backlight, off by default */
1445 gpio_request_one(31, GPIOF_OUT_INIT_LOW, NULL);
1446
1447 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ 1447 gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
1448 1448
1449 /* USBHS0 */ 1449 /* USBHS0 */