<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/i2c, branch v3.17</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.17</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.17'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-03T01:20:47Z</updated>
<entry>
<title>i2c: qup: Fix order of runtime pm initialization</title>
<updated>2014-10-03T01:20:47Z</updated>
<author>
<name>Andy Gross</name>
<email>agross@codeaurora.org</email>
</author>
<published>2014-09-29T22:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86b59bbfae2a895aa26b3d15f31b1a705dbfede1'/>
<id>urn:sha1:86b59bbfae2a895aa26b3d15f31b1a705dbfede1</id>
<content type='text'>
The runtime pm calls need to be done before populating the children via the
i2c_add_adapter call.  If this is not done, a child can run into issues trying
to do i2c read/writes due to the pm_runtime_sync failing.

Signed-off-by: Andy Gross &lt;agross@codeaurora.org&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
Acked-by: Bjorn Andersson &lt;bjorn.andersson@sonymobile.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: rk3x: fix 0 length write transfers</title>
<updated>2014-10-03T01:18:53Z</updated>
<author>
<name>Alexandru M Stan</name>
<email>amstan@chromium.org</email>
</author>
<published>2014-10-01T17:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf27020d2f253bac6457d6833b97141030f0122a'/>
<id>urn:sha1:cf27020d2f253bac6457d6833b97141030f0122a</id>
<content type='text'>
i2cdetect -q was broken (everything was a false positive, and no transfers were
actually being sent over i2c). The way it works is by sending a 0 length write
request and checking for NACK. This patch fixes the 0 length writes and actually
sends them.

Reported-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Alexandru M Stan &lt;amstan@chromium.org&gt;
Tested-by: Doug Anderson &lt;dianders@chromium.org&gt;
Tested-by: Max Schwarz &lt;max.schwarz@online.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: acpi: Fix NULL Pointer dereference</title>
<updated>2014-09-25T14:08:15Z</updated>
<author>
<name>Peter Hüwe</name>
<email>PeterHuewe@gmx.de</email>
</author>
<published>2014-09-12T19:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0aef44e84ad16cd87a88df78773fd81ecca34f11'/>
<id>urn:sha1:0aef44e84ad16cd87a88df78773fd81ecca34f11</id>
<content type='text'>
If adapter-&gt;dev.parent == NULL there is a NULL pointer dereference in
acpi_i2c_install_space_handler and acpi_i2c_remove_space_handler.

This is present since introduction of this code:
366047515c6e "i2c: rework kernel config I2C_ACPI" or even
da3c6647ee08 "I2C/ACPI: Clean up I2C ACPI code and Add CONFIG_I2C_ACPI"

The adapter-&gt;dev.parent == NULL case is valid for the i2c_stub,
so loading i2c_stub with ACPI_I2C_OPREGION enabled results in an oops.
This is also valid at least for i2c_tiny_usb and i2c_robotfuzz_osif.

Fix by checking whether it is null before calling ACPI_HANDLE.

Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: move acpi code back into the core</title>
<updated>2014-09-25T14:07:15Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2014-09-22T17:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17f4a5c47f28de9ea59182f48d07f8c44ee5dcc9'/>
<id>urn:sha1:17f4a5c47f28de9ea59182f48d07f8c44ee5dcc9</id>
<content type='text'>
Commit 5d98e61d337c ("I2C/ACPI: Add i2c ACPI operation region support")
renamed the i2c-core module. This may cause regressions for
distributions, so put the ACPI code back into the core.

Reported-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Tested-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt;
Tested-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>i2c: rk3x: fix divisor calculation for SCL frequency</title>
<updated>2014-09-20T16:35:10Z</updated>
<author>
<name>addy ke</name>
<email>addy.ke@rock-chips.com</email>
</author>
<published>2014-09-08T03:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4a7bd7a386dc6b0bb49cb47614e06e8295d495a'/>
<id>urn:sha1:b4a7bd7a386dc6b0bb49cb47614e06e8295d495a</id>
<content type='text'>
I2C_CLKDIV register descripted in the previous version of
RK3x chip manual is incorrect. Plus 1 is required.

The correct formula:
- T(SCL_HIGH) = T(PCLK) * (CLKDIVH + 1) * 8
- T(SCL_LOW) = T(PCLK) * (CLKDIVL + 1) * 8
- (SCL Divsor) = 8 * ((CLKDIVL + 1) + (CLKDIVH + 1))
- SCL = PCLK / (CLK Divsor)

It will be updated to the latest version of chip manual.

Signed-off-by: Addy Ke &lt;addy.ke@rock-chips.com&gt;
Reviewed-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: mxs: fix error message in pio transfer</title>
<updated>2014-09-20T12:58:19Z</updated>
<author>
<name>Janusz Użycki</name>
<email>j.uzycki@elproma.com.pl</email>
</author>
<published>2014-09-09T16:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4780d039ca5c3ef318db084f1bfc6ebed6876c8'/>
<id>urn:sha1:a4780d039ca5c3ef318db084f1bfc6ebed6876c8</id>
<content type='text'>
If I2C_M_RD flag is set SELECT command is sent and afterward READ
command. The patch fixes READ command to return READ failure error
message instead of SELECT failure error message.

Signed-off-by: Janusz Uzycki &lt;j.uzycki@elproma.com.pl&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: ismt: use correct length when copy buffer</title>
<updated>2014-09-20T12:56:19Z</updated>
<author>
<name>Fan Du</name>
<email>fan.du@intel.com</email>
</author>
<published>2014-09-16T09:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=979bbf7b7ae75cfc06e09d09eda38009a3bdc4a4'/>
<id>urn:sha1:979bbf7b7ae75cfc06e09d09eda38009a3bdc4a4</id>
<content type='text'>
In block write mode, when encapsulating dma_buffer, first element is
'command', the rest is data buffer, so only copy actual data buffer
starting from block[1] with the size indicating by block[0].

Signed-off-by: Fan Du &lt;fan.du@intel.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}</title>
<updated>2014-09-20T09:56:20Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2014-09-05T23:34:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=938916fbb8e8cb67eacb784f4eda17e2950c16c5'/>
<id>urn:sha1:938916fbb8e8cb67eacb784f4eda17e2950c16c5</id>
<content type='text'>
Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
1's in bits 8-31, thus going against the manuals, so fix them.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: tegra: Move clk_prepare/clk_set_rate to probe</title>
<updated>2014-09-20T09:15:23Z</updated>
<author>
<name>Mikko Perttunen</name>
<email>mperttunen@nvidia.com</email>
</author>
<published>2014-09-05T09:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9a9ef4170b3db3044504cd5512d0bb19c6f23c7'/>
<id>urn:sha1:c9a9ef4170b3db3044504cd5512d0bb19c6f23c7</id>
<content type='text'>
Currently the i2c-tegra bus driver prepares, enables
and set_rates its clocks separately for each transfer.
This causes locking problems when doing I2C transfers
from clock notifiers; see
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/268653.html

This patch moves clk_prepare/unprepare and clk_set_rate calls to
the probe function, leaving only clk_enable/disable to be
done on each transfer. This solves the locking issue.

Signed-off-by: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Reviewed-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>Revert "i2c: rcar: remove spinlock"</title>
<updated>2014-09-04T17:59:42Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2014-08-23T20:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91bfe2989af02e709ca01ccf518c4fbda3efc70f'/>
<id>urn:sha1:91bfe2989af02e709ca01ccf518c4fbda3efc70f</id>
<content type='text'>
This reverts commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7.

The I2C core's per-adapter locks can't protect from IRQs, so the driver still
needs a spinlock to protect the register accesses.

Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
