diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/via/via_i2c.c | 13 | ||||
-rw-r--r-- | drivers/video/via/via_i2c.h | 1 |
2 files changed, 14 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, |
diff --git a/drivers/video/via/via_i2c.h b/drivers/video/via/via_i2c.h index 1d18e7d57b7f..44532e468c05 100644 --- a/drivers/video/via/via_i2c.h +++ b/drivers/video/via/via_i2c.h | |||
@@ -35,6 +35,7 @@ struct via_i2c_stuff { | |||
35 | int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata); | 35 | int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata); |
36 | int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data); | 36 | int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data); |
37 | int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len); | 37 | int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len); |
38 | struct i2c_adapter *viafb_find_i2c_adapter(enum viafb_i2c_adap which); | ||
38 | 39 | ||
39 | extern int viafb_i2c_init(void); | 40 | extern int viafb_i2c_init(void); |
40 | extern void viafb_i2c_exit(void); | 41 | extern void viafb_i2c_exit(void); |