i2c-eg20t: correct the driver init order of pch_i2c_probe()
authorFeng Tang <feng.tang@intel.com>
Tue, 29 Nov 2011 07:19:10 +0000 (15:19 +0800)
committerBen Dooks <ben-linux@fluff.org>
Sun, 18 Dec 2011 11:46:42 +0000 (11:46 +0000)
commit0d5fb5ea7d0e6bc84a523c39a666d7eb1a7e43de
treea8bc64c79cfcaa834ebe726ebed3f0648b6f12e2
parent1d5a34fe990c9e2e2f672b238ad881d0d4ed376b
i2c-eg20t: correct the driver init order of pch_i2c_probe()

Before registering an adapter to i2c subsystem, we need make sure
driver is ready for incoming i2c xfer, becasue the i2c_add_adapter()
may trigger a i2c device driver's proble function which may start
some real i2c xfer. I met this issue when integrating a TSC2007 i2c
touch screen device with the i2c-eg20t driver.

This patch will call request_irq() and hw init before calling
i2c_add_adapter().

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
drivers/i2c/busses/i2c-eg20t.c