Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Jul 12, 2005
2 parents 9f02d6b + ede7fbd commit 22a4427
Show file tree
Hide file tree
Showing 87 changed files with 565 additions and 523 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 17 additions & 5 deletions Documentation/i2c/chips/max6875
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Kernel driver max6875
=====================

Supported chips:
* Maxim max6874, max6875
Prefixes: 'max6875'
* Maxim MAX6874, MAX6875
Prefix: 'max6875'
Addresses scanned: 0x50, 0x52
Datasheets:
Datasheet:
http://pdfserv.maxim-ic.com/en/ds/MAX6874-MAX6875.pdf

Author: Ben Gardner <[email protected]>
Expand All @@ -23,14 +23,26 @@ Module Parameters
Description
-----------

The MAXIM max6875 is a EEPROM-programmable power-supply sequencer/supervisor.
The Maxim MAX6875 is an EEPROM-programmable power-supply sequencer/supervisor.
It provides timed outputs that can be used as a watchdog, if properly wired.
It also provides 512 bytes of user EEPROM.

At reset, the max6875 reads the configuration eeprom into its configuration
At reset, the MAX6875 reads the configuration EEPROM into its configuration
registers. The chip then begins to operate according to the values in the
registers.

The Maxim MAX6874 is a similar, mostly compatible device, with more intputs
and outputs:

vin gpi vout
MAX6874 6 4 8
MAX6875 4 3 5

MAX6874 chips can have four different addresses (as opposed to only two for
the MAX6875). The additional addresses (0x54 and 0x56) are not probed by
this driver by default, but the probe module parameter can be used if
needed.

See the datasheet for details on how to program the EEPROM.


Expand Down
15 changes: 9 additions & 6 deletions Documentation/i2c/dev-interface
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ C example
=========

So let's say you want to access an i2c adapter from a C program. The
first thing to do is `#include <linux/i2c.h>" and "#include <linux/i2c-dev.h>.
Yes, I know, you should never include kernel header files, but until glibc
knows about i2c, there is not much choice.
first thing to do is "#include <linux/i2c-dev.h>". Please note that
there are two files named "i2c-dev.h" out there, one is distributed
with the Linux kernel and is meant to be included from kernel
driver code, the other one is distributed with lm_sensors and is
meant to be included from user-space programs. You obviously want
the second one here.

Now, you have to decide which adapter you want to access. You should
inspect /sys/class/i2c-dev/ to decide this. Adapter numbers are assigned
Expand Down Expand Up @@ -78,7 +81,7 @@ Full interface description
==========================

The following IOCTLs are defined and fully supported
(see also i2c-dev.h and i2c.h):
(see also i2c-dev.h):

ioctl(file,I2C_SLAVE,long addr)
Change slave address. The address is passed in the 7 lower bits of the
Expand All @@ -97,10 +100,10 @@ ioctl(file,I2C_PEC,long select)
ioctl(file,I2C_FUNCS,unsigned long *funcs)
Gets the adapter functionality and puts it in *funcs.

ioctl(file,I2C_RDWR,struct i2c_ioctl_rdwr_data *msgset)
ioctl(file,I2C_RDWR,struct i2c_rdwr_ioctl_data *msgset)

Do combined read/write transaction without stop in between.
The argument is a pointer to a struct i2c_ioctl_rdwr_data {
The argument is a pointer to a struct i2c_rdwr_ioctl_data {

struct i2c_msg *msgs; /* ptr to array of simple messages */
int nmsgs; /* number of messages to exchange */
Expand Down
7 changes: 0 additions & 7 deletions Documentation/i2c/writing-clients
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ address.
static struct i2c_driver foo_driver = {
.owner = THIS_MODULE,
.name = "Foo version 2.3 driver",
.id = I2C_DRIVERID_FOO, /* from i2c-id.h, optional */
.flags = I2C_DF_NOTIFY,
.attach_adapter = &foo_attach_adapter,
.detach_client = &foo_detach_client,
Expand All @@ -37,12 +36,6 @@ static struct i2c_driver foo_driver = {
The name can be chosen freely, and may be upto 40 characters long. Please
use something descriptive here.

If used, the id should be a unique ID. The range 0xf000 to 0xffff is
reserved for local use, and you can use one of those until you start
distributing the driver, at which time you should contact the i2c authors
to get your own ID(s). Note that most of the time you don't need an ID
at all so you can just omit it.

Don't worry about the flags field; just put I2C_DF_NOTIFY into it. This
means that your driver will be notified when new adapters are found.
This is almost always what you want.
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,8 @@ source "drivers/char/Kconfig"

source "drivers/i2c/Kconfig"

source "drivers/hwmon/Kconfig"

#source "drivers/l3/Kconfig"

source "drivers/misc/Kconfig"
Expand Down
2 changes: 2 additions & 0 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ source "drivers/serial/Kconfig"

source "drivers/i2c/Kconfig"

source "drivers/hwmon/Kconfig"

source "drivers/usb/Kconfig"

endmenu
Expand Down
2 changes: 2 additions & 0 deletions arch/sparc64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ source "drivers/input/Kconfig"

source "drivers/i2c/Kconfig"

source "drivers/hwmon/Kconfig"

source "fs/Kconfig"

source "drivers/media/Kconfig"
Expand Down
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ source "drivers/i2c/Kconfig"

source "drivers/w1/Kconfig"

source "drivers/hwmon/Kconfig"

source "drivers/misc/Kconfig"

source "drivers/media/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ obj-$(CONFIG_INPUT) += input/
obj-$(CONFIG_I2O) += message/
obj-$(CONFIG_I2C) += i2c/
obj-$(CONFIG_W1) += w1/
obj-$(CONFIG_HWMON) += hwmon/
obj-$(CONFIG_PHONE) += telephony/
obj-$(CONFIG_MD) += md/
obj-$(CONFIG_BT) += bluetooth/
Expand Down
Loading

0 comments on commit 22a4427

Please sign in to comment.