From patchwork Mon Sep 24 06:49:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Piotr Wilczek X-Patchwork-Id: 186309 X-Patchwork-Delegate: promsoft@gmail.com 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 4AB522C0084 for ; Mon, 24 Sep 2012 16:51:01 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BD5F2808A; Mon, 24 Sep 2012 08:50:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 74uTCjw0Kyaa; Mon, 24 Sep 2012 08:50:55 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BFFB52809A; Mon, 24 Sep 2012 08:50:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 806BD28084 for ; Mon, 24 Sep 2012 08:50:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 65bfjLqdFwuP for ; Mon, 24 Sep 2012 08:50:06 +0200 (CEST) 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 mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by theia.denx.de (Postfix) with ESMTP id 3776728095 for ; Mon, 24 Sep 2012 08:49:51 +0200 (CEST) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAU00GL1DLQ81Q0@mailout1.samsung.com> for u-boot@lists.denx.de; Mon, 24 Sep 2012 15:49:49 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-60-5060028d132a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 0C.2F.03860.D8200605; Mon, 24 Sep 2012 15:49:49 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAU00IFRDMGFT70@mmp2.samsung.com> for u-boot@lists.denx.de; Mon, 24 Sep 2012 15:49:49 +0900 (KST) From: Piotr Wilczek To: u-boot@lists.denx.de Date: Mon, 24 Sep 2012 08:49:22 +0200 Message-id: <1348469362-17314-6-git-send-email-p.wilczek@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1348469362-17314-1-git-send-email-p.wilczek@samsung.com> References: <1348469362-17314-1-git-send-email-p.wilczek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd1epoQAg87PGhZv93ayOzB6nL2z gzGAMYrLJiU1J7MstUjfLoEro+/nPpaCGWwVR9+eZmpgnM7axcjJISFgIrFz3zQmCFtM4sK9 9WwgtpDAdEaJDWtFuhi5gOzFTBKfl+1kB0mwCWhLLH/zhhHEFhGQkPjVf5URpIhZYBmjREPD b7AiYYEwiTX/t4BNYhFQldg9ezkLiM0r4Cpx/Ps5qG3yEk/v94HVcAq4SXx59pO5i5EDaJur xNRpyRMYeRcwMqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECPb5M+kdjKsaLA4xCnAwKvHw bjgTHyDEmlhWXJl7iFGCg1lJhDfiGVCINyWxsiq1KD++qDQntfgQozQHi5I4r/CnwAAhgfTE ktTs1NSC1CKYLBMHp1QDo9kL3ktti+uVTnHymyUZcJhesWHQsfy7XfXy0brN5vMn9MyWr73c o3ht6bfzX6vXsBzhOcXtM1Nu67zoByvr7rven3RFz2HVn/vvFAM3cWxorp/Z9aXGpcrm0Jbv yZOeXJy6O/H1t5DXm5JO37XvYJljcUH7wCXWLTlNJzclrj+blhtzWHhdpZQSS3FGoqEWc1Fx IgAL0GDC9QEAAA== Cc: Piotr Wilczek , Kyungmin Park Subject: [U-Boot] [PATCH 5/5] DRIVERS: MISC: PMIC: Modify pmic driver to support multibus I2C X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch modify Max8997 driver to support multibus I2C Signed-off-by: Piotr Wilczek Signed-off-by: Kyungmin Park CC: Minkyu Kang --- drivers/misc/pmic_max8997.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/misc/pmic_max8997.c b/drivers/misc/pmic_max8997.c index 62dbc05..c6e2d98 100644 --- a/drivers/misc/pmic_max8997.c +++ b/drivers/misc/pmic_max8997.c @@ -37,7 +37,10 @@ int pmic_init(void) p->number_of_regs = PMIC_NUM_OF_REGS; p->hw.i2c.addr = MAX8997_I2C_ADDR; p->hw.i2c.tx_num = 1; - p->bus = I2C_PMIC; - +#ifdef CONFIG_PMIC_BUS_NUM + p->bus = CONFIG_PMIC_BUS_NUM; +#else + p->bus = I2C_PMIC; +#endif return 0; }