Re: [PATCH v2] docs: i2c: Fix return value of i2c_smbus_xxx functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > -All these transactions return -1 on failure; you can read errno to see
> > > -what happened. The 'write' transactions return 0 on success; the
> > > -'read' transactions return the read value, except for read_block, which
> > > -returns the number of values read. The block buffers need not be longer
> > > -than 32 bytes.
> > > +All these transactions return a negative error number on failure.
> > > +The 'write' transactions return 0 on success; the 'read' transactions
> > > +return the read value, except for read_block, which returns the number
> > > +of values read. The block buffers need not be longer than 32 bytes.  
> > 
> > I think the correct solution is to remove this paragraph entirely.
> > Because the returned value does not depend on the kernel but on the
> > libi2c version. Check this commit from 2012 in the i2c-tools repo:
> > 
> > 330bba2 ("libi2c: Properly propagate real error codes on read errors")
> > 
> > So, I think we should document it there. Jean, what do you think?
> 
> I would go further and move half of the document to i2c-tools. i2c-dev
> itself only provides the ioctls. Everything on top of that is in libi2c
> now, so the kernel documentation should point to libi2c and the
> detailed documentation should come with libi2c.
> 
> So I guess I should review the whole document now to see what needs to
> be updated, what should stay, and what should move.

Maybe you can collaborate with Luca on this who just revamped a lot of
the docs? Putting him on CC and marking this patch as 'Deferred'.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux