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: 50782 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BDC00229FC for ; Mon, 6 Jul 2015 19:28:21 +0000 (UTC) Received: by wipp2 with SMTP id p2sf35072412wip.2 for ; Mon, 06 Jul 2015 12:28:21 -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=hm0Jk3gcoWECS0pCzifLwc74uMuiR7wlprIMcsm535k=; b=Mehq3ssW1nj/rzW7bnshI3M1P89TvbgU+2xkpvSzRanhPWf4FztZ2v0mnBuoqLuQ6r dMoXDstZAkxVjC45+nE9E+JnOjw+gJSnFN9WIa+dgo1nuJ9Y8W1jcDaZS3vVw1FIx+TE cwYXmASPTgL3s7LEWsxLZOd//AcVhwJgj88Lj2k3aEmqFFS6N4TfAeXZbf0O1h7fVWvc RAcfHEEoq4Cr5gDJIEe7HGgbLIMh3/0qvaU2y0F45W2f1bZoD+6gX5ozNza5bTi11Z41 jWdKPJzR9R2PHj0FY/n63obpn+eMT3aDc5ZkvX6VOfdzKsXlaThmu/llDdCAEJchrMst dzDA== X-Gm-Message-State: ALoCoQkJ06Oj7ibadDw3DfhCVS2NJJurUMSzEwgy38Ysqn9m+0RQe+9Bm6nigB5ynYncR8MxRS8U X-Received: by 10.112.189.131 with SMTP id gi3mr228797lbc.6.1436210901037; Mon, 06 Jul 2015 12:28:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.39 with SMTP id p7ls206367lap.104.gmail; Mon, 06 Jul 2015 12:28:20 -0700 (PDT) X-Received: by 10.112.118.210 with SMTP id ko18mr393936lbb.75.1436210900806; Mon, 06 Jul 2015 12:28:20 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id y2si16055410lbp.38.2015.07.06.12.28.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 12:28:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by labgy5 with SMTP id gy5so15597187lab.2 for ; Mon, 06 Jul 2015 12:28:20 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr401601lac.41.1436210900262; Mon, 06 Jul 2015 12:28:20 -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 hn6csp1921238lbb; Mon, 6 Jul 2015 12:28:19 -0700 (PDT) X-Received: by 10.66.181.197 with SMTP id dy5mr767860pac.87.1436210898564; Mon, 06 Jul 2015 12:28:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si30478462pdm.244.2015.07.06.12.28.17; Mon, 06 Jul 2015 12:28:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S1755084AbbGFT2B (ORCPT + 29 others); Mon, 6 Jul 2015 15:28:01 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:34155 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754324AbbGFT1r (ORCPT ); Mon, 6 Jul 2015 15:27:47 -0400 Received: by pdbep18 with SMTP id ep18so110932511pdb.1 for ; Mon, 06 Jul 2015 12:27:46 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, wsa@the-dreams.de, robert.jarzmik@free.fr, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, Vaibhav Hiremath , "Jett.Zhou" 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.47 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 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 */