via: Do not attempt I/O on inactive I2C adapters
[deliverable/linux.git] / drivers / video / via / via_i2c.h
index 73d682fcf269b9c9b545a1ce222ea7eb86f2d308..1d18e7d57b7f7fcdec98f60b30c768377fb3d6a6 100644 (file)
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
 
-enum via_i2c_type {
-       VIA_I2C_NONE,
-       VIA_I2C_I2C,
-       VIA_I2C_GPIO,
-};
-
-/* private data for each adapter */
-struct via_i2c_adap_cfg {
-       enum via_i2c_type       type;
-       u_int16_t               io_port;
-       u_int8_t                ioport_index;
-       u8                      is_active;
-};
-
 struct via_i2c_stuff {
        u16 i2c_port;                   /* GPIO or I2C port */
+       u16 is_active;                  /* Being used as I2C? */
        struct i2c_adapter adapter;
        struct i2c_algo_bit_data algo;
 };
 
-enum viafb_i2c_adap {
-       VIA_I2C_ADAP_26,
-       VIA_I2C_ADAP_31,
-       VIA_I2C_ADAP_25,
-       VIA_I2C_ADAP_2C,
-       VIA_I2C_ADAP_3D,
-};
 
 int viafb_i2c_readbyte(u8 adap, u8 slave_addr, u8 index, u8 *pdata);
 int viafb_i2c_writebyte(u8 adap, u8 slave_addr, u8 index, u8 data);
 int viafb_i2c_readbytes(u8 adap, u8 slave_addr, u8 index, u8 *buff, int buff_len);
 
-struct viafb_par;
-int viafb_create_i2c_busses(struct viafb_par *par);
-void viafb_delete_i2c_busses(struct viafb_par *par);
+extern int viafb_i2c_init(void);
+extern void viafb_i2c_exit(void);
 #endif /* __VIA_I2C_H__ */
This page took 0.024984 seconds and 5 git commands to generate.