- Mar 21, 2020
-
-
Andy Shevchenko authored
Fix spelling typos in the comments with help of `codespell`. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Serge Semin authored
There is no code left in the kernel which would be using the function. So just remove it. Signed-off-by:
Serge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by:
Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Serge Semin authored
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:
Serge Semin <Sergey.Semin@baikalelectronics.ru> Signed-off-by:
Alexey Malahov <Alexey.Malahov@baikalelectronics.ru> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 13, 2020
-
-
Stephen Boyd authored
This driver doesn't call any DT platform functions like of_platform_*(). Remove the include as it isn't used. Reviewed-by:
Douglas Anderson <dianders@chromium.org> Reviewed-by:
Brendan Higgins <brendanhiggins@google.com> Signed-off-by:
Stephen Boyd <swboyd@chromium.org> Reviewed-by:
Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by:
Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Stephen Boyd authored
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:
Douglas Anderson <dianders@chromium.org> Reviewed-by:
Brendan Higgins <brendanhiggins@google.com> Signed-off-by:
Stephen Boyd <swboyd@chromium.org> Reviewed-by:
Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by:
Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Stephen Boyd authored
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:
Douglas Anderson <dianders@chromium.org> Reviewed-by:
Brendan Higgins <brendanhiggins@google.com> Signed-off-by:
Stephen Boyd <swboyd@chromium.org> Reviewed-by:
Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by:
Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Alain Volmat authored
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:
Alain Volmat <alain.volmat@st.com> Reviewed-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 10, 2020
-
-
Wolfram Sang authored
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:
Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by:
Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Alain Volmat authored
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:
Alain Volmat <alain.volmat@st.com> Reviewed-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Alain Volmat authored
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:
Alain Volmat <alain.volmat@st.com> Reviewed-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Maxime Ripard authored
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:
Maxime Ripard <maxime@cerno.tech> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
chenqiwu authored
Use a new API devm_platform_ioremap_resource() to simplify code. Signed-off-by:
chenqiwu <chenqiwu@xiaomi.com> Tested-by:
Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by:
Luca Ceresoli <luca@lucaceresoli.net> Reviewed-by:
Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
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:
Wolfram Sang <wsa@the-dreams.de>
-
- Feb 26, 2020
-
-
Alain Volmat authored
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:
Alain Volmat <alain.volmat@st.com> Reviewed-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Stefan Lengfeld authored
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:
Stefan 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:
Marco Felsch <m.felsch@pengutronix.de> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by:
Stefan Agner <stefan@agner.ch> Tested-by:
Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Kamel Bouhara authored
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:
Kamel Bouhara <kamel.bouhara@bootlin.com> Signed-off-by:
Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Acked-by:
Ludovic Desroches <ludovic.desroches@microchip.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Feb 04, 2020
-
-
Masahiro Yamada authored
'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.org Signed-off-by:
Masahiro 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:
Rob Herring <robh@kernel.org> Cc: Eric Biggers <ebiggers@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Feb 03, 2020
-
-
Hanjun Guo authored
Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller. Tested-by:
Sheng Feng <fengsheng5@huawei.com> Signed-off-by:
Hanjun Guo <guohanjun@huawei.com> Acked-by:
Nikula <jarkko.nikula@linux.intel.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- Jan 31, 2020
-
-
Raul E Rangel authored
The initial patch was using the incorrect identifier. Fixes: 9af1563a ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by:
Raul E Rangel <rrangel@chromium.org> Acked-by:
Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Akshu Agrawal authored
During adding of the adapter the slave device registration use to fail as the acpi companion field was not populated. Fixes: 9af1563a ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by:
Akshu Agrawal <akshu.agrawal@amd.com> Acked-by:
Raul E Rangel <rrangel@chromium.org> Reviewed-by:
Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 30, 2020
-
-
Alain Volmat authored
Backup/restore I2C registers as part of the suspend/resume handlers. The device is marked as suspended to ensure that transfers are rejected during the suspended period. Signed-off-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by:
Alain Volmat <alain.volmat@st.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Michal Simek authored
Fix wording based on checkpatch.pl Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Topi Kuutela authored
E.g. pm_runtime_set_active must be called while the power management system is disabled. Fixes extra hanging clk_enable. Signed-off-by:
Topi Kuutela <topi.kuutela@gmail.com> Acked-by:
Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Shubhrajyoti Datta authored
Do not print error in case of EPROBE_DEFER. Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Alex Williams authored
Under certain conditions, Cadence's I2C controller's transfer_size register will roll over and generate invalid read transactions. Before this change, the ISR relied solely on the RXDV bit to determine when to write more data to the user's buffer. The invalid read data would cause overruns, smashing stacks and worse. This change stops the buffer writes to the requested boundary and reports the error. The controller will be reset so normal transactions may resume. Signed-off-by:
Alex Williams <alex.williams@ni.com> Reviewed-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> # in a seperate mail Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 29, 2020
-
-
Jarkko Nikula authored
Add support for Intel Comet Lake PCH-V which is based on Intel Kaby Lake. Difference between it and other Comet Lake variants is that former uses previous iTCO version 4 and latter use version 6 like Intel Cannon Lake PCH. Signed-off-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Colin Ian King authored
There is a statement that is indented one level too deeply, remove the extraneous tab. Fixes: b4c119db ("i2c: xiic: Add timeout to the rx fifo wait loop") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Reviewed-by:
Shubhrajyoti Datta <shubhrajyoti.datta@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Colin Ian King authored
There is a spelling mistake in a module parameter description. Fix it. Signed-off-by:
Colin Ian King <colin.king@canonical.com> Reviewed-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 23, 2020
-
-
Krzysztof Kozlowski authored
Update the help text to reflect current support devices: 1. The Exynos high speed I2C driver supports Exynos5 (ARMv7), Exynos5433 and Exynos7 (both ARMv8) SoCs, 2. The S3C I2C driver supports S3C, S5Pv210 and Exynos{3,4,5} SoCs. Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Krzysztof Kozlowski authored
Some of the I2C bus drivers can be compile tested to increase build coverage. This requires also: 1. Adding dependencies on COMMON_CLK for BCM2835 and Meson I2C controllers, 2. Adding 'if' conditional to 'default y' so they will not get enabled by default on all other architectures, 3. Limiting few compile test options to supported architectures (which provide the readsX()/writesX() primitives). Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> [wsa: revert chunk for ZX2967. it needs more preparation] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 15, 2020
-
-
Shubhrajyoti Datta authored
The recommendation is that the set_active should be done with pm runtime disabled. Also fix the remove path for clocking. Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Venkatesh Yadav Abbarapu authored
It's not always the case that clock is already available when i2c driver get probed at the first time, e.g. the clock is provided by clock wizard which may be probed after i2c driver. So let's defer the probe when devm_clk_get() call fails and give it chance to try later. Signed-off-by:
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Shubhrajyoti Datta authored
Add timeout to the rx fifo empty wait loop. Also check for the return value for xiic_reinit and pass it to xiic_start_xfer. Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Krzysztof Kozlowski authored
size_t should be printed with its own format to be 64-bit friendly and fix warning when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’: drivers/i2c/busses/i2c-highlander.c:325:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Krzysztof Kozlowski authored
resource_size_t should be printed with its own size-independent format to fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-pnx.c: In function ‘i2c_pnx_probe’: drivers/i2c/busses/i2c-pnx.c:737:47: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘resource_size_t {aka long long unsigned int}’ [-Wformat=] Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Krzysztof Kozlowski authored
resource_size_t should be printed with its own size-independent format to fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-pmcmsp.c: In function ‘pmcmsptwi_probe’: drivers/i2c/busses/i2c-pmcmsp.c:276:25: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t {aka long long unsigned int}’ [-Wformat=] Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by:
Jean Delvare <jdelvare@suse.de> Tested-by:
Jean Delvare <jdelvare@suse.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by:
Andrew Lunn <andrew@lunn.ch> Reviewed-by:
Peter Korsgaard <peter@korsgaard.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-