From patchwork Mon Jun 15 15:49:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 49873 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF211205DE for ; Mon, 15 Jun 2015 15:53:26 +0000 (UTC) Received: by wifx6 with SMTP id x6sf22399673wif.1 for ; Mon, 15 Jun 2015 08:53:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=yJKKs1XDOZjV89GiX75v15oAQIu64fUMA3v2429avuw=; b=YkmZw4ufzCpZyQjpung7p2BvskemVOtqzMWI7CYjOq2vpg0eceYN9CuNycZSvj8BE1 AkkJ+xXAnPMPUliUGFeNwQsLwECg9ZBnnwmJkr3MqSn9J6mAqgu/72KRFj+SA+xUwniV xE9jMGPiGYY4TmoVczGjF5MArCTUvqFUSa/xXRr548S7ulD5pKZBSBlgS/7ADwpLSXEL SPMyagzYlNtoLixeGIN8jFEZ5AIDUkCtzbmEzbbtpXwEoIwI3u2H1NxKy2ptk/52QcGV 0M8Z/A3YXFP8DYqqN4pgQSyuIXuy+d4iSBRfYX2sV0/Kx6Wo/WGRrQXdTVjIr4nDWa0j ObyQ== X-Gm-Message-State: ALoCoQkfs+gVnkoQs9F7m8riFJYkAKEoje36w/igiI5Z1sYhJJvQmhNeLoJ8K7qi7vDwgirTffZP X-Received: by 10.180.106.10 with SMTP id gq10mr20114818wib.0.1434383606276; Mon, 15 Jun 2015 08:53:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.194 with SMTP id 2ls936672law.0.gmail; Mon, 15 Jun 2015 08:53:26 -0700 (PDT) X-Received: by 10.152.6.132 with SMTP id b4mr14929587laa.53.1434383606110; Mon, 15 Jun 2015 08:53:26 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id t1si10807706lbk.72.2015.06.15.08.53.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 08:53:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laka10 with SMTP id a10so13204698lak.0 for ; Mon, 15 Jun 2015 08:53:26 -0700 (PDT) X-Received: by 10.112.234.200 with SMTP id ug8mr847722lbc.117.1434383605965; Mon, 15 Jun 2015 08:53:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1508724lbb; Mon, 15 Jun 2015 08:53:24 -0700 (PDT) X-Received: by 10.66.150.196 with SMTP id uk4mr50248501pab.54.1434383604041; Mon, 15 Jun 2015 08:53:24 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si18495084pdr.64.2015.06.15.08.53.23; Mon, 15 Jun 2015 08:53:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755800AbbFOPxW (ORCPT + 1 other); Mon, 15 Jun 2015 11:53:22 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33862 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754117AbbFOPxW (ORCPT ); Mon, 15 Jun 2015 11:53:22 -0400 Received: by pdbki1 with SMTP id ki1so75743527pdb.1 for ; Mon, 15 Jun 2015 08:53:21 -0700 (PDT) X-Received: by 10.68.135.136 with SMTP id ps8mr50274532pbb.78.1434383601706; Mon, 15 Jun 2015 08:53:21 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id fs16sm12662484pdb.12.2015.06.15.08.53.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 08:53:20 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, wsa@the-dreams.de, robert.jarzmik@free.fr, Vaibhav Hiremath , "Jett.Zhou" Subject: [PATCH-V2 02/12] i2c: pxa: No need to set slave addr for i2c master mode reset Date: Mon, 15 Jun 2015 21:19:49 +0530 Message-Id: <1434383399-2370-3-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> Sender: linux-i2c-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-i2c@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vaibhav.hiremath@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Cc: Wolfram Sang --- 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 */