From: Wolfram Sang <wsa@the-dreams.de>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: allow building emev2 without slave mode again
Date: Sat, 12 Dec 2015 16:20:57 +0000 [thread overview]
Message-ID: <20151212162057.GA1530@katana> (raw)
In-Reply-To: <2592093.cGKEcKVqLU@wuerfel>
[-- Attachment #1: Type: text/plain, Size: 964 bytes --]
Hi Arnd,
thanks for looking into this, but I don't get your point yet.
> The slave_cb callback function is supposed to set the 'value'
> here,
Only if a master wants to READ from us.
> but it might return an error not assign the pointer,
An error is only returned if a WRITE from a master was not accepted by
the slave backend.
> It might be best to change the callback to return 'void' and not
> allow it to fail.
We need that because in case of an errno, the slave should send NACK to
the master instead of ACK.
> At least the eeprom slave cannot fail anyway, and it is the only
> implementation we have at the moment.
True. But giving a slave the possibility to NACK a write should be
present IMO.
> Alternatively, the inline could return an error, and both bus
> drivers check for the error before using 'value'.
Hum, it does return an error?
return client->slave_cb(client, event, val);
You probably mean something else?
Regards,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-12-12 16:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 13:14 [PATCH] i2c: allow building emev2 without slave mode again Arnd Bergmann
2015-12-10 13:34 ` Wolfram Sang
2015-12-10 13:51 ` Arnd Bergmann
2015-12-10 14:54 ` kbuild test robot
2015-12-10 15:06 ` Arnd Bergmann
2015-12-10 15:17 ` Wolfram Sang
2015-12-12 16:20 ` Wolfram Sang [this message]
2015-12-12 21:05 ` Arnd Bergmann
2015-12-13 9:09 ` Wolfram Sang
2015-12-14 12:02 ` Arnd Bergmann
2015-12-14 13:52 ` Wolfram Sang
2015-12-14 22:27 ` Arnd Bergmann
2015-12-17 12:01 ` Wolfram Sang
2015-12-17 14:48 ` Arnd Bergmann
2015-12-17 19:40 ` Wolfram Sang
2015-12-17 19:57 ` Arnd Bergmann
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=20151212162057.GA1530@katana \
--to=wsa@the-dreams.de \
--cc=linux-arm-kernel@lists.infradead.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).