aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 06a8d9c7de98..f1e3ff5880a9 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -29,7 +29,6 @@
29#include <linux/types.h> 29#include <linux/types.h>
30#ifdef __KERNEL__ 30#ifdef __KERNEL__
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/i2c-id.h>
33#include <linux/mod_devicetable.h> 32#include <linux/mod_devicetable.h>
34#include <linux/device.h> /* for struct device */ 33#include <linux/device.h> /* for struct device */
35#include <linux/sched.h> /* for completion */ 34#include <linux/sched.h> /* for completion */
@@ -105,8 +104,8 @@ extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client,
105/** 104/**
106 * struct i2c_driver - represent an I2C device driver 105 * struct i2c_driver - represent an I2C device driver
107 * @class: What kind of i2c device we instantiate (for detect) 106 * @class: What kind of i2c device we instantiate (for detect)
108 * @attach_adapter: Callback for bus addition (for legacy drivers) 107 * @attach_adapter: Callback for bus addition (deprecated)
109 * @detach_adapter: Callback for bus removal (for legacy drivers) 108 * @detach_adapter: Callback for bus removal (deprecated)
110 * @probe: Callback for device binding 109 * @probe: Callback for device binding
111 * @remove: Callback for device unbinding 110 * @remove: Callback for device unbinding
112 * @shutdown: Callback for device shutdown 111 * @shutdown: Callback for device shutdown
@@ -144,11 +143,11 @@ struct i2c_driver {
144 unsigned int class; 143 unsigned int class;
145 144
146 /* Notifies the driver that a new bus has appeared or is about to be 145 /* Notifies the driver that a new bus has appeared or is about to be
147 * removed. You should avoid using this if you can, it will probably 146 * removed. You should avoid using this, it will be removed in a
148 * be removed in a near future. 147 * near future.
149 */ 148 */
150 int (*attach_adapter)(struct i2c_adapter *); 149 int (*attach_adapter)(struct i2c_adapter *) __deprecated;
151 int (*detach_adapter)(struct i2c_adapter *); 150 int (*detach_adapter)(struct i2c_adapter *) __deprecated;
152 151
153 /* Standard driver model interfaces */ 152 /* Standard driver model interfaces */
154 int (*probe)(struct i2c_client *, const struct i2c_device_id *); 153 int (*probe)(struct i2c_client *, const struct i2c_device_id *);
@@ -354,7 +353,6 @@ struct i2c_algorithm {
354 */ 353 */
355struct i2c_adapter { 354struct i2c_adapter {
356 struct module *owner; 355 struct module *owner;
357 unsigned int id __deprecated;
358 unsigned int class; /* classes to allow probing for */ 356 unsigned int class; /* classes to allow probing for */
359 const struct i2c_algorithm *algo; /* the algorithm to access the bus */ 357 const struct i2c_algorithm *algo; /* the algorithm to access the bus */
360 void *algo_data; 358 void *algo_data;
@@ -396,6 +394,8 @@ i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter)
396 return NULL; 394 return NULL;
397} 395}
398 396
397int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *));
398
399/* Adapter locking functions, exported for shared pin cases */ 399/* Adapter locking functions, exported for shared pin cases */
400void i2c_lock_adapter(struct i2c_adapter *); 400void i2c_lock_adapter(struct i2c_adapter *);
401void i2c_unlock_adapter(struct i2c_adapter *); 401void i2c_unlock_adapter(struct i2c_adapter *);
@@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client);
447extern void i2c_clients_command(struct i2c_adapter *adap, 447extern void i2c_clients_command(struct i2c_adapter *adap,
448 unsigned int cmd, void *arg); 448 unsigned int cmd, void *arg);
449 449
450extern struct i2c_adapter *i2c_get_adapter(int id); 450extern struct i2c_adapter *i2c_get_adapter(int nr);
451extern void i2c_put_adapter(struct i2c_adapter *adap); 451extern void i2c_put_adapter(struct i2c_adapter *adap);
452 452
453 453