From patchwork Fri Jul 3 00:15:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 490839 X-Patchwork-Delegate: sjg@chromium.org 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 0A6F5140771 for ; Fri, 3 Jul 2015 10:17:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=diJKYQlm; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 403714B6CA; Fri, 3 Jul 2015 02:17:48 +0200 (CEST) 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 0DeOLg6WH4tw; Fri, 3 Jul 2015 02:17:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C71744B6D4; Fri, 3 Jul 2015 02:17:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AAEC14B694 for ; Fri, 3 Jul 2015 02:17:02 +0200 (CEST) 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 YG_SbGyc8Krl for ; Fri, 3 Jul 2015 02:17:02 +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 mail-ig0-f181.google.com (mail-ig0-f181.google.com [209.85.213.181]) by theia.denx.de (Postfix) with ESMTPS id 1DCDB4B635 for ; Fri, 3 Jul 2015 02:16:58 +0200 (CEST) Received: by igcur8 with SMTP id ur8so132334457igc.0 for ; Thu, 02 Jul 2015 17:16:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=q0Fm++hcsk04M2LUp/B+xhbor4wysyAPPBHE4Vbqf7M=; b=diJKYQlmmSvpWaF6Kqwfw31nPC0dY0lkEhzKoB0Lx4uFpDaHYozsu5To5DJ3Z4kwdy kjOcHONz0H9my4T9y+a2hTUpx5TYbeeOGXYXPn8J7vEGoU8qhH/iSWtIFvHUrbDvjTMy j5yuRNkRF3cvxOzhnGfH2DsQ1E7VhRDH8crgTqNCCxyJLxATCaPFNjK47K985A5TUepM g0lDEfEyNeAJECdTXu8yUGfmr9AbBp/DC3XEmx+qhe2/8oOsG5rpl4fPSV/s36MKE1iI lNGHQc7dGwB6orDkbJ0U16sLQeKQoYVHpihNok6GDOn39wEPnkl+AM/NabzLVyOpLNaY LDBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=q0Fm++hcsk04M2LUp/B+xhbor4wysyAPPBHE4Vbqf7M=; b=cajzxh2lJTLbBZcS2g/rbdteJIG2Y2y7y2OJNwvXyNTvFmmUZsytl4t8Zc4bcl1zI/ ELpMof/UcCw7jTJkGjtS+72LIj3fSLdDxPkGi9G/n/NPiAGEyyGljLvhzjALR5PITr7+ Ifl+mLMU8Tg2q4nuzdEkBma6Ke/vqW6g4sNMq3QlEWRTHCO6XvUsGnOLsOluqi4Ybgtg +wI04CyW5pWKWK9LKGAwca8P2FrqyaNBxcsjO4ft1duWKs5iosjFAKqO5QfGbqUrWGZO Reolf0Ec6iMfkYkFkGamdnof2M83JPxCiVFwdJ+zyCds95BoVR2LS5CjG+51Zy0PWMQ7 D6sw== X-Gm-Message-State: ALoCoQkHo4ozPjY05murz3iZlyI+I4AwzpSLNXZYrtkFmv6aNSxfsx8GMGPTfVA4U3Z+0jjlMwqw X-Received: by 10.107.156.140 with SMTP id f134mr12517824ioe.34.1435882616951; Thu, 02 Jul 2015 17:16:56 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id k2sm6545168ige.1.2015.07.02.17.16.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 17:16:55 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id B0782220E59; Thu, 2 Jul 2015 18:16:52 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 2 Jul 2015 18:15:46 -0600 Message-Id: <1435882592-487-10-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.4.3.573.g4eafbef In-Reply-To: <1435882592-487-1-git-send-email-sjg@chromium.org> References: <1435882592-487-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 09/55] exynos: i2c: Fix code style with ReadWriteByte() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function should not use mixed case, and it is simpler to use clrbits_le32() when clearing bits. Fix it. Signed-off-by: Simon Glass Acked-by: Heiko Schocher --- drivers/i2c/s3c24x0_i2c.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 9a04e48..4bbd012 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -258,9 +258,9 @@ static int hsi2c_wait_for_trx(struct exynos5_hsi2c *i2c) return I2C_NOK_TOUT; } -static void ReadWriteByte(struct s3c24x0_i2c *i2c) +static void read_write_byte(struct s3c24x0_i2c *i2c) { - writel(readl(&i2c->iiccon) & ~I2CCON_IRPND, &i2c->iiccon); + clrbits_le32(&i2c->iiccon, I2CCON_IRPND); } #ifdef CONFIG_SYS_I2C @@ -794,7 +794,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c, if (addr && addr_len) { while ((i < addr_len) && (result == I2C_OK)) { writel(addr[i++], &i2c->iicds); - ReadWriteByte(i2c); + read_write_byte(i2c); result = WaitForXfer(i2c); } i = 0; @@ -806,7 +806,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c, case I2C_WRITE: while ((i < data_len) && (result == I2C_OK)) { writel(data[i++], &i2c->iicds); - ReadWriteByte(i2c); + read_write_byte(i2c); result = WaitForXfer(i2c); } break; @@ -822,7 +822,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c, /* Generate a re-START. */ writel(I2C_MODE_MR | I2C_TXRX_ENA | I2C_START_STOP, &i2c->iicstat); - ReadWriteByte(i2c); + read_write_byte(i2c); result = WaitForXfer(i2c); if (result != I2C_OK) @@ -835,7 +835,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c, writel(readl(&i2c->iiccon) & ~I2CCON_ACKGEN, &i2c->iiccon); - ReadWriteByte(i2c); + read_write_byte(i2c); result = WaitForXfer(i2c); data[i++] = readl(&i2c->iicds); } @@ -852,7 +852,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c, bailout: /* Send STOP. */ writel(I2C_MODE_MR | I2C_TXRX_ENA, &i2c->iicstat); - ReadWriteByte(i2c); + read_write_byte(i2c); return result; }