From: Rajendra Nayak Date: Mon, 23 Nov 2009 16:59:18 +0000 (-0800) Subject: i2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode X-Git-Tag: v2.6.33-rc1~339^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef871432e1334dea4c79f9875f4db87cee7b9b50;p=pandora-kernel.git i2c-omap: OMAP3: PM: (re)init for every transfer to support off-mode Because of OMAP off-mode, powerdomain can go off when I2C is idle. Save enough state, and do a re-init for each transfer. Additional save/restore state added by Jagadeesh Bhaskar Pakaravoor (SYSC_REG) and Aaro Koskinen (wakeup sources.) Also, The OMAP3430 TRM states: "During active mode (I2Ci.I2C_CON[15] I2C_EN bit is set to 1), make no changes to the I2Ci.I2C_SCLL and I2Ci.I2C_SCLH registers. Changes may result in unpredictable behavior." Hence, the I2C_EN bit should be clearer when modifying these registers. Please note that clearing the entire I2C_CON register to disable the I2C module is safe, because the I2C_CON register is re-configured for each transfer. Signed-off-by: Jouni Hogander Signed-off-by: Rajendra Nayak Cc: Jagadeesh Bhaskar Pakaravoor Cc: Aaro Koskinen Cc: Jon Hunter Cc: Hu Tao Cc: Xiaolong Chen Signed-off-by: Kevin Hilman Signed-off-by: Ben Dooks --- Reading git-diff-tree failed