linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH RFT 1/5] i2c: sh_mobile: remove redundant initialization
Date: Thu,  2 Nov 2017 13:47:27 +0100	[thread overview]
Message-ID: <20171102124731.10484-2-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20171102124731.10484-1-wsa+renesas@sang-engineering.com>

Following the documentation, we initialize the HW before each START in
start_ch(). No need to do the same in activate_ch().

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/i2c/busses/i2c-sh_mobile.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 6f2aaeb7c4fa15..9d073e99c7e72d 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -303,16 +303,6 @@ static void activate_ch(struct sh_mobile_i2c_data *pd)
 	/* Wake up device and enable clock */
 	pm_runtime_get_sync(pd->dev);
 	clk_prepare_enable(pd->clk);
-
-	/* Enable channel and configure rx ack */
-	iic_set_clr(pd, ICCR, ICCR_ICE, 0);
-
-	/* Mask all interrupts */
-	iic_wr(pd, ICIC, 0);
-
-	/* Set the clock */
-	iic_wr(pd, ICCL, pd->iccl & 0xff);
-	iic_wr(pd, ICCH, pd->icch & 0xff);
 }
 
 static void deactivate_ch(struct sh_mobile_i2c_data *pd)
-- 
2.11.0

  reply	other threads:[~2017-11-02 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 12:47 [PATCH RFT 0/5] i2c: sh_mobile: refactor HW init/deinit Wolfram Sang
2017-11-02 12:47 ` Wolfram Sang [this message]
2017-11-02 12:47 ` [PATCH RFT 2/5] i2c: sh_mobile: remove redundant deinitialization Wolfram Sang
2017-11-02 12:47 ` [PATCH RFT 3/5] i2c: sh_mobile: manually "inline" two short functions Wolfram Sang
2017-11-06  8:35   ` Geert Uytterhoeven
2017-11-06  8:54     ` Wolfram Sang
2017-11-02 12:47 ` [PATCH RFT 4/5] i2c: sh_mobile: use direct writes when accessing ICE bit Wolfram Sang
2017-11-02 12:47 ` [PATCH RFT 5/5] i2c: sh_mobile: shorten exit of xfer routine Wolfram Sang
2017-11-03  9:15 ` [PATCH RFT 0/5] i2c: sh_mobile: refactor HW init/deinit jacopo mondi
2017-11-27 17:56 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171102124731.10484-2-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=jacopo@jmondi.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).