mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-13 00:03:26 +09:00
![Simon Glass](/assets/img/avatar_default.png)
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
46 lines
750 B
C
46 lines
750 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2018 Armadeus Systems
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <init.h>
|
|
#include <asm/arch/sys_proto.h>
|
|
#include <asm/gpio.h>
|
|
#include <asm/io.h>
|
|
|
|
#ifdef CONFIG_VIDEO_MXS
|
|
int setup_lcd(void)
|
|
{
|
|
struct gpio_desc backlight;
|
|
int ret;
|
|
|
|
/* Set Brightness to high */
|
|
ret = dm_gpio_lookup_name("GPIO4_10", &backlight);
|
|
if (ret) {
|
|
printf("Cannot get GPIO4_10\n");
|
|
return ret;
|
|
}
|
|
|
|
ret = dm_gpio_request(&backlight, "backlight");
|
|
if (ret) {
|
|
printf("Cannot request GPIO4_10\n");
|
|
return ret;
|
|
}
|
|
|
|
dm_gpio_set_dir_flags(&backlight, GPIOD_IS_OUT);
|
|
dm_gpio_set_value(&backlight, 1);
|
|
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
int opos6ul_board_late_init(void)
|
|
{
|
|
#ifdef CONFIG_VIDEO_MXS
|
|
setup_lcd();
|
|
#endif
|
|
|
|
return 0;
|
|
}
|