<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/i2c, branch v5.6</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=v5.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-03-28T04:03:17Z</updated>
<entry>
<title>i2c: pca-platform: Use platform_irq_get_optional</title>
<updated>2020-03-28T04:03:17Z</updated>
<author>
<name>Chris Packham</name>
<email>chris.packham@alliedtelesis.co.nz</email>
</author>
<published>2020-03-26T22:44:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14c1fe699cad9cb0acda4559c584f136d18fea50'/>
<id>urn:sha1:14c1fe699cad9cb0acda4559c584f136d18fea50</id>
<content type='text'>
The interrupt is not required so use platform_irq_get_optional() to
avoid error messages like

  i2c-pca-platform 22080000.i2c: IRQ index 0 not found

Signed-off-by: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: st: fix missing struct parameter description</title>
<updated>2020-03-28T04:00:36Z</updated>
<author>
<name>Alain Volmat</name>
<email>avolmat@me.com</email>
</author>
<published>2020-03-26T21:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f491c6687332920e296d0209e366fe2ca7eab1c6'/>
<id>urn:sha1:f491c6687332920e296d0209e366fe2ca7eab1c6</id>
<content type='text'>
Fix a missing struct parameter description to allow
warning free W=1 compilation.

Signed-off-by: Alain Volmat &lt;avolmat@me.com&gt;
Reviewed-by: Patrice Chotard &lt;patrice.chotard@st.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: nvidia-gpu: Handle timeout correctly in gpu_i2c_check_status()</title>
<updated>2020-03-24T21:40:55Z</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2020-03-24T15:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d944b27df121e2ee854a6c2fad13d6c6300792d4'/>
<id>urn:sha1:d944b27df121e2ee854a6c2fad13d6c6300792d4</id>
<content type='text'>
Nvidia card may come with a "phantom" UCSI device, and its driver gets
stuck in probe routine, prevents any system PM operations like suspend.

There's an unaccounted case that the target time can equal to jiffies in
gpu_i2c_check_status(), let's solve that by using readl_poll_timeout()
instead of jiffies comparison functions.

Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU")
Suggested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Ajay Gupta &lt;ajayg@nvidia.com&gt;
Tested-by: Ajay Gupta &lt;ajayg@nvidia.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: hix5hd2: add missed clk_disable_unprepare in remove</title>
<updated>2020-03-22T16:20:11Z</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2019-11-04T15:00:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1b9f99ff8c40bba6e59de9ad4a659447b1e4112'/>
<id>urn:sha1:e1b9f99ff8c40bba6e59de9ad4a659447b1e4112</id>
<content type='text'>
The driver forgets to disable and unprepare clk when remove.
Add a call to clk_disable_unprepare to fix it.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: acpi: put device when verifying client fails</title>
<updated>2020-03-13T14:15:30Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa+renesas@sang-engineering.com</email>
</author>
<published>2020-03-12T13:32:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8daee952b4389729358665fb91949460641659d4'/>
<id>urn:sha1:8daee952b4389729358665fb91949460641659d4</id>
<content type='text'>
i2c_verify_client() can fail, so we need to put the device when that
happens.

Fixes: 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications")
Reported-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&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: gpio: suppress error on probe defer</title>
<updated>2020-03-10T11:31:55Z</updated>
<author>
<name>Hamish Martin</name>
<email>hamish.martin@alliedtelesis.co.nz</email>
</author>
<published>2020-03-09T21:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3747cd2efe7ecb9604972285ab3f60c96cb753a8'/>
<id>urn:sha1:3747cd2efe7ecb9604972285ab3f60c96cb753a8</id>
<content type='text'>
If a GPIO we are trying to use is not available and we are deferring
the probe, don't output an error message.
This seems to have been the intent of commit 05c74778858d
("i2c: gpio: Add support for named gpios in DT") but the error was
still output due to not checking the updated 'retdesc'.

Fixes: 05c74778858d ("i2c: gpio: Add support for named gpios in DT")
Signed-off-by: Hamish Martin &lt;hamish.martin@alliedtelesis.co.nz&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: designware-pci: Fix BUG_ON during device removal</title>
<updated>2020-03-10T09:33:52Z</updated>
<author>
<name>Jarkko Nikula</name>
<email>jarkko.nikula@linux.intel.com</email>
</author>
<published>2020-02-13T15:15:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9be8bc4dd6177cf992b93b0bd014c4f611283896'/>
<id>urn:sha1:9be8bc4dd6177cf992b93b0bd014c4f611283896</id>
<content type='text'>
Function i2c_dw_pci_remove() -&gt; pci_free_irq_vectors() -&gt;
pci_disable_msi() -&gt; free_msi_irqs() will throw a BUG_ON() for MSI
enabled device since the driver has not released the requested IRQ before
calling the pci_free_irq_vectors().

Here driver requests an IRQ using devm_request_irq() but automatic
release happens only after remove callback. Fix this by explicitly
freeing the IRQ before calling pci_free_irq_vectors().

Fixes: 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device</title>
<updated>2020-03-10T09:27:11Z</updated>
<author>
<name>Mika Westerberg</name>
<email>mika.westerberg@linux.intel.com</email>
</author>
<published>2020-02-26T13:21:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04bbb97d1b732b2d197f103c5818f5c214a4cf81'/>
<id>urn:sha1:04bbb97d1b732b2d197f103c5818f5c214a4cf81</id>
<content type='text'>
Martin noticed that nct6775 driver does not load properly on his system
in v5.4+ kernels. The issue was bisected to commit b84398d6d7f9 ("i2c:
i801: Use iTCO version 6 in Cannon Lake PCH and beyond") but it is
likely not the culprit because the faulty code has been in the driver
already since commit 9424693035a5 ("i2c: i801: Create iTCO device on
newer Intel PCHs"). So more likely some commit that added PCI IDs of
recent chipsets made the driver to create the iTCO_wdt device on Martins
system.

The issue was debugged to be PCI configuration access to the PMC device
that is not present. This returns all 1's when read and this caused the
iTCO_wdt driver to accidentally request resourses used by nct6775.

It turns out that the SMI resource is only required for some ancient
systems, not the ones supported by this driver. For this reason do not
populate the SMI resource at all and drop all the related code. The
driver now always populates the main I/O resource and only in case of SPT
(Intel Sunrisepoint) compatible devices it adds another resource for the
NO_REBOOT bit. These two resources are of different types so
platform_get_resource() used by the iTCO_wdt driver continues to find
the both resources at index 0.

Link: https://lore.kernel.org/linux-hwmon/CAM1AHpQ4196tyD=HhBu-2donSsuogabkfP03v1YF26Q7_BgvgA@mail.gmail.com/
Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs")
[wsa: complete fix needs all of http://patchwork.ozlabs.org/project/linux-i2c/list/?series=160959&amp;state=*]
Reported-by: Martin Volf &lt;martin.volf.42@gmail.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: altera: Fix potential integer overflow</title>
<updated>2020-02-13T08:29:30Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-11T14:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54498e8070e19e74498a72c7331348143e7e1f8c'/>
<id>urn:sha1:54498e8070e19e74498a72c7331348143e7e1f8c</id>
<content type='text'>
Factor out 100 from the equation and do 32-bit arithmetic (3 * clk_mhz / 10)
instead of 64-bit.

Notice that clk_mhz is MHz, so the multiplication will never wrap 32 bits
and there is no need for div_u64().

Addresses-Coverity: 1458369 ("Unintentional integer overflow")
Fixes: 0560ad576268 ("i2c: altera: Add Altera I2C Controller driver")
Suggested-by: David Laight &lt;David.Laight@ACULAB.COM&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Thor Thayer &lt;thor.thayer@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: jz4780: silence log flood on txabrt</title>
<updated>2020-02-13T08:24:04Z</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2020-02-12T09:35:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9e661cedcc0a072d91a32cb88e0515ea26e35711'/>
<id>urn:sha1:9e661cedcc0a072d91a32cb88e0515ea26e35711</id>
<content type='text'>
The printout for txabrt is way too talkative and is highly annoying with
scanning programs like 'i2cdetect'. Reduce it to the minimum, the rest
can be gained by I2C core debugging and datasheet information. Also,
make it a debug printout, it won't help the regular user.

Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780")
Reported-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Tested-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
