summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGerd Knorr <kraxel@bytesex.org>2003-05-06 03:16:26 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-05-06 03:16:26 -0700
commit37d7f421ce2d3ff357ecbed85d20e62bd2e7afcf (patch)
tree6d93fb0aab43acea6e15d176a604e558d5c1b1c9 /include/linux
parent22f0b1c04d049a47efcbdf387ad706d4786d78d8 (diff)
[PATCH] i2c #2/3: add i2c_clients_command
Changes: * adds a i2c_clients_command() function to i2c-core which calls the ->command() callback of all clients attached to a adapter. * make bttv + saa7134 drivers use that function instead of mucking with the i2c_adapter struct themself.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index b73144445657..15c94caeba74 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -334,6 +334,11 @@ extern struct i2c_client *i2c_get_client(int driver_id, int adapter_id,
extern int i2c_use_client(struct i2c_client *);
extern int i2c_release_client(struct i2c_client *);
+/* call the i2c_client->command() of all attached clients with
+ * the given arguments */
+extern void i2c_clients_command(struct i2c_adapter *adap,
+ unsigned int cmd, void *arg);
+
/* returns -EBUSY if address has been taken, 0 if not. Note that the only
other place at which this is called is within i2c_attach_client; so
you can cheat by simply not registering. Not recommended, of course! */