linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaedon Shin <jaedon.shin@gmail.com>
To: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Florian Fainelli <f.fainelli@gmail.com>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH 4/9] i2c: brcmstb: enable ACK condition
Date: Thu, 14 Jul 2016 13:15:29 +0900	[thread overview]
Message-ID: <974DB801-538F-44AA-9ADD-239E9081077F@gmail.com> (raw)
In-Reply-To: <20151130153712.GO1513@katana>

Hi Kamal,

On Dec 1, 2015, at 12:37 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> 
> On Wed, Oct 21, 2015 at 11:36:56AM +0900, Jaedon Shin wrote:
>> Removes the condition of a message with under 32 bytes in length. The
>> messages that do not require an ACK are I2C_M_IGNORE_NAK flag.
> 
> Makes me wonder why it worked before? Kamal?
> 
>> 
>> Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
>> ---
>> drivers/i2c/busses/i2c-brcmstb.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
>> index 2d7d155029dc..53eb8b0c9bad 100644
>> --- a/drivers/i2c/busses/i2c-brcmstb.c
>> +++ b/drivers/i2c/busses/i2c-brcmstb.c
>> @@ -330,7 +330,7 @@ static int brcmstb_i2c_xfer_bsc_data(struct brcmstb_i2c_dev *dev,
>> 	int no_ack = pmsg->flags & I2C_M_IGNORE_NAK;
>> 
>> 	/* see if the transaction needs to check NACK conditions */
>> -	if (no_ack || len <= N_DATA_BYTES) {

Could you please explain why have NOACK with smaller transfer size? I don't find any 
reason about NOACK when smaller size, and the driver always operates NOACK by "len <= xfersz".

brcmstb_i2c_xfer(...)
{
	int xfersz = brcmstb_i2c_get_xfersz(dev);
	...
	bytes_to_xfer = min(len, xfersz);
	...
	brcmstb_i2c_xfer_bsc_data(..., bytes_to_xfer, ...);
	...

I have a plan for v2 that has for BMIPS_GENERIC and this patch with the latest driver.

Thanks!
--
Jaedon

>> +	if (no_ack) {
>> 		cmd = (pmsg->flags & I2C_M_RD) ? CMD_RD_NOACK
>> 			: CMD_WR_NOACK;
>> 		pi2creg->ctlhi_reg |= BSC_CTLHI_REG_IGNORE_ACK_MASK;
>> -- 
>> 2.6.1
>> 

  reply	other threads:[~2016-07-14  4:15 UTC|newest]

Thread overview: 23+ 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
     [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   ` [PATCH 5/9] i2c: brcmstb: fix start and stop conditions Jaedon Shin
2015-11-30 15:41     ` 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 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
2016-07-14  4:15     ` Jaedon Shin [this message]
2016-07-14 17:14       ` Kamal Dasu
2016-07-15  5:57         ` Wolfram Sang
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=974DB801-538F-44AA-9ADD-239E9081077F@gmail.com \
    --to=jaedon.shin@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=kdasu.kdev@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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).