viafb: rework the I2C support in the VIA framebuffer driver
commit277d32a36cba0b42c9c6836ff07f9b978566e95c
authorHarald Welte <laforge@gnumonks.org>
Fri, 22 May 2009 16:35:39 +0000 (23 00:35 +0800)
committerJonathan Corbet <corbet@lwn.net>
Tue, 27 Apr 2010 19:01:45 +0000 (27 13:01 -0600)
tree7161c2ddeb6064a42ba4babe3678a0493ecf6365
parentc205d932530719d2a6ddb9152650e5bbe80c9400
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>
drivers/video/via/dvi.c
drivers/video/via/lcd.c
drivers/video/via/via_i2c.c
drivers/video/via/via_i2c.h
drivers/video/via/viafbdev.c
drivers/video/via/viafbdev.h
drivers/video/via/vt1636.c
drivers/video/via/vt1636.h