aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viafbdev.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-05-22 12:35:39 -0400
committerJonathan Corbet <corbet@lwn.net>2010-04-27 15:01:45 -0400
commit277d32a36cba0b42c9c6836ff07f9b978566e95c (patch)
tree7161c2ddeb6064a42ba4babe3678a0493ecf6365 /drivers/video/via/viafbdev.h
parentc205d932530719d2a6ddb9152650e5bbe80c9400 (diff)
viafb: rework the I2C support in the VIA framebuffer driver
This patch changes the way how the various I2C busses are used internally inside the viafb driver: Previosuly, only a single i2c_adapter was created, even though two different hardware I2C busses are accessed: A structure member in a global variable was modified to indicate the bus to be used. Now, all existing hardware busses are registered with the i2c core, and the viafb_i2c_{read,write}byte[s]() function take the adapter number as function call parameter, rather than referring to the global structure member. [jc: even more painful merge with mainline changes ->2.6.34] [jc: painful merge with OLPC changes] Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/viafbdev.h')
-rw-r--r--drivers/video/via/viafbdev.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index 61b5953cd159..4bc00ec8fb1c 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -37,11 +37,13 @@
37#define VERSION_OS 0 /* 0: for 32 bits OS, 1: for 64 bits OS */ 37#define VERSION_OS 0 /* 0: for 32 bits OS, 1: for 64 bits OS */
38#define VERSION_MINOR 4 38#define VERSION_MINOR 4
39 39
40#define VIAFB_NUM_I2C 5
41
40struct viafb_shared { 42struct viafb_shared {
41 struct proc_dir_entry *proc_entry; /*viafb proc entry */ 43 struct proc_dir_entry *proc_entry; /*viafb proc entry */
42 44
43 /* I2C stuff */ 45 /* I2C stuff */
44 struct via_i2c_stuff i2c_stuff; 46 struct via_i2c_stuff i2c_stuff[VIAFB_NUM_I2C];
45 47
46 /* All the information will be needed to set engine */ 48 /* All the information will be needed to set engine */
47 struct tmds_setting_information tmds_setting_info; 49 struct tmds_setting_information tmds_setting_info;