From patchwork Thu May 28 13:03:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6498531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4626A9F38C for ; Thu, 28 May 2015 13:12:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33866205CB for ; Thu, 28 May 2015 13:12:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 17FFB205CA for ; Thu, 28 May 2015 13:12:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxxYw-0006Av-Ao; Thu, 28 May 2015 13:09:30 +0000 Received: from mail-pd0-f182.google.com ([209.85.192.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxxWO-0004nV-BY for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2015 13:06:55 +0000 Received: by pdea3 with SMTP id a3so41356274pde.2 for ; Thu, 28 May 2015 06:06:33 -0700 (PDT) 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=2vj4Q0LSOU5Dfr0LyOesiKGwgHPVwZSUkqjppp4jTYg=; b=iRRBYQqqsk/GhtRv8MVZClq9kw94zGKsMCGTnWksqeqPNenMC562MpQHckOBbQBeFk y/mTrzAq0Kb3x18iu8YuJ6Sft2hIyhl1DIZdWr2Qhk3/RSxzbI2XAhbj5MklyfP51PiJ 5dJ1jUWXs7yA4H4Kg3SW1wVq0uI74pQ0rjL8v2TH/IAUm2wCKGClD+W7LER2yZntMdIg b3sF5lF1mTVXAOjzObEwc0hIqWoOX4LLLw8AGns6F3Qwe8NGgS1vXicH6ot3qXxa5YdA +tKNUE8xIDolG+r1b8cDaiFK5FitXbjpHD9T01EZdxqO05ZKutSmHMjwSvH+s7ezmVR6 tTjw== X-Gm-Message-State: ALoCoQmNM7Atup31VsuS+pxsR1KvAhXqVSoIOc0II9SxjxtvTViaM20lE8BFFAuiPQZQpMxQaPcG X-Received: by 10.70.96.194 with SMTP id du2mr5469347pdb.108.1432818393271; Thu, 28 May 2015 06:06:33 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id dc5sm2392557pbc.53.2015.05.28.06.06.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 06:06:32 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Subject: [PATCH 02/12] i2c: pxa: No need to set slave addr for i2c master mode reset Date: Thu, 28 May 2015 18:33:34 +0530 Message-Id: <1432818224-17070-3-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432818224-17070-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1432818224-17070-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150528_060652_468814_F2AC6044 X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.8 (-) Cc: "Jett.Zhou" , Vaibhav Hiremath , linux-arm-kernel@lists.infradead.org, Wolfram Sang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Jett.Zhou" Normally i2c controller works as master, so slave addr is not needed, or it will impact some slave device (eg. ST NFC chip) i2c accesses, because it has the same i2c address with controller. Signed-off-by: Jett.Zhou [vaibhav.hiremath@linaro.org: Updated Changelog] Signed-off-by: Vaibhav Hiremath Cc: Wolfram Sang Signed-off-by: Vaibhav Hiremath --- drivers/i2c/busses/i2c-pxa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index f4ac8c5..d4c798a 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -459,8 +459,10 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c) writel(I2C_ISR_INIT, _ISR(i2c)); writel(readl(_ICR(i2c)) & ~ICR_UR, _ICR(i2c)); +#ifdef CONFIG_I2C_PXA_SLAVE if (i2c->reg_isar) writel(i2c->slave_addr, _ISAR(i2c)); +#endif /* set control register values */ writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));