- 25 4月, 2020 1 次提交
-
-
由 Rafael J. Wysocki 提交于
Rename DPM_FLAG_LEAVE_SUSPENDED to DPM_FLAG_MAY_SKIP_RESUME which matches its purpose more closely. No functional impact. Suggested-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Wolfram Sang <wsa@the-dreams.de> # for I2C Acked-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 16 4月, 2020 2 次提交
-
-
由 Dmitry Osipenko 提交于
DMA transfer could be completed, but CPU (which handles DMA interrupt) may get too busy and can't handle the interrupt in a timely manner, despite of DMA IRQ being raised. In this case the DMA state needs to synchronized before terminating DMA transfer in order not to miss the DMA transfer completion. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dmitry Osipenko 提交于
Boot CPU0 always handle I2C interrupt and under some rare circumstances (like running KASAN + NFS root) it may stuck in uninterruptible state for a significant time. In this case we will get timeout if I2C transfer is running on a sibling CPU, despite of IRQ being raised. In order to handle this rare condition, the IRQ status needs to be checked after completion timeout. Signed-off-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 4月, 2020 2 次提交
-
-
由 Wolfram Sang 提交于
device_property_read_u32() returns errno or 0, so we should use the integer variable 'ret' and not the u32 'val' to hold the retval. Fixes: 0560ad57 ("i2c: altera: Add Altera I2C Controller driver") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NThor Thayer <thor.thayer@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Hans de Goede 提交于
We already set DPM_FLAG_SMART_PREPARE, so we completely skip all callbacks (other then prepare) where possible, quoting from dw_i2c_plat_prepare(): /* * If the ACPI companion device object is present for this device, it * may be accessed during suspend and resume of other devices via I2C * operation regions, so tell the PM core and middle layers to avoid * skipping system suspend/resume callbacks for it in that case. */ return !has_acpi_companion(dev); Also setting the DPM_FLAG_SMART_SUSPEND will cause acpi_subsys_suspend() to leave the controller runtime-suspended even if dw_i2c_plat_prepare() returned 0. Leaving the controller runtime-suspended normally, when the I2C controller is suspended during the suspend_late phase, is not an issue because the pm_runtime_get_sync() done by i2c_dw_xfer() will (runtime-)resume it. But for dw I2C controllers on Bay- and Cherry-Trail devices acpi_lpss.c leaves the controller alive until the suspend_noirq phase, because it may be used by the _PS3 ACPI methods of PCI devices and PCI devices are left powered on until the suspend_noirq phase. Between the suspend_late and resume_early phases runtime-pm is disabled. So for any ACPI I2C OPRegion accesses done after the suspend_late phase, the pm_runtime_get_sync() done by i2c_dw_xfer() is a no-op and the controller is left runtime-suspended. i2c_dw_xfer() has a check to catch this condition (rather then waiting for the I2C transfer to timeout because the controller is suspended). acpi_subsys_suspend() leaving the controller runtime-suspended in combination with an ACPI I2C OPRegion access done after the suspend_late phase triggers this check, leading to the following error being logged on a Bay Trail based Lenovo Thinkpad 8 tablet: [ 93.275882] i2c_designware 80860F41:00: Transfer while suspended [ 93.275993] WARNING: CPU: 0 PID: 412 at drivers/i2c/busses/i2c-designware-master.c:429 i2c_dw_xfer+0x239/0x280 ... [ 93.276252] Workqueue: kacpi_notify acpi_os_execute_deferred [ 93.276267] RIP: 0010:i2c_dw_xfer+0x239/0x280 ... [ 93.276340] Call Trace: [ 93.276366] __i2c_transfer+0x121/0x520 [ 93.276379] i2c_transfer+0x4c/0x100 [ 93.276392] i2c_acpi_space_handler+0x219/0x510 [ 93.276408] ? up+0x40/0x60 [ 93.276419] ? i2c_acpi_notify+0x130/0x130 [ 93.276433] acpi_ev_address_space_dispatch+0x1e1/0x252 ... So since on BYT and CHT platforms we want ACPI I2c OPRegion accesses to work until the suspend_noirq phase, we need the controller to be runtime-resumed during the suspend phase if it is runtime-suspended suspended at that time. This means that we must not set the DPM_FLAG_SMART_SUSPEND on these platforms. On BYT and CHT we already have a special ACCESS_NO_IRQ_SUSPEND flag to make sure the controller stays functional until the suspend_noirq phase. This commit makes the driver not set the DPM_FLAG_SMART_SUSPEND flag when that flag is set. Cc: stable@vger.kernel.org Fixes: b30f2f65 ("i2c: designware: Set IRQF_NO_SUSPEND flag for all BYT and CHT controllers") Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 31 3月, 2020 1 次提交
-
-
由 Wolfram Sang 提交于
The pointer is not really needed anymore since we have the timings struct available in the function itself now. Remove the pointer and access the struct directly. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 28 3月, 2020 2 次提交
-
-
由 Chris Packham 提交于
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: NChris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alain Volmat 提交于
Fix a missing struct parameter description to allow warning free W=1 compilation. Signed-off-by: NAlain Volmat <avolmat@me.com> Reviewed-by: NPatrice Chotard <patrice.chotard@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 25 3月, 2020 5 次提交
-
-
由 Kai-Heng Feng 提交于
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: c71bcdcb ("i2c: add i2c bus driver for NVIDIA GPU") Suggested-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NAjay Gupta <ajayg@nvidia.com> Tested-by: NAjay Gupta <ajayg@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Since we have generic definitions for bus frequencies, let's use them. Reviewed-by: NNicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by: NRobert Richter <rrichter@marvell.com> Reviewed-by: NThor Thayer <thor.thayer@linux.intel.com> Acked-by: NElie Morisse <syniurge@gmail.com> Acked-by: NNehal Shah <nehal-bakulchandra.shah@amd.com> Reviewed-by: NBrendan Higgins <brendanhiggins@google.com> Acked-by: NScott Branden <scott.branden@broadcom.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: NBaruch Siach <baruch@tkos.co.il> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NOleksij Rempel <o.rempel@pengutronix.de> Acked-by: NVladimir Zapolskiy <vz@mleia.com> Acked-by: NGregory CLEMENT <gregory.clement@bootlin.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NChris Brandt <chris.brandt@renesas.com> Reviewed-by: NBaolin Wang <baolin.wang7@gmail.com> Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Acked-by: NPatrice Chotard <patrice.chotard@st.com> Acked-by: NArd Biesheuvel <ardb@kernel.org> Reviewed-by: NDmitry Osipenko <digetx@gmail.com> Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Switch to the new generic functions: i2c_parse_fw_timings(). While here, replace hard coded values with standard bus frequency definitions. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NAlain Volmat <alain.volmat@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Move i2c_parse_fw_timings() to rcar_i2c_clock_calculate() to consolidate timings calls in one place. While here, replace hard coded values with standard bus frequency definitions. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Some drivers may allow to override properties with 0 value when defaults are not in use, thus, replace memset() with corresponding per property update. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 23 3月, 2020 2 次提交
-
-
由 Peter Ujfalusi 提交于
dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Chuhong Yuan 提交于
The driver forgets to disable and unprepare clk when remove. Add a call to clk_disable_unprepare to fix it. Signed-off-by: NChuhong Yuan <hslester96@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- 22 3月, 2020 4 次提交
-
-
由 Tang Bin 提交于
We don't need dev_err() message because when something goes wrong, platform_get_irq() has print an error message itself, so we should remove duplicate dev_err(). Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com> Acked-by: NOleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
Fix spelling typos in the comments with help of `codespell`. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Serge Semin 提交于
There is no code left in the kernel which would be using the function. So just remove it. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Serge Semin 提交于
The problem with detecting the FIFO depth in the platform driver is that in order to implement this we have to access the controller IC_COMP_PARAM_1 register. Currently it's done before the i2c_dw_set_reg_access() method execution, which is errors prone since the method determines the registers endianness and access mode and we can't use dw_readl/dw_writel accessors before this information is retrieved. We also can't move the i2c_dw_set_reg_access() function invocation to after the master/slave probe functions call (when endianness and access mode are determined), since the FIFO depth information is used by them for initializations. So in order to fix the problem we have no choice but to move the FIFO size detection methods to the common code and call it at the probe stage. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by: NAlexey Malahov <Alexey.Malahov@baikalelectronics.ru> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 3月, 2020 4 次提交
-
-
由 Stephen Boyd 提交于
This driver doesn't call any DT platform functions like of_platform_*(). Remove the include as it isn't used. Reviewed-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NBrendan Higgins <brendanhiggins@google.com> Signed-off-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NAmit Kucheria <amit.kucheria@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Stephen Boyd 提交于
Some lines are long here. Use a struct dev pointer to shorten lines and simplify code. The clk_get() call can fail because of EPROBE_DEFER problems too, so just remove the error print message because it isn't useful. Finally, platform_get_irq() already prints an error so just remove that error message. Reviewed-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NBrendan Higgins <brendanhiggins@google.com> Signed-off-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NAmit Kucheria <amit.kucheria@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Stephen Boyd 提交于
We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables should take care of this for us. Just use 0 instead so that we use the flags from the firmware. Also, remove specify dev_name() for the irq name so that we can get better information in /proc/interrupts about which device is generating interrupts. Cc: Alok Chauhan <alokc@codeaurora.org> Reviewed-by: NDouglas Anderson <dianders@chromium.org> Reviewed-by: NBrendan Higgins <brendanhiggins@google.com> Signed-off-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: NAmit Kucheria <amit.kucheria@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alain Volmat 提交于
The PECR register provides received packet computed PEC value. It makes no sense restoring its value after a reset, and anyway, as read-only register it cannot be restored. Fixes: ea6dd25d ("i2c: stm32f7: add PM_SLEEP suspend/resume support") Signed-off-by: NAlain Volmat <alain.volmat@st.com> Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 10 3月, 2020 9 次提交
-
-
由 Hamish Martin 提交于
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 05c74778 ("i2c: gpio: Add support for named gpios in DT") but the error was still output due to not checking the updated 'retdesc'. Fixes: 05c74778 ("i2c: gpio: Add support for named gpios in DT") Signed-off-by: NHamish Martin <hamish.martin@alliedtelesis.co.nz> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Only few drivers use this call, so drivers and I2C core are converted at once with this patch. By simply using i2c_new_client_device() instead of i2c_new_device(), we easily can return an ERRPTR for this function as well. To make out of tree users aware that something changed, the function is renamed to i2c_new_smbus_alert_device(). Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alain Volmat 提交于
Add a new stm32mp15 specific compatible to handle FastMode+ registers handling which is different on the stm32mp15 compared to the stm32f7 or stm32h7. Indeed, on the stm32mp15, the FastMode+ set and clear registers are separated while on the other platforms (F7 or H7) the control is done in a unique register. Signed-off-by: NAlain Volmat <alain.volmat@st.com> Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alain Volmat 提交于
Defer the initial enabling of the Fast Mode Plus bits after the stm32f7_i2c_setup_timing call in probe function in order to avoid enabling them if speed is downgraded. Clear & restore the Fast Mode Plus bits in the suspend/resume handlers of the driver. Signed-off-by: NAlain Volmat <alain.volmat@st.com> Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime Ripard 提交于
The HDMI blocks in the BCM2771 have an i2c controller to retrieve the EDID. This block is split into two parts, the BSC and the AUTO_I2C, lying in two separate register areas. The AUTO_I2C block has a mailbox-like interface and will take away the BSC control from the CPU if enabled. However, the BSC is the actually the same controller than the one supported by the brcmstb driver, and the AUTO_I2C doesn't really bring any immediate benefit. Let's use the BSC then, but let's also tie the AUTO_I2C registers with a separate compatible so that we can enable AUTO_I2C if needed in the future. The AUTO_I2C is enabled by default at boot though, so we first need to release the BSC from the AUTO_I2C control. Cc: Kamal Dasu <kdasu.kdev@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-i2c@vger.kernel.org Signed-off-by: NMaxime Ripard <maxime@cerno.tech> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 chenqiwu 提交于
Use a new API devm_platform_ioremap_resource() to simplify code. Signed-off-by: Nchenqiwu <chenqiwu@xiaomi.com> Tested-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NLuca Ceresoli <luca@lucaceresoli.net> Reviewed-by: NVignesh Raghavendra <vigneshr@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jarkko Nikula 提交于
Function i2c_dw_pci_remove() -> pci_free_irq_vectors() -> pci_disable_msi() -> 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: 21aa3983 ("i2c: designware-pci: Switch over to MSI interrupts") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Mika Westerberg 提交于
Martin noticed that nct6775 driver does not load properly on his system in v5.4+ kernels. The issue was bisected to commit b84398d6 ("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 94246930 ("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: 94246930 ("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&state=*] Reported-by: NMartin Volf <martin.volf.42@gmail.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The comment had some flaws which are now fixed: - the prefix is 'MAC' not 'AAPL' - no kernel coding style and too short length - 'we do' instead of 'we to' Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 2月, 2020 3 次提交
-
-
由 Alain Volmat 提交于
Allow the i2c-stm32f7 controller to become a wakeup-source of the system. In such case, when a slave is registered to the I2C controller, receiving a I2C message targeting that registered slave address wakes up the suspended system. In order to be able to wake-up, the I2C controller DT node must have the property wakeup-source defined and a slave must be registered. Signed-off-by: NAlain Volmat <alain.volmat@st.com> Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Stefan Lengfeld 提交于
Rework the read and write code paths in the driver to support operation in atomic contexts. To achieve this, the driver must not rely on IRQs and not call schedule(), e.g. via a sleep routine, in these cases. With this patch the driver supports normal operation, DMA transfers and now the polling mode or also called sleep-free or IRQ-less operation. It makes the code not simpler or easier to read, but atomic I2C transfers are needed on some hardware configurations, e.g. to trigger reboots on an external PMIC chip. Signed-off-by: NStefan Lengfeld <contact@stefanchrist.eu> [m.felsch@pengutronix.de: integrate https://patchwork.ozlabs.org/patch/1085943/ review feedback] [m.felsch@pengutronix.de: adapt commit message] Signed-off-by: NMarco Felsch <m.felsch@pengutronix.de> Acked-by: NOleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: NStefan Agner <stefan@agner.ch> Tested-by: NStefan Lengfeld <contact@stefanchrist.eu> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Kamel Bouhara 提交于
Implement i2c bus recovery when slaves devices might hold SDA low. In this case re-assign SCL/SDA to gpios and issue 9 dummy clock pulses until the slave release SDA. Signed-off-by: NKamel Bouhara <kamel.bouhara@bootlin.com> Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 13 2月, 2020 2 次提交
-
-
由 Gustavo A. R. Silva 提交于
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: 0560ad57 ("i2c: altera: Add Altera I2C Controller driver") Suggested-by: NDavid Laight <David.Laight@ACULAB.COM> Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: NThor Thayer <thor.thayer@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
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: ba92222e ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780") Reported-by: NH. Nikolaus Schaller <hns@goldelico.com> Tested-by: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 2月, 2020 1 次提交
-
-
由 Masahiro Yamada 提交于
'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p). Hence, IS_ERR(p) is unneeded. The semantic patch that generates this commit is as follows: // <smpl> @@ expression ptr; constant error_code; @@ -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code) +PTR_ERR(ptr) == - error_code // </smpl> Link: http://lkml.kernel.org/r/20200106045833.1725-1-masahiroy@kernel.orgSigned-off-by: NMasahiro Yamada <masahiroy@kernel.org> Cc: Julia Lawall <julia.lawall@lip6.fr> Acked-by: Stephen Boyd <sboyd@kernel.org> [drivers/clk/clk.c] Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> [GPIO] Acked-by: Wolfram Sang <wsa@the-dreams.de> [drivers/i2c] Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [acpi/scan.c] Acked-by: NRob Herring <robh@kernel.org> Cc: Eric Biggers <ebiggers@kernel.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 03 2月, 2020 1 次提交
-
-
由 Hanjun Guo 提交于
Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller. Tested-by: NSheng Feng <fengsheng5@huawei.com> Signed-off-by: NHanjun Guo <guohanjun@huawei.com> Acked-by: NNikula <jarkko.nikula@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 31 1月, 2020 1 次提交
-
-
由 Raul E Rangel 提交于
The initial patch was using the incorrect identifier. Fixes: 9af1563a ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by: NRaul E Rangel <rrangel@chromium.org> Acked-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-