summaryrefslogtreecommitdiff
path: root/drivers/i2c
AgeCommit message (Collapse)Author
2012-04-18i2c: tegra: support for I2C_M_NOSTART protocol manglingLaxman Dewangan
Adding support for protocol mangling I2C_M_NOSTART. Change-Id: I6cc0c96b3c374d452ea886a0f983dc5d31c4575c Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/92573 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-05i2c: tegra: Support for I2C_M_REV_DIR_ADDR protocol manglingLaxman Dewangan
Add support for protocol mangling "I2C_M_REV_DIR_ADDR" Change-Id: Icdef16885f1cf6ed1ce9c4003a94c2c2e917ced2 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/92572 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-04-03i2c: tegra: Fix to avoid possible race conditionChaitanya Bandi
Because of race condition between isr and tx fifo fill, duplicate data is being written. So added locking to make Tx fifo fill as atomic. Change-Id: Ia99466adadfb6d86a6f238ec4cd0aa13bd36e434 Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/90870 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-03i2c: tegra: Avoid duplicate write into Tx fifoChaitanya Bandi
Dvc I2C_DONE_INTR_EN interrupt bit is always enable into dvc control register3. During normal transaction on dvc i2c bus sometimes one transaction written two times in TX fifo buffer because of triggered dvc interrupt. This is causing to corrupt the next transaction header and send wrong address over dvc i2c bus. To solve this issue dvc i2c interrupt has to disable during filling of Tx fifo and enable after that. Updated the following things in code: (1) Add the code to mask/unmask I2C_DONE_INTR_EN into dvc control reg3 writing into Tx Fifo register. (2) Put delay before resetting the controller Hand-picked this change from: http://git-master/r/#change,39997 Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Change-Id: I16b5821e1d0d0cf8419ce9d239e794de9d5b47be Reviewed-on: http://git-master/r/89456 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-30i2c: tegra: Correct 10bit address configurationLaxman Dewangan
The slave address of device to be configured in packet header as follows: 7 bit address: PacketHeader3[7:1] 10 bit address: PacketHeader3[9:0] Fixing the code to make packet header3 properly. Change-Id: I1797066d23ada5d4d7b14710201a1fb17566b78b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/92556 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Andy Carman <acarman@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
2012-03-23i2c: tegra: Remove synchronization between init and isrChaitanya Bandi
Removed unnecessary synchronization between init and isr because clock driver is making sure that any operations will be completed before disabling the driver clock. Change-Id: I545e48be73697e023fedb8c663402c15e2a472df Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/91779 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-02-22i2c: tegra: clock control for fast clockLaxman Dewangan
I2c controller requires the clock for fast clock as a second clock source. This clock should be on during normal function of i2c controller. Making sure that i2c driver get this clock and hold the clock enable during data transfer. bug 933653 Change-Id: I676eee1f8a0e1dff81b17259abcd9644bcb0b394 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/78996 Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
2012-02-21i2c: tegra: Add connection name in clk_get_sysLaxman Dewangan
Adding the connection name of clock as "i2c-div" when i2c driver calls clk_get_sys() for getting clock data pointers. Change-Id: I3e7fa79ce6d51be189f1d93cb54af0d1b3425de8 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/84694 Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
2012-02-09tegra: i2c: do not flush fifo if msg length is 0Alexandre Courbot
Bug 915417 Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-on: http://git-master/r/74134 (cherry picked from commit 37018b3493d2d3006e38eb7a2f81cf47b111e5ea) Change-Id: I1f8bda8be92f3861fabc51c362e677497e1cb44f Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-on: http://git-master/r/79993 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-01-30tegra: i2c: Added high speed supportAlok Chauhan
Added i2c high speed support. Bug 873879 Reviewed-on: http://git-master/r/71997 Change-Id: I5a2c5f272485e6f7c8bb6c11d7c3b6850fdcd768 Signed-off-by: Alok Chauhan <alokc@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77741 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30tegra: i2c: mutex-protect access to is_suspendedAlexandre Courbot
Before making a transfer, is_suspended is checked to make sure the device is alive. However this check is done without holding the lock that the suspend and resume functions hold to change the suspend state, creating the possibility of a race condition. Bug 916336 Reviewed-on: http://git-master/r/70488 Change-Id: I7b4e52f686b0b372f3fc8ba7c7a4e4fdcdb6ba10 Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77740 Reviewed-by: Automatic_Commit_Validation_User
2012-01-04i2c: tegra:don't overwrite arb_recovery function pointerLinqiang Pu
put busses array as last struct member to avoid overwritting arb_recovery function pointer. Bug:889581 Reviewed-on: http://git-master/r/58347 (cherry picked from commit 223b2794fb0d3e94ccfb28549b74941a492415dd) Change-Id: I4e8792a0cb42255724c8e45baea4f273181a8e2f Signed-off-by: Linqiang Pu <dpu@nvidia.com> Reviewed-on: http://git-master/r/58942 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2011-12-30i2c: i2c-slave: Fix i2c_add_slave_adapter routineChaitanya Bandi
Fixed i2c_add_slave_adapter routine because id attribute has been dropped from adapter. Change-Id: I84a8d3a8fb3a16b772107a5d265cfadfb70dbaec Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Change-Id: I3181507404e929b48ba2f1f7290e423d1a07f559 Reviewed-on: http://git-master/r/70944 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-12-26Revert "i2c: tegra: use PM runtime framework"Varun Wadekar
This reverts commit fc56d07f59a3cafa33c31bf90a50af04a0235cf8.
2011-12-23i2c: tegra: use PM runtime frameworkPeter De Schrijver
Convert tegra i2c driver to use PM runtime framework. changes since last version: fix hang when using resume_noirq Change-Id: I1cce314ef4c06dbc7f1b3ddbdd1ad50255aa8b02 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-on: http://git-master/r/71192 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-14Merge branch 'linux-3.1.5' into android-tegra-nv-3.1Varun Wadekar
Conflicts: arch/arm/Kconfig Change-Id: If8aaaf3efcbbf6c9017b38efb6d76ef933f147fa Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-09i2c-algo-bit: Generate correct i2c address sequence for 10-bit targetJeffrey (Sheng-Hui) Chu
commit cc6bcf7d2ec2234e7b41770185e4dc826390185e upstream. The wrong bits were put on the wire, fix that. This fixes kernel bug #42562. Signed-off-by: Sheng-Hui J. Chu <jeffchu@broadcom.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08i2c: tegra: slave: Corrected slave address config routineChaitanya Bandi
Corrected the slave address configuration routine. Reviewed-on: http://git-master/r/66805 (cherry picked from commit 18e9409c1db3e3880435e4435f30ad5725e54cdb) Change-Id: Ia6b314e513a8bc33ca7782604c80d6686dfa260f Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/67604 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2011-11-30HACK merge fixups for compileDan Willemsen
Rebase-Id: Rbc628711479b187a90437bea94776066c7a58b54
2011-11-30gcov-kernel: Add GCOV_KERNEL := y to MakefilesJuha Tukkinen
These changes have no effect if CONFIG_GCOV_KERNEL is not set in defconfig. It is easier to trigger GCOV for kernel if this patch is in by only setting the before mentioned flag. Change-Id: I8aade309da2da62c4b3889bd84e4123ba8f182da Signed-off-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-on: http://git-master/r/62999 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R4c238f707f1db600f188ae83426336753992b7be
2011-11-30i2c: tegra: slave: Add runtime PM supportChaitanya Bandi
Add runtime PM support for i2c slave. Bug: 886802 Change-Id: I6649ab7e7b2e528d755e0a7167247a5a4440ef2f Reviewed-on: http://git-master/r/59928 Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com> Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R3db59ff198a0d124c3f8fe60b592630207e7ef80
2011-11-30i2c: tegra: slave: Fix i2c transmit/receive issuesChaitanya Bandi
Fixed the following issues in i2c slave driver: 1) Driver was failing to receive large data 2) Driver was receiving only eight bytes in a loop 3) Incorrect arguments while calling readl Change-Id: I5ffe76b800a24270845aced0df30a69d9625f557 Reviewed-on: http://git-master/r/57218 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Rebase-Id: Rc262503e24baad814f7175c88f9fa8a6671c34b9
2011-11-30i2c: fix crash when there is no regulatorJihoon Bang
Calling regulator_disable causes system to crash when there is no regualtor. It calls regulator_disable only when regulators exist. Bug 871860 Reviewed-on: http://git-master/r/55603 (cherry picked from commit 042e786e9766c891b44b8e00aa05f4c42b724440) Reviewed-on: http://git-master/r/56237 (cherry picked from commit 9607d33bfcb84f764935ea911b93e716018ab818) Change-Id: I06cfaeedcbdf276c3a17a759d410c7b46de8e9b1 Reviewed-on: http://git-master/r/57416 Reviewed-by: Jihoon Bang <jbang@nvidia.com> Tested-by: Jihoon Bang <jbang@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: Rb146536a30b5e0c1f06a1622e77248aa539617a8
2011-11-30i2c: add regulators to PCA954xJihoon Bang
Add regulators to PCA954x in case PCA954x is controlled by programmable PMIC. Add two Vcc. One is for PCA954x itself and the other is for I2C bus. Bug 871860 Reviewed-on: http://git-master/r/54745 (cherry picked from commit 7beddf4e72024e6f140ed306e80a7e1d19d7f36b) Reviewed-on: http://git-master/r/55800 (cherry picked from commit 57138283d20301658ffe904577a72e9ea95b053e) Change-Id: Ic98f33d2b8b324b7539d9b5b000a5591c5f7f742 Reviewed-on: http://git-master/r/57415 Reviewed-by: Jihoon Bang <jbang@nvidia.com> Tested-by: Jihoon Bang <jbang@nvidia.com> Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com> Rebase-Id: R9ece556f76ca88bfb74ceae1e6d520956c1b7d0a
2011-11-30i2c: tegra: Updated Arbitration lost recoveryAlok Chauhan
Updated arbitration lost recovery to accumulate i2c multiplexing. bug 854305 Original-Change-Id: I3f669c507980df78fa443c84b304d337bbe6a6da Reviewed-on: http://git-master/r/46630 Reviewed-by: Alok Chauhan <alokc@nvidia.com> Reviewed-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R987d84dcf51a3d8e366f2e4b2d0d278304e2db76
2011-11-30i2c: tegra: Added arbitration lost error recoveryAlok Chauhan
Added the arbitration lost error recovery code into i2c driver. bug 854305 Original-Change-Id: Ib855f3541d139c01ea34fd9070feef7969eed395 Reviewed-on: http://git-master/r/43201 Reviewed-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com> Reviewed-by: Alok Chauhan <alokc@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Rebase-Id: R7cda6214579416b3b0a4eafe412a18293260e669
2011-11-30Revert "i2c: tegra: Remove the synchronization between isr and caller"Alok Chauhan
This reverts commit 738c1a66079ee7db8e4365aa85819ccdef2592a8. This fixed the video recording system hang bug Bug 842901 Reviewed-on: http://git-master/r/39912 Rebase-Id: R183a5a9202ec65099503ddad913a25b139bd6d91
2011-11-30i2c: tegra: Remove the synchronization between isr and callerAlok Chauhan
Remove the handling of synchronisation between isr and caller. This change has become obsolete because now clock driver will make sure that any write operations will be completed before disabling the driver clock. Original-Change-Id: I95957351fd1f291a59182fddbb619ffd02a0db63 Reviewed-on: http://git-master/r/33099 Reviewed-by: Bo Yan <byan@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Alok Chauhan <alokc@nvidia.com> Rebase-Id: Rec9671e9283870630fda6ceb977b99b92c3a99a9
2011-11-30i2c: tegra: Making proper synchronization between isr and callerAlok Chauhan
Following are the changes: - Added a mechanism to handle synchronization between caller thread and isr so that isr should not get called when clock is disable or controller is in reset state. - Handling tx fifo overflow error. - Added delay before resetting the controller which is required if there is any error in previous transaction so proper stop signal will be generated. Original-Change-Id: I7ac121e056193cd4601f032cdabab59e7e0946ea Reviewed-on: http://git-master/r/30457 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Alok Chauhan <alokc@nvidia.com> Tested-by: Alok Chauhan <alokc@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Danielle Sun <dsun@nvidia.com> Tested-by: Danielle Sun <dsun@nvidia.com> Reviewed-by: Bo Yan <byan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R0e7b428de2b0b1567a23bcac3c53aa5cc9d8d4a9
2011-11-30i2c: tegra: Add more debug message in failure caseLaxman Dewangan
Added some more debug message to print during i2c transfer failure to get more information from log. This help to understand/analyse the issue quickly. Original-Change-Id: Ie957b9f2ad737da210722f2ea6f18da9a7b76813 Reviewed-on: http://git-master/r/30011 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rc40314cf7d257db51d98fba2dc94c8398fb2b8a9
2011-11-30i2c: clock: tegra: Removing unnecessary clock entryLaxman Dewangan
The clock table have two different entry for a given i2c controller. The second entry is not required and hence removing from table. Also removing the reference of this entry from driver. Original-Change-Id: Iab5f79bf5d1fea9363ef524258fb3ec262547691 Reviewed-on: http://git-master/r/29629 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Narendra Damahe <ndamahe@nvidia.com> Rebase-Id: R0265f605ec00f464eb9ec8d5ffe840a642592fab
2011-11-30Update copyrightsScott Williams
Original-Change-Id: I2ffeaf6f8dfeb279b40ca6f69f6c9157401a746a Rebase-Id: R84f13e4b66ba9711fcb92850fd5e800ef3248a3f
2011-11-30i2c: tegra: i2c-slave: Fixing initialization seqLaxman Dewangan
Following are changes: - Using the sysinit_call to initialize the driver. - Using device from master adapter for slave adpter. Original-Change-Id: I4dd0725694008a6aaee9a1d3a92d370a5c46de31 Reviewed-on: http://git-master/r/19249 Reviewed-by: Krishna Thota <kthota@nvidia.com> Tested-by: Krishna Thota <kthota@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Original-Change-Id: I62ba2e474d15764eccb2174444b194502e771307 Rebase-Id: Re845b3bac0f08ac25d0aa330acf0ee267ea8fcd4
2011-11-30i2c: tegra: suppporting clock enable always through platform data.Laxman Dewangan
To make the response fast from i2c, providing the option to enable clock of i2c always through platform data. Original-Change-Id: I89c9156fc97f92a45ce72626ccd77920e02ca356 Reviewed-on: http://git-master/r/19880 Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com> Reviewed-by: Ramachandrudu Kandhala <rkandhala@nvidia.com> Original-Change-Id: Ifaab9d7e052fb377abe27afdeb5c9cb4d19a6320 Rebase-Id: R15e2cfa9080024d9e2bbc8d966f5145766ee9e1a
2011-11-30[ARM] tegra: Implementing i2c slave driverLaxman Dewangan
Implementing i2c slave driver in the linux i2c framework. This driver will support the slave functionality on tegra i2c controller. Original-Change-Id: Ia56e3299605ab8705f2f82bf512195e7736214b3 Reviewed-on: http://git-master/r/14208 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Alok Chauhan <alokc@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I01b742f2c9477f0df476330e49163eda43a8d14f Rebase-Id: R0127682848aa0cf230cc63b29e8c2c712c4e28f3
2011-11-30[ARM]tegra:i2c: Adding i2c slave support apis.Laxman Dewangan
To support the i2c slave functionality in the kernel, adding the framework so that chip specific slave driver can be plugged in. Adding slave adapter and alogithms in framework so that slave bus driver can register chip specific driver. Original-Change-Id: Ie002dbd3b021f70814b455471e66a5da378ab3e9 Reviewed-on: http://git-master/r/14206 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Alok Chauhan <alokc@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I92b6bc4f3953a9edc7f9414a65b69005d2bbf8db Rebase-Id: R13abe740fa88a76747dcbcd42ffc9f74a504f7c5
2011-11-30[ARM] tegra i2c: Removing unnecessarily write on INT_STATUSAlok Chauhan
Removing the unnecessarily write in the interrupt status register to avoid controller status misbehave. bug 773262 Original-Change-Id: I15e2f3d5b377f44df5aae0fce9b55b2f3e7232b9 Reviewed-on: http://git-master/r/14223 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Alok Chauhan <alokc@nvidia.com> Tested-by: Alok Chauhan <alokc@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Original-Change-Id: I17d9b90b91d54248bb23f7426faececd856403ea Rebase-Id: R604a43169dbe3363cb9cb6d11c381aeeb502ea01
2011-11-30i2c: buses: tegra: assign unused address to i2c slaveNitin Kumbhar
New i2c slave should be configured with a non-zero i2c address. Configure i2c slave with an i2c address assigned by platform data for an i2c dev. BUG 788286 Reviewed-on: http://git-master/r/25100 (cherry picked from commit e6e0610c72ffce3b734e079faf88fad3f0468d07) Original-Change-Id: I440aa2cc72007d2835b2027c0b26089d0aad9263 Reviewed-on: http://git-master/r/25223 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rfac0b98a3aad6f7df4badd5554a63856212a580d
2011-11-30i2c: buses: tegra: use new cam_i2c slave controllerNitin Kumbhar
Use new cam_i2c slave (i2c2) instead of the legacy one. With old i2c slave controller, occasionally it generates spurious slave interrupts causing disruptions in i2c transfers. BUG 790315 Reviewed-on: http://git-master/r/24287 (cherry picked from commit 001805e9036b647e9a1220f2b50e8973ec28e917) Original-Change-Id: Icd5310286de0338a4458c26a8d491bcded032b03 Reviewed-on: http://git-master/r/24294 Tested-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R547c7338528aacebfb6b5258449dba31897552fc
2011-11-30i2c: buses: tegra: use new i2c slave controllerNitin Kumbhar
tegra2 has an improved new i2c slave controller. This should be used instead of the old i2c slave controller. With old i2c slave controller, occasionally it generates spurious slave interrupts causing disruptions in master i2c transfers. BUG 788286 BUG 804545 Reviewed-on: http://git-master/r/24107 (cherry picked from commit 64a6e1d5a555be1c330de80cfb477563ae061452) Original-Change-Id: Id5d5bd809df4a583a743d84a91aecbb78889a3c6 Reviewed-on: http://git-master/r/24246 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Re4b74bb7df316c939cb619da87d2f6fd1ccb35dc
2011-11-30i2c-tegra: Using suspend_noirq()/resume_noirq() for suspend/resume.Jubeom Kim
I2C driver needs to be suspended late and resumed early than other drivers. So, I2C driver uses the suspend_noirq/resume_noirq callbacks of struct dev_pm_ops for early/late power management system. Original-Change-Id: Ie2f453b96fb9ab9b16cafec79644fe5d3b982dd3 Reviewed-on: http://git-master/r/23347 Tested-by: Jubeom Kim <jubeomk@nvidia.com> Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R1126fb1683ac4f9138763e7981a0e36769f14738
2011-11-30i2c-tegra: Retry transfer when unexpected status is detectedJin Park
Sometimes unexpected status like I2C busy status, Tx FIFO interrupted and wait on Rx data etc is seen. Add a code to detect such conditions and return -EAGAIN from driver. This will cause the i2c-core to retry the transmission as per the retry count and time-out specified by the platform data of the adapter. Bug ID: 777455 Original-Change-Id: Iac5971bca4d760d93cd2ed147f78fc2807315b4e Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/16212 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R7c56bb575b1e7be19d1916124cdd86618c2f9c42
2011-11-30ARM: tegra: camera: add I2C_FUNC_SMBUS_BYTE required for pca953xPritesh Raithatha
Original-Change-Id: I4ce92b4f7784b01fc68f454a1768ff7dc5b1b51a Reviewed-on: http://git-master/r/11338 Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Tested-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Peter Zu <pzu@nvidia.com> Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com> Original-Rebase-Id: Rbae98a74cc8aad60cb8424f91ee4d6147c5d3587 This was partially upstreamed, now it's just adding dev_warn'ings.
2011-11-30i2c: busses: i2c-tegra: Fix multi-busColin Cross
Change-Id: I504d3d8833406db68cc0045d1dc37278d9ee8708 Signed-off-by: Colin Cross <ccross@android.com>
2011-11-30Fix i2c buildColin Cross
Change-Id: I558577e86654bc9a5a2cbfeeeb8055454ab8f328
2011-11-30i2c-tegra: add support for virtual busses with dynamic pinmuxingGary King
this adds support for dynamically reprogramming the I2C controller's pin mux on transaction boundaries to enable one controller to be registered as multiple I2C bus adapters with the kernel. this allows platform designers an additional tool to resolve clock rate, I/O voltage and electrical loading restrictions between the platform's peripherals. the i2c-tegra platform data is extended to support this; platforms which use this feature should pass in the number of busses which should be created for each controller, the starting adapter number to use and the clock rate and pin mux for each virtual bus. Change-Id: I57a96deb7b7b793222ec3f8cc3a941917a023609 Signed-off-by: Gary King <gking@nvidia.com>
2011-09-07i2c-tegra: fix possible race condition after txDoug Anderson
In tegra_i2c_fill_tx_fifo, once we have finished pushing all the bytes to the I2C hardware controller, the interrupt might happen before we have updated i2c_dev->msg_buf_remaining at the end of the function. Then, in tegra_i2c_isr, we will call again tegra_i2c_fill_tx_fifo triggering weird behaviour. This has been shown to happen under real conditions. Signed-off-by: Doug Anderson <dianders@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Acked-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-09-07i2c-tegra: add I2C_FUNC_SMBUS_EMULMike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-09-07i2c-tegra: Add of_match_tableJohn Bonesio
This patch was intended to be part of 7ca2d1a105a239e300b937e9c41a10a4bd08f569 "i2c: Tegra: Add DeviceTree support". However, an early version of that patch, which was missing a chunk, was applied to next-i2c. This change is that missing chunk. Signed-off-by: John Bonesio <bones@secretlab.ca> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-09-07i2c-pxa2xx: return proper error code in ce4100_i2c_probe error pathsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>