<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus-rt.git/drivers/i2c/busses, branch wip-default-clustering</title>
<subtitle>The LITMUS^RT kernel.</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/'/>
<entry>
<title>i2c-imx: do not allow interruptions when waiting for I2C to complete</title>
<updated>2010-10-18T00:29:04+00:00</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2010-06-21T07:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=e39428d53d080ad2615b772d7f99d2a70c2aaab2'/>
<id>e39428d53d080ad2615b772d7f99d2a70c2aaab2</id>
<content type='text'>
The i2c_imx_trx_complete() function is using
wait_event_interruptible_timeout() to wait for the I2C controller to
signal that it has completed an I2C bus operation. If the process that
causes the I2C operation receives a signal, the wait will be
interrupted, returning an error. It is better to let the I2C operation
finished before handling the signal (i.e. returning into userspace).

It is safe to use wait_event_timeout() instead, because the timeout
will allow the process to exit if the I2C bus hangs. It's also better
to allow the I2C operation to finish, because unacknowledged I2C
operations can cause the I2C bus to hang.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i2c_imx_trx_complete() function is using
wait_event_interruptible_timeout() to wait for the I2C controller to
signal that it has completed an I2C bus operation. If the process that
causes the I2C operation receives a signal, the wait will be
interrupted, returning an error. It is better to let the I2C operation
finished before handling the signal (i.e. returning into userspace).

It is safe to use wait_event_timeout() instead, because the timeout
will allow the process to exit if the I2C bus hangs. It's also better
to allow the I2C operation to finish, because unacknowledged I2C
operations can cause the I2C bus to hang.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-davinci: Fix TX setup for more SoCs</title>
<updated>2010-10-18T00:25:33+00:00</updated>
<author>
<name>Jon Povey</name>
<email>jon.povey@racelogic.co.uk</email>
</author>
<published>2010-10-12T04:47:05+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=c5b4afec8e669bbe265daea24037fccfc42c4fe3'/>
<id>c5b4afec8e669bbe265daea24037fccfc42c4fe3</id>
<content type='text'>
This patch is an improvement to 4bba0fd8d1c6d405df666e2573e1a1f917098be0
which got to mainline a little early.

Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode
settings before DXR for correct behaviour, so load MDR first with
STT cleared and later load again with STT set.

Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

Signed-off-by: Jon Povey &lt;jon.povey@racelogic.co.uk&gt;
Acked-by: Troy Kisky &lt;troy.kisky@boundarydevices.com&gt;
Tested-by: Sudhakar Rajashekhara &lt;sudhakar.raj@ti.com&gt;
Acked-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is an improvement to 4bba0fd8d1c6d405df666e2573e1a1f917098be0
which got to mainline a little early.

Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode
settings before DXR for correct behaviour, so load MDR first with
STT cleared and later load again with STT set.

Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

Signed-off-by: Jon Povey &lt;jon.povey@racelogic.co.uk&gt;
Acked-by: Troy Kisky &lt;troy.kisky@boundarydevices.com&gt;
Tested-by: Sudhakar Rajashekhara &lt;sudhakar.raj@ti.com&gt;
Acked-by: Kevin Hilman &lt;khilman@deeprootsystems.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging</title>
<updated>2010-10-07T20:44:30+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-07T20:44:30+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=5672bc8181b189c05ccc29c692491500682a1b49'/>
<id>5672bc8181b189c05ccc29c692491500682a1b49</id>
<content type='text'>
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  of/i2c: Fix module load order issue caused by of_i2c.c
  i2c: Fix checks which cause legacy suspend to never get called
  i2c-pca: Fix waitforcompletion() return value
  i2c: Fix for suspend/resume issue
  i2c: Remove obsolete cleanup for clientdata
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  of/i2c: Fix module load order issue caused by of_i2c.c
  i2c: Fix checks which cause legacy suspend to never get called
  i2c-pca: Fix waitforcompletion() return value
  i2c: Fix for suspend/resume issue
  i2c: Remove obsolete cleanup for clientdata
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-s3c2410: fix calculation of SDA line delay</title>
<updated>2010-09-30T23:00:35+00:00</updated>
<author>
<name>MyungJoo Ham</name>
<email>myungjoo.ham@samsung.com</email>
</author>
<published>2010-09-30T13:54:46+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=7031307aefb6048377385dbb0af2dd43bb0190bb'/>
<id>7031307aefb6048377385dbb0af2dd43bb0190bb</id>
<content type='text'>
S3C2440 style I2C controller uses PCLK to calculate the SDA line delay.
The driver wrongly assumed that this delay is calculated from the
frequency that the controller is operating on. This patch fixes this
issue.

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
S3C2440 style I2C controller uses PCLK to calculate the SDA line delay.
The driver wrongly assumed that this delay is calculated from the
frequency that the controller is operating on. This patch fixes this
issue.

Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>of/i2c: Fix module load order issue caused by of_i2c.c</title>
<updated>2010-09-30T12:14:23+00:00</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-09-30T12:14:23+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=925bb9c649cf8d7200549b395f2ae291833dd494'/>
<id>925bb9c649cf8d7200549b395f2ae291833dd494</id>
<content type='text'>
Commit 959e85f7, "i2c: add OF-style registration and binding" caused a
module dependency loop where of_i2c.c calls functions in i2c-core, and
i2c-core calls of_i2c_register_devices() in of_i2c.  This means that
when i2c support is built as a module when CONFIG_OF is set, then
neither i2c_core nor of_i2c are able to be loaded.

This patch fixes the problem by moving the of_i2c_register_devices()
calls back into the device drivers.  Device drivers already
specifically request the core code to parse the device tree for
devices anyway by setting the of_node pointer, so it isn't a big
deal to also call the registration function.  The drivers just become
slightly more verbose.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 959e85f7, "i2c: add OF-style registration and binding" caused a
module dependency loop where of_i2c.c calls functions in i2c-core, and
i2c-core calls of_i2c_register_devices() in of_i2c.  This means that
when i2c support is built as a module when CONFIG_OF is set, then
neither i2c_core nor of_i2c are able to be loaded.

This patch fixes the problem by moving the of_i2c_register_devices()
calls back into the device drivers.  Device drivers already
specifically request the core code to parse the device tree for
devices anyway by setting the of_node pointer, so it isn't a big
deal to also call the registration function.  The drivers just become
slightly more verbose.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-pca: Fix waitforcompletion() return value</title>
<updated>2010-09-30T12:14:22+00:00</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegor_sub1@visionsystems.de</email>
</author>
<published>2010-09-30T12:14:22+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=6abb930af064fb1cf4177d32e2c7bfb89eee0fe5'/>
<id>6abb930af064fb1cf4177d32e2c7bfb89eee0fe5</id>
<content type='text'>
ret is still -1, if during the polling read_byte() returns at once
with I2C_PCA_CON_SI set. So ret &gt; 0 would lead *_waitforcompletion()
to return 0, in spite of the proper behavior.

The routine was rewritten, so that ret has always a proper value,
before returning.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: stable@kernel.org
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ret is still -1, if during the polling read_byte() returns at once
with I2C_PCA_CON_SI set. So ret &gt; 0 would lead *_waitforcompletion()
to return 0, in spite of the proper behavior.

The routine was rewritten, so that ret has always a proper value,
before returning.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Reviewed-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Cc: stable@kernel.org
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-davinci: Fix race when setting up for TX</title>
<updated>2010-09-27T23:05:08+00:00</updated>
<author>
<name>Jon Povey</name>
<email>jon.povey@racelogic.co.uk</email>
</author>
<published>2010-09-17T03:02:11+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=4bba0fd8d1c6d405df666e2573e1a1f917098be0'/>
<id>4bba0fd8d1c6d405df666e2573e1a1f917098be0</id>
<content type='text'>
When setting up to transmit, a race exists between the ISR and
i2c_davinci_xfer_msg() trying to load the first byte and adjust counters.
This is mostly visible for transmits &gt; 1 byte long.

The hardware starts sending immediately that MDR is loaded. IMR trickery
doesn't work because if we start sending, finish the first byte and an
XRDY event occurs before we load IMR to unmask it, we never get an
interrupt, and we timeout.

Move the MDR load after DXR,IMR loads to avoid this race without locking.

Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

Signed-off-by: Jon Povey &lt;jon.povey@racelogic.co.uk&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When setting up to transmit, a race exists between the ISR and
i2c_davinci_xfer_msg() trying to load the first byte and adjust counters.
This is mostly visible for transmits &gt; 1 byte long.

The hardware starts sending immediately that MDR is loaded. IMR trickery
doesn't work because if we start sending, finish the first byte and an
XRDY event occurs before we load IMR to unmask it, we never get an
interrupt, and we timeout.

Move the MDR load after DXR,IMR loads to avoid this race without locking.

Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985

Signed-off-by: Jon Povey &lt;jon.povey@racelogic.co.uk&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout</title>
<updated>2010-09-27T22:21:16+00:00</updated>
<author>
<name>Bernhard Walle</name>
<email>walle@corscience.de</email>
</author>
<published>2010-09-27T10:55:16+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=cc33e54290ed845904dac4b047934207738f0205'/>
<id>cc33e54290ed845904dac4b047934207738f0205</id>
<content type='text'>
It doesn't make sense to set result to -ETIMEDOUT but return 0 (success)
afterwards. Since there's code in octeon_i2c_start() to handle the
error, it should be called.

Signed-off-by: Bernhard Walle &lt;walle@corscience.de&gt;
Acked-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It doesn't make sense to set result to -ETIMEDOUT but return 0 (success)
afterwards. Since there's code in octeon_i2c_start() to handle the
error, it should be called.

Signed-off-by: Bernhard Walle &lt;walle@corscience.de&gt;
Acked-by: David Daney &lt;ddaney@caviumnetworks.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-omap: Make sure i2c bus is free before setting it to idle</title>
<updated>2010-09-22T00:06:58+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@nokia.com</email>
</author>
<published>2010-08-26T07:36:44+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=5c64eb26ed5c5550fbabd345e573af3fc6a7f775'/>
<id>5c64eb26ed5c5550fbabd345e573af3fc6a7f775</id>
<content type='text'>
If the i2c bus receives an interrupt with both BB (bus busy) and
ARDY (register access ready) statuses set during the tranfer of the last message
the bus was put to idle while still busy.

This caused bus to timeout.

Signed-off-by: Mathias Nyman &lt;mathias.nyman@nokia.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the i2c bus receives an interrupt with both BB (bus busy) and
ARDY (register access ready) statuses set during the tranfer of the last message
the bus was put to idle while still busy.

This caused bus to timeout.

Signed-off-by: Mathias Nyman &lt;mathias.nyman@nokia.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux</title>
<updated>2010-08-14T18:57:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-08-14T18:57:54+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus-rt.git/commit/?id=d0a0c28cf178943afaf22f87957b73c47497cb4b'/>
<id>d0a0c28cf178943afaf22f87957b73c47497cb4b</id>
<content type='text'>
* 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux:
  i2c/nuc900: add i2c driver support for nuc900
  i2c: Enable NXP LPC support in Kconfig
  i2c-pxa: fix compiler warning, due to missing const
  i2c: davinci: bus recovery procedure to clear the bus
  i2c: davinci: Add cpufreq support
  i2c: davinci: Add suspend/resume support
  i2c: davinci: Add helper functions for power management
  i2c: davinci: misc. cleanups: remove MOD_REG_BIT and IO_ADDRESS usage
  i2c: davinci: Fix smbus Oops with AIC33 usage
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux:
  i2c/nuc900: add i2c driver support for nuc900
  i2c: Enable NXP LPC support in Kconfig
  i2c-pxa: fix compiler warning, due to missing const
  i2c: davinci: bus recovery procedure to clear the bus
  i2c: davinci: Add cpufreq support
  i2c: davinci: Add suspend/resume support
  i2c: davinci: Add helper functions for power management
  i2c: davinci: misc. cleanups: remove MOD_REG_BIT and IO_ADDRESS usage
  i2c: davinci: Fix smbus Oops with AIC33 usage
</pre>
</div>
</content>
</entry>
</feed>
