aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-ecovec24/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 16:34:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-06 16:34:43 -0400
commit44598f98b98e54beca34dc836b38eaea40be1abf (patch)
tree42a498e0267b23289ffe240907fd9bacb9156a2c /arch/sh/boards/mach-ecovec24/setup.c
parentb4b50fd78b1e31989940dfc647e64453d0f7176a (diff)
parent4e5f67fa538ded704c904157e3ca23ceef9c7e64 (diff)
Merge tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC board updates from Olof Johansson: "Board updates for 3.12. Again, a bit of domain overlap with SoC and DT branches, but most of this is around legacy code and board support. We've found that platform maintainers have a hard time separating all of these out and might move towards fewer branches for next release. - Removal of a number of Marvell Kirkwood board files, since contents is now common and mostly configured via DT. - Device-tree updates for Marvell Dove, including irqchip and clocksource setup. - Defconfig updates. Gotta go somewhere. One new one for Renesas Lager. - New backlight drivers for backlights used on Renesas shmobile platforms. - Removal of Renesas leds driver. - Shuffling of some of the new Broadcom platforms to give room for others in the same mach directory. More in 3.13" * tag 'boards-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits) mmc: sdhci-bcm-kona: Staticize sdhci_bcm_kona_card_event mmc: sdhci-bcm-kona: Remove unneeded version.h inclusion ARM: bcm: Make secure API call optional ARM: DT: binding fixup to align with vendor-prefixes.txt (drivers) ARM: mmc: fix NONREMOVABLE test in sdhci-bcm-kona ARM: bcm: Rename board_bcm mmc: sdhci-bcm-kona: make linker-section warning go away ARM: tegra: defconfig updates ARM: dove: add initial DT file for Globalscale D2Plug ARM: dove: add GPIO IR receiver node to SolidRun CuBox ARM: dove: add common pinmux functions to DT ARM: dove: add cpu device tree node ARM: dove: update dove_defconfig with SI5351, PCI, and xHCI arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument ARM: kirkwood: fix DT building and update defconfig ARM: kirkwood: Remove all remaining trace of DNS-320/325 platform code ARM: configs: disable DEBUG_LL in bcm_defconfig ARM: bcm281xx: Board specific reboot code ARM bcm281xx: Turn on socket & network support. ARM: bcm281xx: Turn on L2 cache. ...
Diffstat (limited to 'arch/sh/boards/mach-ecovec24/setup.c')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index a4f630f04ea3..65dd81baa7f6 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -30,6 +30,7 @@
30#include <linux/spi/mmc_spi.h> 30#include <linux/spi/mmc_spi.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/input/sh_keysc.h> 32#include <linux/input/sh_keysc.h>
33#include <linux/platform_data/gpio_backlight.h>
33#include <linux/sh_eth.h> 34#include <linux/sh_eth.h>
34#include <linux/sh_intc.h> 35#include <linux/sh_intc.h>
35#include <linux/videodev2.h> 36#include <linux/videodev2.h>
@@ -302,7 +303,7 @@ static struct platform_device usbhs_device = {
302 .resource = usbhs_resources, 303 .resource = usbhs_resources,
303}; 304};
304 305
305/* LCDC */ 306/* LCDC and backlight */
306static const struct fb_videomode ecovec_lcd_modes[] = { 307static const struct fb_videomode ecovec_lcd_modes[] = {
307 { 308 {
308 .name = "Panel", 309 .name = "Panel",
@@ -333,13 +334,6 @@ static const struct fb_videomode ecovec_dvi_modes[] = {
333 }, 334 },
334}; 335};
335 336
336static int ecovec24_set_brightness(int brightness)
337{
338 gpio_set_value(GPIO_PTR1, brightness);
339
340 return 0;
341}
342
343static struct sh_mobile_lcdc_info lcdc_info = { 337static struct sh_mobile_lcdc_info lcdc_info = {
344 .ch[0] = { 338 .ch[0] = {
345 .interface_type = RGB18, 339 .interface_type = RGB18,
@@ -349,11 +343,6 @@ static struct sh_mobile_lcdc_info lcdc_info = {
349 .width = 152, 343 .width = 152,
350 .height = 91, 344 .height = 91,
351 }, 345 },
352 .bl_info = {
353 .name = "sh_mobile_lcdc_bl",
354 .max_brightness = 1,
355 .set_brightness = ecovec24_set_brightness,
356 },
357 } 346 }
358}; 347};
359 348
@@ -379,6 +368,20 @@ static struct platform_device lcdc_device = {
379 }, 368 },
380}; 369};
381 370
371static struct gpio_backlight_platform_data gpio_backlight_data = {
372 .fbdev = &lcdc_device.dev,
373 .gpio = GPIO_PTR1,
374 .def_value = 1,
375 .name = "backlight",
376};
377
378static struct platform_device gpio_backlight_device = {
379 .name = "gpio-backlight",
380 .dev = {
381 .platform_data = &gpio_backlight_data,
382 },
383};
384
382/* CEU0 */ 385/* CEU0 */
383static struct sh_mobile_ceu_info sh_mobile_ceu0_info = { 386static struct sh_mobile_ceu_info sh_mobile_ceu0_info = {
384 .flags = SH_CEU_FLAG_USE_8BIT_BUS, 387 .flags = SH_CEU_FLAG_USE_8BIT_BUS,
@@ -1048,6 +1051,7 @@ static struct platform_device *ecovec_devices[] __initdata = {
1048 &usb1_common_device, 1051 &usb1_common_device,
1049 &usbhs_device, 1052 &usbhs_device,
1050 &lcdc_device, 1053 &lcdc_device,
1054 &gpio_backlight_device,
1051 &ceu0_device, 1055 &ceu0_device,
1052 &ceu1_device, 1056 &ceu1_device,
1053 &keysc_device, 1057 &keysc_device,
@@ -1238,11 +1242,9 @@ static int __init arch_setup(void)
1238 1242
1239 gpio_request(GPIO_PTE6, NULL); 1243 gpio_request(GPIO_PTE6, NULL);
1240 gpio_request(GPIO_PTU1, NULL); 1244 gpio_request(GPIO_PTU1, NULL);
1241 gpio_request(GPIO_PTR1, NULL);
1242 gpio_request(GPIO_PTA2, NULL); 1245 gpio_request(GPIO_PTA2, NULL);
1243 gpio_direction_input(GPIO_PTE6); 1246 gpio_direction_input(GPIO_PTE6);
1244 gpio_direction_output(GPIO_PTU1, 0); 1247 gpio_direction_output(GPIO_PTU1, 0);
1245 gpio_direction_output(GPIO_PTR1, 0);
1246 gpio_direction_output(GPIO_PTA2, 0); 1248 gpio_direction_output(GPIO_PTA2, 0);
1247 1249
1248 /* I/O buffer drive ability is high */ 1250 /* I/O buffer drive ability is high */
@@ -1255,6 +1257,9 @@ static int __init arch_setup(void)
1255 lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes; 1257 lcdc_info.ch[0].lcd_modes = ecovec_dvi_modes;
1256 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes); 1258 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_dvi_modes);
1257 1259
1260 /* No backlight */
1261 gpio_backlight_data.fbdev = NULL;
1262
1258 gpio_set_value(GPIO_PTA2, 1); 1263 gpio_set_value(GPIO_PTA2, 1);
1259 gpio_set_value(GPIO_PTU1, 1); 1264 gpio_set_value(GPIO_PTU1, 1);
1260 } else { 1265 } else {
@@ -1264,8 +1269,6 @@ static int __init arch_setup(void)
1264 lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes; 1269 lcdc_info.ch[0].lcd_modes = ecovec_lcd_modes;
1265 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes); 1270 lcdc_info.ch[0].num_modes = ARRAY_SIZE(ecovec_lcd_modes);
1266 1271
1267 gpio_set_value(GPIO_PTR1, 1);
1268
1269 /* FIXME 1272 /* FIXME
1270 * 1273 *
1271 * LCDDON control is needed for Panel, 1274 * LCDDON control is needed for Panel,