From 37d7f421ce2d3ff357ecbed85d20e62bd2e7afcf Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Tue, 6 May 2003 03:16:26 -0700 Subject: [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. --- include/linux/i2c.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') 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! */ -- cgit v1.2.3