]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: add write retry support for i2c
authorAlex Elder <elder@linaro.org>
Fri, 17 Oct 2014 10:09:21 +0000 (05:09 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 17 Oct 2014 16:15:23 +0000 (18:15 +0200)
commitd75286852bb3bd575bd8707f80ca0b362a7ae5a6
tree1e796ac9fc0585966e9d5f9999e7b7a5b4686fcb
parentbb2e1c9626c9bfe0b3558830a70681eaf1f71e2d
greybus: add write retry support for i2c

It is expected that i2c writes may fail, and in that case the driver
simply retries some number of times before actually treating it as a
failure.  Define a GB_OP_RETRY status, which is interpreted by the
i2c driver as an indication a retry is in order.  We just translate
that into an EAGAIN error passed back to the i2c core.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/i2c-gb.c
drivers/staging/greybus/operation.h