<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/i2c, branch v4.17.4</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>i2c: gpio: initialize SCL to HIGH again</title>
<updated>2018-07-03T09:27:11+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2018-06-16T12:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=323252c83194268cadefc2c0ea55827bf4dd04b8'/>
<id>323252c83194268cadefc2c0ea55827bf4dd04b8</id>
<content type='text'>
commit 12b731dd46d9ee646318e6e9dc587314a3908a46 upstream.

It seems that during the conversion from gpio* to gpiod*, the initial
state of SCL was wrongly switched to LOW. Fix it to be HIGH again.

Fixes: 7bb75029ef34 ("i2c: gpio: Enforce open drain through gpiolib")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 12b731dd46d9ee646318e6e9dc587314a3908a46 upstream.

It seems that during the conversion from gpio* to gpiod*, the initial
state of SCL was wrongly switched to LOW. Fix it to be HIGH again.

Fixes: 7bb75029ef34 ("i2c: gpio: Enforce open drain through gpiolib")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "i2c: algo-bit: init the bus to a known state"</title>
<updated>2018-07-03T09:27:11+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2018-06-16T13:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=97be42058b2470ebd998bde1b1baa0226406d2cb'/>
<id>97be42058b2470ebd998bde1b1baa0226406d2cb</id>
<content type='text'>
commit 2a2c8ee2d72c4f1ba0f7fbb02dc74f971df0f934 upstream.

This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per
bugzilla #200045, this caused a regression. I don't really see a way to
fix it without having the hardware. So, revert the patch and I will fix
the issue I was seeing originally in the i2c-gpio driver itself. I
couldn't find new users of this algorithm since, so there should be no
one depending on the new behaviour.

Reported-by: Sergey Larin &lt;cerg2010cerg2010@mail.ru&gt;
Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Tested-by: Sergey Larin &lt;cerg2010cerg2010@mail.ru&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2a2c8ee2d72c4f1ba0f7fbb02dc74f971df0f934 upstream.

This reverts commit 3e5f06bed72fe72166a6778f630241a893f67799. As per
bugzilla #200045, this caused a regression. I don't really see a way to
fix it without having the hardware. So, revert the patch and I will fix
the issue I was seeing originally in the i2c-gpio driver itself. I
couldn't find new users of this algorithm since, so there should be no
one depending on the new behaviour.

Reported-by: Sergey Larin &lt;cerg2010cerg2010@mail.ru&gt;
Fixes: 3e5f06bed72f ("i2c: algo-bit: init the bus to a known state")
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Tested-by: Sergey Larin &lt;cerg2010cerg2010@mail.ru&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: ocores: update HDL sources URL</title>
<updated>2018-05-29T18:14:32+00:00</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@vaga.pv.it</email>
</author>
<published>2018-05-28T08:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a0ccb6b54bdde16885ac99f49ee8031cf1c71abe'/>
<id>a0ccb6b54bdde16885ac99f49ee8031cf1c71abe</id>
<content type='text'>
The URL is broken. This patch fixes it.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
[wsa: shortened the URL a bit]
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The URL is broken. This patch fixes it.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
[wsa: shortened the URL a bit]
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: viperboard: return message count on master_xfer success</title>
<updated>2018-05-15T07:31:26+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=35cd67a0caf767aba472452865dcb4471fcce2b1'/>
<id>35cd67a0caf767aba472452865dcb4471fcce2b1</id>
<content type='text'>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 174a13aa8669 ("i2c: Add viperboard i2c master driver")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 174a13aa8669 ("i2c: Add viperboard i2c master driver")
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: pmcmsp: fix error return from master_xfer</title>
<updated>2018-05-15T07:31:19+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b'/>
<id>12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b</id>
<content type='text'>
Returning -1 (-EPERM) is not appropriate here, go with -EIO.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning -1 (-EPERM) is not appropriate here, go with -EIO.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: pmcmsp: return message count on master_xfer success</title>
<updated>2018-05-15T07:30:34+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=de9a8634f1cb4560a35696d472cc7f1383d9b866'/>
<id>de9a8634f1cb4560a35696d472cc7f1383d9b866</id>
<content type='text'>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: designware: fix poll-after-enable regression</title>
<updated>2018-05-10T10:30:20+00:00</updated>
<author>
<name>Alexander Monakov</name>
<email>amonakov@ispras.ru</email>
</author>
<published>2018-04-28T13:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=06cb616b1bca7080824acfedb3d4c898e7a64836'/>
<id>06cb616b1bca7080824acfedb3d4c898e7a64836</id>
<content type='text'>
Not all revisions of DW I2C controller implement the enable status register.
On platforms where that's the case (e.g. BG2CD and SPEAr ARM SoCs), waiting
for enable will time out as reading the unimplemented register yields zero.

It was observed that reading the IC_ENABLE_STATUS register once suffices to
avoid getting it stuck on Bay Trail hardware, so replace polling with one
dummy read of the register.

Fixes: fba4adbbf670 ("i2c: designware: must wait for enable")
Signed-off-by: Alexander Monakov &lt;amonakov@ispras.ru&gt;
Tested-by: Ben Gardner &lt;gardner.ben@gmail.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not all revisions of DW I2C controller implement the enable status register.
On platforms where that's the case (e.g. BG2CD and SPEAr ARM SoCs), waiting
for enable will time out as reading the unimplemented register yields zero.

It was observed that reading the IC_ENABLE_STATUS register once suffices to
avoid getting it stuck on Bay Trail hardware, so replace polling with one
dummy read of the register.

Fixes: fba4adbbf670 ("i2c: designware: must wait for enable")
Signed-off-by: Alexander Monakov &lt;amonakov@ispras.ru&gt;
Tested-by: Ben Gardner &lt;gardner.ben@gmail.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: core: ACPI: Log device not acking errors at dbg loglevel</title>
<updated>2018-04-30T08:53:31+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-04-22T17:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7781edaed63e9396fc913e0899cb197562e6f1a0'/>
<id>7781edaed63e9396fc913e0899cb197562e6f1a0</id>
<content type='text'>
Unfortunately some DSDTs issue bogus i2c reads to non existing devices
resulting in -EREMOTEIO errors because the non existing device of course
does not ack.

This happens e.g. from the The Asus T100TA's _BIX method, the DSDT on
the T100TA defines 2 resources on the I2C1 bus:

        Name (EHID, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x005B, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })
        OperationRegion (EHOR, GenericSerialBus, Zero, 0x0100)
        Field (EHOR, BufferAcc, NoLock, Preserve)
        {
            Connection (EHID),
            Offset (0x01),
            AccessAs (BufferAcc, AttribBytes (0x10)),
            ABCD,   8
        }

        Name (UMPC, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x0066, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })

The _BIX method does a single read (on each BIX() call) from the EHID
device through the ABCD Field, only to completely ignore the result.
This read always fails as there is no i2c client at address 0x5b.

The _BIX method also does several reads from the UMPC device and actually
uses the results of those to provide battery information.

IIRC I've also seen some DSTDs which do an i2c read to detect if a device
is present, also leading to false positive errors being logged.

Esp. the _BIX use is problematic as the _BIX method gets called
periodically to monitor battery status.

This commit stops the logs from filling up with errors like these:

[   57.327858] i2c i2c-0: i2c read 16 bytes from client@0x5b starting at
               reg 0x1 failed, error: -121

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unfortunately some DSDTs issue bogus i2c reads to non existing devices
resulting in -EREMOTEIO errors because the non existing device of course
does not ack.

This happens e.g. from the The Asus T100TA's _BIX method, the DSDT on
the T100TA defines 2 resources on the I2C1 bus:

        Name (EHID, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x005B, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })
        OperationRegion (EHOR, GenericSerialBus, Zero, 0x0100)
        Field (EHOR, BufferAcc, NoLock, Preserve)
        {
            Connection (EHID),
            Offset (0x01),
            AccessAs (BufferAcc, AttribBytes (0x10)),
            ABCD,   8
        }

        Name (UMPC, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x0066, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })

The _BIX method does a single read (on each BIX() call) from the EHID
device through the ABCD Field, only to completely ignore the result.
This read always fails as there is no i2c client at address 0x5b.

The _BIX method also does several reads from the UMPC device and actually
uses the results of those to provide battery information.

IIRC I've also seen some DSTDs which do an i2c read to detect if a device
is present, also leading to false positive errors being logged.

Esp. the _BIX use is problematic as the _BIX method gets called
periodically to monitor battery status.

This commit stops the logs from filling up with errors like these:

[   57.327858] i2c i2c-0: i2c read 16 bytes from client@0x5b starting at
               reg 0x1 failed, error: -121

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: core: ACPI: Improve OpRegion read errors</title>
<updated>2018-04-30T08:53:26+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-04-22T17:57:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c8016fa215d2d50920a58de07da2d00f7cb982f3'/>
<id>c8016fa215d2d50920a58de07da2d00f7cb982f3</id>
<content type='text'>
When we get an error doing an ACPI SerialBus I2C OpRegion read log some
useful details, like the client address and which register is being
read.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we get an error doing an ACPI SerialBus I2C OpRegion read log some
useful details, like the client address and which register is being
read.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: sprd: Fix the i2c count issue</title>
<updated>2018-04-27T12:12:43+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-04-09T06:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2a010461207cc96bee5ab81748325dec1972976f'/>
<id>2a010461207cc96bee5ab81748325dec1972976f</id>
<content type='text'>
We found the I2C controller count register is unreliable sometimes,
that will cause I2C to lose data. Thus we can read the data count
from 'i2c_dev-&gt;count' instead of the I2C controller count register.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We found the I2C controller count register is unreliable sometimes,
that will cause I2C to lose data. Thus we can read the data count
from 'i2c_dev-&gt;count' instead of the I2C controller count register.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
