+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2011 Samsung Electronics
* Heungjun Kim <riverful.kim@samsung.com>
* Kyungmin Park <kyungmin.park@samsung.com>
* Donghwa Lee <dh09.lee@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <env.h>
#include <lcd.h>
+#include <log.h>
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mipi_dsim.h>
#include <asm/arch/watchdog.h>
#include <asm/arch/power.h>
+#include <linux/delay.h>
#include <power/pmic.h>
#include <usb/dwc2_udc.h>
#include <power/max8997_pmic.h>
#include "setup.h"
-DECLARE_GLOBAL_DATA_PTR;
-
unsigned int board_rev;
#ifdef CONFIG_REVISION_TAG
return 0;
}
-void i2c_init_board(void)
-{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
- int err;
-
- /* I2C_8 -> FG */
- gpio_request(EXYNOS4_GPIO_Y40, "i2c_clk");
- gpio_request(EXYNOS4_GPIO_Y41, "i2c_data");
- gpio_direction_output(EXYNOS4_GPIO_Y40, 1);
- gpio_direction_output(EXYNOS4_GPIO_Y41, 1);
-#endif
-}
-
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
+#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
static void trats_low_power_mode(void)
{
struct exynos4_clock *clk =
int exynos_power_init(void)
{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
+#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
int chrg, ret;
struct power_battery *pb;
struct pmic *p_fg, *p_chrg, *p_muic, *p_bat;
int g_dnl_board_usb_cable_connected(void)
{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
+#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
struct pmic *muic = pmic_get("MAX8997_MUIC");
if (!muic)
return 0;
return 0;
}
-void exynos_reset_lcd(void)
-{
- gpio_request(EXYNOS4_GPIO_Y45, "lcd_reset");
- gpio_direction_output(EXYNOS4_GPIO_Y45, 1);
- udelay(10000);
- gpio_direction_output(EXYNOS4_GPIO_Y45, 0);
- udelay(10000);
- gpio_direction_output(EXYNOS4_GPIO_Y45, 1);
-}
-
int lcd_power(void)
{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
+#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
int ret = 0;
struct pmic *p = pmic_get("MAX8997_PMIC");
if (!p)
int mipi_power(void)
{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
+#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
int ret = 0;
struct pmic *p = pmic_get("MAX8997_PMIC");
if (!p)
#endif
return 0;
}
-
-#ifdef CONFIG_LCD
-void exynos_lcd_misc_init(vidinfo_t *vid)
-{
-#ifdef CONFIG_TIZEN
- get_tizen_logo_info(vid);
-#endif
-#ifdef CONFIG_S6E8AX0
- s6e8ax0_init();
- setenv("lcdinfo", "lcd=s6e8ax0");
-#endif
-}
-#endif