From patchwork Fri Feb 13 19:20:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 439620 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2CAD91401D0 for ; Sat, 14 Feb 2015 06:21:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6C0AA4B8DE; Fri, 13 Feb 2015 20:21:07 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id twrxDb4uIUor; Fri, 13 Feb 2015 20:21:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1F924B8E8; Fri, 13 Feb 2015 20:21:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A05DB4B86F for ; Fri, 13 Feb 2015 20:20:57 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZjC5PhOJrnvW for ; Fri, 13 Feb 2015 20:20:57 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ig0-f202.google.com (mail-ig0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 35FFD4B862 for ; Fri, 13 Feb 2015 20:20:54 +0100 (CET) Received: by mail-ig0-f202.google.com with SMTP id a13so4066458igq.1 for ; Fri, 13 Feb 2015 11:20:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8fIw/u0oxwF8AZETSormgsWSHV1KsXHvJDcpLuiEK7M=; b=DleNuzKirq6Ij2uObjimk2QfNCM8uRudJNw+9wjBUC9QM/ZRIIgaH/9i/Z0NrjHZzv tuVk7jiqos8sa+0kYm74ZgeyQ28aFiC/2A/lX3YrDsdrm1S5rK8VeG0cIuc58XFS10D+ VyxnQctzUNeyY3ZHsulYQ3PQJAtfkTJf61dhcfX1iCB2t4M74/F7ltg85Xbb6YiMrTBR C3lXsUCseHBnl4NECKIxkzh5VtYhH++m4eZFGMx7ZUG2G4iYIeazLKD7AaTRskeFvd2M cvwtu0NMbhwRhgWWXtPYkabnXfhHUFcWSShEZAYmMxQ+qes92eEQ2amdHHuuTVE0g9jZ Fspw== X-Gm-Message-State: ALoCoQnROswro42VwzHpBJRtGS4deh5WYf3esf3l1I2axFCBUIhOeqST9Hxp4hEjQspCeDL4J3fh X-Received: by 10.182.33.97 with SMTP id q1mr3485617obi.42.1423855253265; Fri, 13 Feb 2015 11:20:53 -0800 (PST) Received: from corpmail-nozzle1-1.hot.corp.google.com ([100.108.1.104]) by gmr-mx.google.com with ESMTPS id q2si1676484qcn.2.2015.02.13.11.20.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Feb 2015 11:20:53 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-1.hot.corp.google.com with ESMTP id 2Sc8M0lP.1; Fri, 13 Feb 2015 11:20:53 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 24C6A220545; Fri, 13 Feb 2015 12:20:51 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 13 Feb 2015 12:20:48 -0700 Message-Id: <1423855249-14590-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1423855249-14590-1-git-send-email-sjg@chromium.org> References: <1423855249-14590-1-git-send-email-sjg@chromium.org> Cc: Akshay Saraswat , Ian Campbell , Przemyslaw Marczak Subject: [U-Boot] [PATCH 2/3] dm: Move CONFIG_I2C_COMPAT to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Make this option available in Kconfig and clean up the board that uses it. Note there is also an entry in exynos5-common.h but this affects multiple boards and should be dropped as part of the Samsung I2C migration to driver model. Signed-off-by: Simon Glass --- configs/odroid_defconfig | 2 ++ drivers/i2c/Kconfig | 9 +++++++++ include/configs/exynos5-common.h | 2 ++ include/configs/odroid.h | 2 -- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig index a842837..816a3fa 100644 --- a/configs/odroid_defconfig +++ b/configs/odroid_defconfig @@ -3,3 +3,5 @@ CONFIG_ARCH_EXYNOS=y CONFIG_TARGET_ODROID=y CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="exynos4412-odroid" +CONFIG_DM_I2C=y +CONFIG_DM_I2C_COMPAT=y diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 2cc776c..692810d 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -13,6 +13,15 @@ config DM_I2C enabled together (it is not possible to use driver model for one and not the other). +config DM_I2C_COMPAT + bool "Enable I2C compatibility layer" + depends on DM + help + Enable old-style I2C functions for compatibility with existing code. + This option can be enabled as a temporary measure to avoid needing + to convert all code for a board in a single commit. It should not + be enabled for any board in an official release. + config SYS_I2C_UNIPHIER bool "UniPhier I2C driver" depends on ARCH_UNIPHIER && DM_I2C diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 0ba39a2..3ab8d55 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -126,6 +126,8 @@ #define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE) /* I2C */ + +/* TODO(sjg@chromium.org): Move these two options to Kconfig */ #define CONFIG_DM_I2C #define CONFIG_DM_I2C_COMPAT #define CONFIG_CMD_I2C diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 9d5dbdc..8b47537 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -177,8 +177,6 @@ /* I2C */ #define CONFIG_CMD_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