Commit graph

13 commits

Author SHA1 Message Date
Sam Hansen 40d802cb66 Documentation/i2c: adopt kernel commenting style in examples
The example I2C code is rewritten to adopt the preferred kernel block
commenting style.

Signed-off-by: Sam Hansen <hansens@google.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-04-18 10:09:44 +02:00
Sam Hansen b50cb3eaf7 Documentation/i2c: sync docs with current state of i2c-tools
Currently, Documentation/i2c/dev-interface describes the use of
i2c_smbus_* helper routines as static inlined functions provided by
linux/i2c-dev.h.  Work has been done to refactor the linux/i2c-dev.h file
in the i2c-tools project out into its own library.  As a result, these
docs have become stale.

This patch corrects the discrepancy and directs the reader to the
i2c-tools project for more information.

Signed-off-by: Sam Hansen <hansens@google.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-04-18 10:09:15 +02:00
Sam Hansen 675edea10b Documentation/i2c: whitespace cleanup
This strips trailing whitespace in Documentation/i2c/dev-interface.

Signed-off-by: Sam Hansen <hansens@google.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2018-04-18 10:07:59 +02:00
Cengiz C 91b28aeb17 i2c: update i2c-dev.h warning in documentation
`Documentation/i2c/dev-interface` gives examples for accessing i2c from
userspace.

There's a note that warns developers about the two `i2c-dev.h` header
files which were shipped with the kernel and i2c-tools separately.

However, following i2c-tools commits suggest that the header files are now
identical (in functionality) and `i2c_*` helper functions are now defined
in a separate header called `i2c/smbus.h`, which is distributed with
i2c-tools:

commit 652619121974 ("Minimize differences with kernel flavor")
commit 93caf007f4cb ("Move SMBus helper functions to include/i2c/smbus.h")

Thus, I've converted the warning paragraph into a historical note and
updated the suggested header files.

Signed-off-by: Cengiz Can <cengizc@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-12-21 13:39:30 -07:00
Wolfram Sang 984b292333 docs: i2c: dev-interface: adapt to new filenames of the i2c core
The I2C core files were renamed, adapt the textfile to it.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2017-05-31 21:01:05 +02:00
Masanari Iida 2e049d6132 Doc: i2c: Fix typo in Documentation/i2c
This path fix spelling typos found in Documentation/i2c.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-02-10 13:12:14 -07:00
Jose Manuel Alarcon Roldan 257d6ef4aa Documentation: i2c: rename variable "register" to "reg"
The example code provided with the i2c device interface documentation
won't compile since it uses the reserved word "register" to name a
variable.

The compiler fails with this error message:

 error: expected identifier or '(' before '=' token
   __u8 register = 0x20; /* Device register to access */
                 ^

Rename the variable "register" to simply "reg" in the example code.

Another couple of typos has been fixed as well.
[Change "! =" to "!=".]

Signed-off-by: Jose Alarcon Roldan <jose.alarcon.roldan@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-09-07 15:21:13 -07:00
Jean Delvare 7c15fd1249 i2c: Document the implementation details of the /dev interface
I wrote this explanation to answer a question on the i2c mailing list,
and thought it would be good to have in the kernel documentation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14 17:30:05 +02:00
Jean Delvare fceb2d0680 i2c: Improve dev-interface documentation
* Clarify some points.
* Point developers to i2c-tools instead of lm_sensors.
* Fix coding style in code examples.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14 17:30:05 +02:00
David Brownell 6662cbb989 i2c: Rename the PEC functionality bit
Rename I2C_FUNC_SMBUS_HWPEC_CALC as I2C_FUNC_SMBUS_PEC, and list that
functionality as always available through the software implementation.
Update documentation accordingly (and list similar requirements).

The way it's currently packaged doesn't present the capability in a
useful way.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-13 23:56:33 +02:00
Jean Delvare 1d772e2587 [PATCH] I2C: Clarify the usage of i2c-dev.h
Upon suggestion by Nils Roeder, here is an update to the i2c
documentation to clarify which header files user-space applications
relying on the i2c-dev interface should include.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-11 14:10:37 -07:00
Jan Veldeman a68e2f4895 [PATCH] I2C: Documentation fix
Fix documentation to match code in include/linux/i2c-dev.h

Signed-off-by: Jan Veldeman <jan@mind.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-07-11 14:10:37 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00