From patchwork Mon Jul 6 19:24:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6727401 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 68D299F2F0 for ; Mon, 6 Jul 2015 19:30:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A29CB205EB for ; Mon, 6 Jul 2015 19:30:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CECF5205EC for ; Mon, 6 Jul 2015 19:30:08 +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 1ZCC3o-0007JU-0Y; Mon, 06 Jul 2015 19:28:12 +0000 Received: from mail-pd0-f179.google.com ([209.85.192.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCC3i-0007Fm-WC for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2015 19:28:07 +0000 Received: by pddu5 with SMTP id u5so23471642pdd.3 for ; Mon, 06 Jul 2015 12:27:46 -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=RkaGQocLFXiq2JZ3THYjhiAh/0PuzkIv9OIliG+UXCs=; b=MWILd5j3ffsujVRA8jMSfo8hTe7zcU26QnYt12SCvwp4acTEkzINbqYRxsIIC7ROKZ iG+EgMmY+TKfjbHrFv4AYCYHYXboTONR6a8qCt7st6EYfMa+xsO02F9E918rftrFDGdd pqdcKpecZrZtutDn8G+jBLQvtaU+FCgCbnXfUAbdY7J8gM4FO5Bm/oIykPhdvv1VIPdj z3H3/Su/JoINImDmYPUaaFdrYvGAsxgI9Heh+mWccqQsFY0q4TqdihRTghGu6VHM9vmw /eWFkTtAUQmG9Txygq0Y8K51HRrD+lU0MD4ehuxxdgqzkDoTLjD1eqjWOvzdKY42iWv1 qSGw== X-Gm-Message-State: ALoCoQljulGeL6fYZbZAMEEubIIO7kPFPPqGXuNUrUTnlpGCb+CP34n6gHTKf38DorZONvUqeEsX X-Received: by 10.69.10.196 with SMTP id ec4mr788471pbd.69.1436210866216; Mon, 06 Jul 2015 12:27:46 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id x7sm19293964pas.28.2015.07.06.12.27.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 12:27:45 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Subject: [PATCH-v3 02/11] i2c: pxa: No need to set slave addr for i2c master mode reset Date: Tue, 7 Jul 2015 00:54:46 +0530 Message-Id: <1436210695-19159-3-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436210695-19159-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1436210695-19159-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150706_122807_072807_91217A36 X-CRM114-Status: GOOD ( 11.09 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, wsa@the-dreams.de, linux-kernel@vger.kernel.org, Vaibhav Hiremath , "Jett.Zhou" , robh+dt@kernel.org, robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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 Signed-off-by: Vaibhav Hiremath Acked-by: Robert Jarzmik --- drivers/i2c/busses/i2c-pxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index f4ac8c5..023e59f 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -459,7 +459,7 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c) writel(I2C_ISR_INIT, _ISR(i2c)); writel(readl(_ICR(i2c)) & ~ICR_UR, _ICR(i2c)); - if (i2c->reg_isar) + if (i2c->reg_isar && IS_ENABLED(CONFIG_I2C_PXA_SLAVE)) writel(i2c->slave_addr, _ISAR(i2c)); /* set control register values */