diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-20 17:54:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-20 17:54:13 -0700 |
commit | 444699c8503eaeb0cf15e24ad76f69b14df6097a (patch) | |
tree | a3c0573601942d86b1d4c1be4d446f31dfc78f5e /include/linux/i2c.h | |
parent | 6113f39dd15e4beb5ce66a8e0d9062477c5e81e3 (diff) | |
parent | 662cda8abb278f58237fa12b8ab3060ebefca4b8 (diff) |
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c-i801: SMBus patch for Intel DH89xxCC DeviceIDs
i2c: Drop i2c_adapter.id
i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter
i2c-dev: Use standard bus notification mechanism
i2c: Export i2c_for_each_dev
i2c: Get rid of <linux/i2c-id.h>
i2c: Minor fixes to upgrading-clients document
i2c: make i2c_get_adapter prototype clearer
i2c: Fix typo in instantiating-devices document
i2c-boardinfo: Fix typo in comment
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 06a8d9c7de9..f1e3ff5880a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -29,7 +29,6 @@ #include <linux/types.h> #ifdef __KERNEL__ #include <linux/module.h> -#include <linux/i2c-id.h> #include <linux/mod_devicetable.h> #include <linux/device.h> /* for struct device */ #include <linux/sched.h> /* for completion */ @@ -105,8 +104,8 @@ extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, /** * struct i2c_driver - represent an I2C device driver * @class: What kind of i2c device we instantiate (for detect) - * @attach_adapter: Callback for bus addition (for legacy drivers) - * @detach_adapter: Callback for bus removal (for legacy drivers) + * @attach_adapter: Callback for bus addition (deprecated) + * @detach_adapter: Callback for bus removal (deprecated) * @probe: Callback for device binding * @remove: Callback for device unbinding * @shutdown: Callback for device shutdown @@ -144,11 +143,11 @@ struct i2c_driver { unsigned int class; /* Notifies the driver that a new bus has appeared or is about to be - * removed. You should avoid using this if you can, it will probably - * be removed in a near future. + * removed. You should avoid using this, it will be removed in a + * near future. */ - int (*attach_adapter)(struct i2c_adapter *); - int (*detach_adapter)(struct i2c_adapter *); + int (*attach_adapter)(struct i2c_adapter *) __deprecated; + int (*detach_adapter)(struct i2c_adapter *) __deprecated; /* Standard driver model interfaces */ int (*probe)(struct i2c_client *, const struct i2c_device_id *); @@ -354,7 +353,6 @@ struct i2c_algorithm { */ struct i2c_adapter { struct module *owner; - unsigned int id __deprecated; unsigned int class; /* classes to allow probing for */ const struct i2c_algorithm *algo; /* the algorithm to access the bus */ void *algo_data; @@ -396,6 +394,8 @@ i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter) return NULL; } +int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *)); + /* Adapter locking functions, exported for shared pin cases */ void i2c_lock_adapter(struct i2c_adapter *); void i2c_unlock_adapter(struct i2c_adapter *); @@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client); extern void i2c_clients_command(struct i2c_adapter *adap, unsigned int cmd, void *arg); -extern struct i2c_adapter *i2c_get_adapter(int id); +extern struct i2c_adapter *i2c_get_adapter(int nr); extern void i2c_put_adapter(struct i2c_adapter *adap); |