~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/i2c/fault-codes.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/i2c/fault-codes.rst (Version linux-6.12-rc7) and /Documentation/i2c/fault-codes.rst (Version linux-4.18.20)


  1 =====================                             
  2 I2C/SMBUS Fault Codes                             
  3 =====================                             
  4                                                   
  5 This is a summary of the most important conven    
  6 codes in the I2C/SMBus stack.                     
  7                                                   
  8                                                   
  9 A "Fault" is not always an "Error"                
 10 ----------------------------------                
 11 Not all fault reports imply errors; "page faul    
 12 example.  Software often retries idempotent op    
 13 faults.  There may be fancier recovery schemes    
 14 some cases, such as re-initializing (and maybe    
 15 recovery, triggered by a fault report, there i    
 16                                                   
 17 In a similar way, sometimes a "fault" code jus    
 18 result for an operation ... it doesn't indicat    
 19 at all, just that the outcome wasn't on the "g    
 20                                                   
 21 In short, your I2C driver code may need to kno    
 22 to respond correctly.  Other code may need to     
 23 the right fault code, so that it can (in turn)    
 24                                                   
 25                                                   
 26 I2C and SMBus fault codes                         
 27 -------------------------                         
 28 These are returned as negative numbers from mo    
 29 some positive number indicating a non-fault re    
 30 numbers associated with these symbols differ b    
 31 though most Linux systems use <asm-generic/err    
 32                                                   
 33 Note that the descriptions here are not exhaus    
 34 codes that may be returned, and other cases wh    
 35 be returned.  However, drivers should not retu    
 36 cases (unless the hardware doesn't provide uni    
 37                                                   
 38 Also, codes returned by adapter probe methods     
 39 specific to their host bus (such as PCI, or th    
 40                                                   
 41                                                   
 42 EAFNOSUPPORT                                      
 43         Returned by I2C adapters not supportin    
 44         they are requested to use such an addr    
 45                                                   
 46 EAGAIN                                            
 47         Returned by I2C adapters when they los    
 48         transmit mode:  some other master was     
 49         data at the same time.                    
 50                                                   
 51         Also returned when trying to invoke an    
 52         atomic context, when some task is alre    
 53         to execute some other operation.          
 54                                                   
 55 EBADMSG                                           
 56         Returned by SMBus logic when an invali    
 57         is received.  This code is a CRC cover    
 58         transaction, and is sent before the te    
 59         fault is only reported on read transac    
 60         may have a way to report PEC mismatche    
 61         host.  Note that even if PECs are in u    
 62         on these as the only way to detect inc    
 63                                                   
 64 EBUSY                                             
 65         Returned by SMBus adapters when the bu    
 66         than allowed.  This usually indicates     
 67         SMBus adapter) needs some fault recove    
 68         or that the reset was attempted but fa    
 69                                                   
 70 EINVAL                                            
 71         This rather vague error means an inval    
 72         detected before any I/O operation was     
 73         specific fault code when you can.         
 74                                                   
 75 EIO                                               
 76         This rather vague error means somethin    
 77         performing an I/O operation.  Use a mo    
 78         code when you can.                        
 79                                                   
 80 ENODEV                                            
 81         Returned by driver probe() methods.  T    
 82         specific than ENXIO, implying the prob    
 83         address, but with the device found the    
 84         may verify the device returns *correct    
 85         return this as appropriate.  (The driv    
 86         about probe faults other than ENXIO an    
 87                                                   
 88 ENOMEM                                            
 89         Returned by any component that can't a    
 90         it needs to do so.                        
 91                                                   
 92 ENXIO                                             
 93         Returned by I2C adapters to indicate t    
 94         of a transfer didn't get an ACK.  Whil    
 95         an I2C device was temporarily not resp    
 96         means there's nothing listening at tha    
 97                                                   
 98         Returned by driver probe() methods to     
 99         found no device to bind to.  (ENODEV m    
100                                                   
101 EOPNOTSUPP                                        
102         Returned by an adapter when asked to p    
103         that it doesn't, or can't, support.       
104                                                   
105         For example, this would be returned wh    
106         doesn't support SMBus block transfers     
107         one.  In that case, the driver making     
108         have verified that functionality was s    
109         made that block transfer request.         
110                                                   
111         Similarly, if an I2C adapter can't exe    
112         messages, it should return this when a    
113         transaction it can't.  (These limitati    
114         the adapter's functionality mask, sinc    
115         that if an adapter supports I2C it sup    
116                                                   
117 EPROTO                                            
118         Returned when slave does not conform t    
119         or SMBus (or chip-specific) protocol s    
120         case is when the length of an SMBus bl    
121         (from the SMBus slave) is outside the     
122                                                   
123 ESHUTDOWN                                         
124         Returned when a transfer was requested    
125         which is already suspended.               
126                                                   
127 ETIMEDOUT                                         
128         This is returned by drivers when an op    
129         time, and was aborted before it comple    
130                                                   
131         SMBus adapters may return it when an o    
132         time than allowed by the SMBus specifi    
133         when a slave stretches clocks too far.    
134         timeouts, but it's normal for I2C adap    
135         arbitrary limits (much longer than SMB    
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php