diff options
author | Jonathan Corbet <corbet@lwn.net> | 2010-04-23 10:56:55 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-05-07 19:17:37 -0400 |
commit | b8f7e5d846387e3bcda35f3809856cf085740a24 (patch) | |
tree | 4ca50fc7021b056c3cddd83045861b1871bf669c /drivers/video/via/via_i2c.c | |
parent | b052d7f81fdd352a5d89ef1ac37a2c77f219463b (diff) |
viafb: Introduce viafb_find_i2c_adapter()
The camera driver will need this to look up a specific adapter.
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/via_i2c.c')
-rw-r--r-- | drivers/video/via/via_i2c.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/via/via_i2c.c b/drivers/video/via/via_i2c.c index c88450ee62ba..febc1dda69c1 100644 --- a/drivers/video/via/via_i2c.c +++ b/drivers/video/via/via_i2c.c | |||
@@ -157,6 +157,19 @@ int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len | |||
157 | return i2c_transfer(&via_i2c_par[adap].adapter, msgs, 2); | 157 | return i2c_transfer(&via_i2c_par[adap].adapter, msgs, 2); |
158 | } | 158 | } |
159 | 159 | ||
160 | /* | ||
161 | * Allow other viafb subdevices to look up a specific adapter | ||
162 | * by port name. | ||
163 | */ | ||
164 | struct i2c_adapter *viafb_find_i2c_adapter(enum viafb_i2c_adap which) | ||
165 | { | ||
166 | struct via_i2c_stuff *stuff = &via_i2c_par[which]; | ||
167 | |||
168 | return &stuff->adapter; | ||
169 | } | ||
170 | EXPORT_SYMBOL_GPL(viafb_find_i2c_adapter); | ||
171 | |||
172 | |||
160 | static int create_i2c_bus(struct i2c_adapter *adapter, | 173 | static int create_i2c_bus(struct i2c_adapter *adapter, |
161 | struct i2c_algo_bit_data *algo, | 174 | struct i2c_algo_bit_data *algo, |
162 | struct via_port_cfg *adap_cfg, | 175 | struct via_port_cfg *adap_cfg, |