devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaedon Shin <jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	Kamal Dasu <kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
Cc: Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	Jaedon Shin <jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH 5/9] i2c: brcmstb: fix start and stop conditions
Date: Wed, 21 Oct 2015 11:36:57 +0900	[thread overview]
Message-ID: <1445395021-4204-6-git-send-email-jaedon.shin@gmail.com> (raw)
In-Reply-To: <1445395021-4204-1-git-send-email-jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Fixes conditions for RESTART, NOSTART and NOSTOP. The masks of start and
stop is already in brcmstb_set_i2c_start_stop(). Therefore, the caller
does not need a mask value.

Signed-off-by: Jaedon Shin <jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/i2c/busses/i2c-brcmstb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index 53eb8b0c9bad..dcd1209f843f 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -464,7 +464,7 @@ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter,
 			pmsg->buf ? pmsg->buf[0] : '0', pmsg->len);
 
 		if (i < (num - 1) && (msgs[i + 1].flags & I2C_M_NOSTART))
-			brcmstb_set_i2c_start_stop(dev, ~(COND_START_STOP));
+			brcmstb_set_i2c_start_stop(dev, 0);
 		else
 			brcmstb_set_i2c_start_stop(dev,
 						   COND_RESTART | COND_NOSTOP);
@@ -485,8 +485,7 @@ static int brcmstb_i2c_xfer(struct i2c_adapter *adapter,
 			bytes_to_xfer = min(len, N_DATA_BYTES);
 
 			if (len <= N_DATA_BYTES && i == (num - 1))
-				brcmstb_set_i2c_start_stop(dev,
-							   ~(COND_START_STOP));
+				brcmstb_set_i2c_start_stop(dev, 0);
 
 			rc = brcmstb_i2c_xfer_bsc_data(dev, tmp_buf,
 						       bytes_to_xfer, pmsg);
-- 
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-10-21  2:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21  2:36 [PATCH 0/9] i2c: brcmstb: add support for BMIPS_GENERIC Jaedon Shin
2015-10-21  2:36 ` [PATCH 1/9] i2c: brcmstb: make the driver buildable on BMIPS_GENERIC Jaedon Shin
2015-10-22  1:56   ` Florian Fainelli
2015-10-21  2:36 ` [PATCH 3/9] i2c: brcmstb: add missing parenthesis Jaedon Shin
2015-10-22  1:56   ` Florian Fainelli
2015-11-30 15:36     ` Wolfram Sang
2015-10-21  2:36 ` [PATCH 4/9] i2c: brcmstb: enable ACK condition Jaedon Shin
2015-11-30 15:37   ` Wolfram Sang
     [not found] ` <1445395021-4204-1-git-send-email-jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-21  2:36   ` [PATCH 2/9] i2c: brcmstb: fix typo in i2c-brcmstb Jaedon Shin
2015-10-22  1:56     ` Florian Fainelli
2015-10-21  2:36   ` Jaedon Shin [this message]
2015-11-30 15:41     ` [PATCH 5/9] i2c: brcmstb: fix start and stop conditions Wolfram Sang
2015-10-21  2:36   ` [PATCH 6/9] MIPS: BMIPS: brcmstb: add I2C node for bcm7346 Jaedon Shin
     [not found]     ` <1445395021-4204-7-git-send-email-jaedon.shin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-10-22  1:57       ` Florian Fainelli
2015-10-21  2:36 ` [PATCH 7/9] MIPS: BMIPS: brcmstb: add I2C node for bcm7358 Jaedon Shin
2015-10-22  1:57   ` Florian Fainelli
2015-10-21  2:37 ` [PATCH 8/9] MIPS: BMIPS: brcmstb: add I2C node for bcm7360 Jaedon Shin
2015-10-22  1:57   ` Florian Fainelli
2015-10-21  2:37 ` [PATCH 9/9] MIPS: BMIPS: brcmstb: add I2C node for bcm7362 Jaedon Shin
2015-10-22  1:57   ` Florian Fainelli

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=1445395021-4204-6-git-send-email-jaedon.shin@gmail.com \
    --to=jaedon.shin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kdasu.kdev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
    /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).