The i2c protocol needs a way to indicate an i2c device doesn't exist
(which is not necessarily an error). Define GB_OP_NONEXISTENT to
indicate this, and updating the status<->errno mapping functions
accordingly.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
return -EINVAL;
case GB_OP_RETRY:
return -EAGAIN;
+ case GB_OP_NONEXISTENT:
+ return -ENODEV;
case GB_OP_MALFUNCTION:
return -EILSEQ;
case GB_OP_UNKNOWN_ERROR:
return GB_OP_RETRY;
case -EILSEQ:
return GB_OP_MALFUNCTION;
+ case -ENODEV:
+ return GB_OP_NONEXISTENT;
case -EIO:
default:
return GB_OP_UNKNOWN_ERROR;
GB_OP_OVERFLOW = 0x05,
GB_OP_INVALID = 0x06,
GB_OP_RETRY = 0x07,
+ GB_OP_NONEXISTENT = 0x08,
GB_OP_UNKNOWN_ERROR = 0xfe,
GB_OP_MALFUNCTION = 0xff,
};