linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
	Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH] i2c: (i2c-diolan-u2c) Fix master_xfer return code
Date: Sat, 18 Aug 2012 12:27:21 +0200	[thread overview]
Message-ID: <20120818102721.GF24812@pengutronix.de> (raw)
In-Reply-To: <1344527240-18266-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

On Thu, Aug 09, 2012 at 08:47:20AM -0700, Guenter Roeck wrote:
> The master_xfer function returns 0 on success. It should return the number of
> successful transactions.
> 
> Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

Applied to -current, thanks! To add something to the discussion, an
excerpt for i2c-core.c:

1357 int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
1358 {
1359         int ret;
1360 
1361         /* REVISIT the fault reporting model here is weak:
1362          *
1363          *  - When we get an error after receiving N bytes from a slave,
1364          *    there is no way to report "N".
1365          *
1366          *  - When we get a NAK after transmitting N bytes to a slave,
1367          *    there is no way to report "N" ... or to let the master
1368          *    continue executing the rest of this combined message, if
1369          *    that's the appropriate response.
1370          *
1371          *  - When for example "num" is two and we successfully complete
1372          *    the first message but get an error part way through the
1373          *    second, it's unclear whether that should be reported as
1374          *    one (discarding status on the second message) or errno
1375          *    (discarding status on the first one).
1376          */
1377 

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2012-08-18 10:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 15:47 [PATCH] i2c: (i2c-diolan-u2c) Fix master_xfer return code Guenter Roeck
     [not found] ` <1344527240-18266-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2012-08-10  5:58   ` Shubhrajyoti Datta
     [not found]     ` <CAM=Q2ctnrO6hJkPDa_daDRFNyig3+GVDkgW_MGMjV24jEM8T5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-10 17:06       ` Guenter Roeck
     [not found]         ` <20120810170624.GC29281-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2012-08-13  6:27           ` Shubhrajyoti Datta
     [not found]             ` <CAM=Q2ctzBg+o-3On8-i-T49Dg9H=_2Tv7Z9iZba6iErTQoLVXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-08-13 16:05               ` Guenter Roeck
2012-08-18 10:27   ` Wolfram Sang [this message]

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=20120818102721.GF24812@pengutronix.de \
    --to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@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).