diff mbox

[U-Boot,v3,11/12] odroid u3: enable dm i2c support

Message ID 1422362199-32669-12-git-send-email-p.marczak@samsung.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Przemyslaw Marczak Jan. 27, 2015, 12:36 p.m. UTC
This patch enables CONFIG_DM_I2C and also CONFIG_DM_I2C_COMPAT.
The last one should be removed when the dm pmic framework will
be finished.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>

---
Changes v2:
- new patch
---
 board/samsung/odroid/odroid.c | 14 +-------------
 include/configs/odroid.h      |  5 ++---
 2 files changed, 3 insertions(+), 16 deletions(-)

Comments

Simon Glass Jan. 29, 2015, 5:34 p.m. UTC | #1
On 27 January 2015 at 05:36, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> This patch enables CONFIG_DM_I2C and also CONFIG_DM_I2C_COMPAT.
> The last one should be removed when the dm pmic framework will
> be finished.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> Acked-by: Simon Glass <sjg@chromium.org>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
>
> ---
> Changes v2:
> - new patch
> ---
>  board/samsung/odroid/odroid.c | 14 +-------------
>  include/configs/odroid.h      |  5 ++---
>  2 files changed, 3 insertions(+), 16 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index b7d2381..e3517f2 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -415,15 +415,6 @@  static int pmic_init_max77686(void)
 	return 0;
 }
 
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
-static void board_init_i2c(void)
-{
-	/* I2C_0 */
-	if (exynos_pinmux_config(PERIPH_ID_I2C0, PINMUX_FLAG_NONE))
-		debug("I2C%d not configured\n", (I2C_0));
-}
-#endif
-
 int exynos_early_init_f(void)
 {
 	board_clock_init();
@@ -444,10 +435,7 @@  int exynos_init(void)
 
 int exynos_power_init(void)
 {
-#ifdef CONFIG_SYS_I2C_INIT_BOARD
-	board_init_i2c();
-#endif
-	pmic_init(I2C_0);
+	pmic_init(0);
 	pmic_init_max77686();
 
 	return 0;
diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 807e96b..9d5dbdc 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -177,12 +177,11 @@ 
 
 /* I2C */
 #define CONFIG_CMD_I2C
-#define CONFIG_SYS_I2C
+#define CONFIG_DM_I2C
+#define CONFIG_DM_I2C_COMPAT
 #define CONFIG_SYS_I2C_S3C24X0
 #define CONFIG_SYS_I2C_S3C24X0_SPEED	100000
 #define CONFIG_SYS_I2C_S3C24X0_SLAVE	0
-#define CONFIG_MAX_I2C_NUM		8
-#define CONFIG_SYS_I2C_INIT_BOARD
 
 /* POWER */
 #define CONFIG_POWER