summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-mxs.c
AgeCommit message (Collapse)Author
2012-04-27i2c: mxs: disable QUEUE when sending is doneWolfram Sang
Since the last fixes to this driver ensure now the queue termination is done correctly, we can finally disable the queue after a transfer without problems. The gain is that it will only be reenabled after the next transfer is fully set up. Before, the queue was running all the time and if the setup of the next message was interrupted by another thread, an incomplete buffer could have been sent, padded with zeroes. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-04-25i2c: mxs: handle spurious interruptWolfram Sang
After an error interrupt setting cmd->err, I see another interrupt that the data engine is empty which clears cmd->err before being processed. So, clear cmd->err at the beginning of a transfer only to handle these consecutive interrupts. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-02-24i2c: mxs: only flag completion when queue is completely doneWolfram Sang
The hardware generates an interrupt for every completed command in the queue while the code assumed that it will only generate one interrupt when the queue is empty. So, explicitly check if the queue is really empty. This patch fixed problems which occurred due to high traffic on the bus. While we are here, move the completion-initialization after the parameter error checking. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: stable@kernel.org
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-20i2c-mxs: set controller to pio queue mode after resetSascha Hauer
mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have to set it again after a controller reset. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2011-02-23i2c: add driver for Freescale i.MX28Wolfram Sang
Currently only supporting the PIOQUEUE-mode, because DMA-support for this platform is not yet in mainline. When it becomes available and support has been added to this driver, it will also be suitable for i.MX23 and STMP3xxx. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>