Commit Graph

15 Commits

Author SHA1 Message Date
James Sullins
edc3cc50fe qup_i2c_pwr_mgmt: use non-sleeping clk_* 2012-02-26 17:25:15 -06:00
Pankaj Kumar
e375b8e7c0 qup_i2c: Remove Soc specific check while enabling CORE_ON_EN bit
Enabling of CORE_ON_EN bit in qup_i2c driver is not dependent on soc.
Same code will work for all. Hence remove the SOC specific part from the
function.

CRs-Fixed: 335884
Change-Id: I55054b0c17e1710c1d268322f1a78c42c94b3db8
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
2012-02-09 17:25:03 +05:30
Trilok Soni
f0274f1eee qup_i2c: Enabling CORE_ON_EN bit while disabling the QuPE PCLKs
To disable the GSBI QuPE PCLKs it is important to enable
the CORE_ON_EN bit for some targets like 7x27a.

CRs-Fixed: 302634
Change-Id: I309d7aa0de435b18658e3bb1a879368d06610c5e
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2012-02-07 13:15:32 +05:30
Harini Jayaraman
9fffe017e5 qup_i2c: Move to new clock APIs
Replace use of clk_enable() and clk_disable() with calls to
clk_prepare_enable() and clk_disable_unprepare(), respectively.

Change-Id: Ib29b5e4340f1a8cbde85efe3d129470788cbf0cd
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2012-01-25 10:47:51 -07:00
Harini Jayaraman
17f8e0e990 qup_i2c: Recovery mechanism for GSBI when slave pulls line low
If slave pulls one of the I2C lines low,I2C bus may lock out
failing I2C transactions for all slaves on the GSBI.
Recovery mechanism is added to recover the I2C lines when this
happens. Also, we allow clients to retry when a connection error
is returned.

Change-Id: I12675d828d0880ded292724416b5407427cdf73c
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-12-20 17:58:25 -07:00
Harini Jayaraman
be7e45d97a qup_i2c: Fix for multiple write transactions
When a transaction consists of multiple write requests, combine them
only when the addresses of the writes are the same.

Change-Id: I35089d7b3936acf2de28f075734da84069b83fb3
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-11-07 10:44:50 -07:00
Kenneth Heitke
6a852e9dfb qup_i2c: Calculate combined write length for multiple write transactions
When a transaction consists of multiple write requests, add up the total
length of the write requests.  If there is a read following the writes,
set the read mode appropriately.

Change-Id: I0c15e14fa4732e4e25f5bb885688662a066b8782
Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
2011-10-24 13:03:58 -06:00
Harini Jayaraman
24bea430d4 qup_i2c: Fix logical check on transaction flags
Change-Id: I2a45d1125ddf40a865a0d9a573f354428975062c
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-10-12 22:09:38 -06:00
Harini Jayaraman
d997b3b7a9 qup_i2c: Fix delay when polling for write ready
We wait for FIFO number of bytes to ensure that the
I2C state machine is not idle.

Change-Id: I24d2a22ac261bd1b53ca57a83c812c3c9f0fbdc4
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-10-11 14:40:01 -06:00
Harini Jayaraman
ee31ae9d8a qup_i2c: Fix Klocwork errors in I2C driver
Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-10-03 16:20:56 -07:00
Matt Wagantall
ac294855f6 msm: clock: Rename all I2C/SPI clocks to 'core_clk' or "iface_clk"
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-qrdc.c
	arch/arm/mach-msm/board-qt8660.c
2011-10-03 16:16:43 -07:00
Sagar Dharia
57ac1aca78 qup_i2c: Make sure QUP core is in RESET before disabling clocks
If dynamic HW gating is enabled, it's required to have the QUP core
in RESET state before HW gating can take effect.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2011-10-03 16:15:34 -07:00
Sagar Dharia
518e230f4a qup_i2c: Fix state check in polling code.
If QUP core is in PAUSE state then the state check returns true
for any other state incorrectly. Also, if the core is in RUN state
and it's being put in RESET, then RESET state check may return true
even if it's not out of RUN (and if VALID bit is set).
State mask is used to verify what state QUP core is in to avoid this
problem.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2011-10-03 10:29:06 -07:00
Harini Jayaraman
ce67cf8ea3 i2c-qup: Remove probe failure when msm_i2c_config_gpio is not defined
This avoids empty functions being defined in the boards file.

Signed-off-by: Harini Jayaraman <harinij@codeaurora.org>
2011-10-03 10:28:36 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00