summaryrefslogtreecommitdiff
path: root/drivers/video/via/via_i2c.h
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2009-12-01 20:29:39 -0700
committerJonathan Corbet <corbet@lwn.net>2010-05-07 17:15:47 -0600
commitf045f77bc0bf238a871b10bea9e425329a8e4abc (patch)
tree085c6651bc6f4d47f4b4659fa4ef4134fe40733f /drivers/video/via/via_i2c.h
parent4da62e6c6e056d709e5dc04ac7c5e81692cf924f (diff)
downloadlwn-f045f77bc0bf238a871b10bea9e425329a8e4abc.tar.gz
lwn-f045f77bc0bf238a871b10bea9e425329a8e4abc.zip
viafb: Move core stuff into via-core.c
The first step toward turning viafb into a multifunction driver. This patch creates a new via-core.c file which serves as the main PCI driver; everything else comes below that. Some work has been done to rationalize the i2c drivers in this new scheme. 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.h')
-rw-r--r--drivers/video/via/via_i2c.h26
1 files changed, 3 insertions, 23 deletions
diff --git a/drivers/video/via/via_i2c.h b/drivers/video/via/via_i2c.h
index 73d682fcf269..00932914b4ed 100644
--- a/drivers/video/via/via_i2c.h
+++ b/drivers/video/via/via_i2c.h
@@ -24,39 +24,19 @@
#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 */
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);
+int viafb_create_i2c_busses(struct via_port_cfg *cfg);
+void viafb_delete_i2c_busses(void);
+struct i2c_adapter *viafb_find_adapter(enum viafb_i2c_adap which);
#endif /* __VIA_I2C_H__ */