mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
i2c: add suspended flag and accessors for i2c adapters
A few drivers open code the handling of suspended adapters. It could be handled by the core, though, to ensure generic handling. This patch adds the flag and accessor functions. The usage of these helpers is optional, though. See the kerneldoc in this patch. Using the new flag, we now reject further transfers if the adapter is already marked suspended. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
bfeffd1552
commit
9ac6cb5fbb
3 changed files with 41 additions and 0 deletions
|
|
@ -112,6 +112,10 @@ EPROTO
|
|||
case is when the length of an SMBus block data response
|
||||
(from the SMBus slave) is outside the range 1-32 bytes.
|
||||
|
||||
ESHUTDOWN
|
||||
Returned when a transfer was requested using an adapter
|
||||
which is already suspended.
|
||||
|
||||
ETIMEDOUT
|
||||
This is returned by drivers when an operation took too much
|
||||
time, and was aborted before it completed.
|
||||
|
|
|
|||
Loading…
Reference in a new issue