summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'i2c/for-4.18' of ↵Linus Torvalds2018-06-1446-330/+1530
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - mainly feature additions to drivers (stm32f7, qup, xlp9xx, mlxcpld, ...) - conversion to use the i2c_8bit_addr_from_msg macro consistently - move includes to platform_data - core updates to allow the (still in review) I3C subsystem to connect - and the regular share of smaller driver updates * 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (68 commits) i2c: qup: fix building without CONFIG_ACPI i2c: tegra: Remove suspend-resume i2c: imx-lpi2c: Switch to SPDX identifier i2c: mxs: Switch to SPDX identifier i2c: busses: make use of i2c_8bit_addr_from_msg i2c: algos: make use of i2c_8bit_addr_from_msg i2c: rcar: document R8A77980 bindings i2c: qup: Add command-line parameter to override SCL frequency i2c: qup: Correct duty cycle for FM and FM+ i2c: qup: Add support for Fast Mode Plus i2c: qup: add probe path for Centriq ACPI devices i2c: robotfuzz-osif: drop pointless test i2c: robotfuzz-osif: remove pointless local variable i2c: rk3x: Don't print visible virtual mapping MMIO address i2c: opal: don't check number of messages in the driver i2c: ibm_iic: don't check number of messages in the driver i2c: imx: Switch to SPDX identifier i2c: mux: pca954x: merge calls to of_match_device and of_device_get_match_data i2c: mux: demux-pinctrl: use proper parent device for demux adapter i2c: mux: improve error message for failed symlink ...
| * i2c: qup: fix building without CONFIG_ACPIArnd Bergmann2018-05-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The added Centriq support broke compilation with CONFIG_ACPI disabled: drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_probe': drivers/i2c/busses/i2c-qup.c:1707:25: error: 'qup_i2c_acpi_match' undeclared (first use in this function); did you mean 'qup_i2c_recv_data'? This fixes it by removing the extraneous #ifdef. All ACPI specific code will be dropped implicitly when that option is disabled, but the compiler first needs to see it. Fixes: 902a91a02bdf ("i2c: qup: add probe path for Centriq ACPI devices") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Austin Christ <austinwc@codeaurora.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: tegra: Remove suspend-resumeDmitry Osipenko2018-05-301-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing prevents I2C clients to access I2C while Tegra's driver is being suspended, this results in -EBUSY error returned to the clients and that may have unfortunate consequences. In particular this causes problems for the TPS6586x MFD driver which emits hundreds of "failed to read interrupt status" error messages on resume from suspend. This happens if TPS6586X is used to wake system from suspend by the expired RTC alarm timer because TPS6586X is an I2C device driver and its IRQ handler reads the status register while Tegra's I2C driver is suspended, i.e. just after kernel enabled IRQ's during of resume-from-suspend process. Note that the removed tegra_i2c_resume() invoked tegra_i2c_init() which performs HW reset. That seems was also not entirely correct because moving tegra_i2c_resume to an earlier stage of resume-from-suspend process causes I2C transfer to fail in the case of TPS6586X. It is fine to remove the HW-reinitialization for now because it should be only needed in a case of using lowest power-mode during suspend, which upstream kernel doesn't support. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: imx-lpi2c: Switch to SPDX identifierFabio Estevam2018-05-301-11/+1
| | | | | | | | | | | | | | | | Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: mxs: Switch to SPDX identifierFabio Estevam2018-05-301-6/+1
| | | | | | | | | | | | | | | | Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: busses: make use of i2c_8bit_addr_from_msgPeter Rosin2018-05-2918-70/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because it looks neater. For diolan, this allows factoring out some code that is now common between if and else. For eg20t, pch_i2c_writebytes is always called with a write in msgs->flags, and pch_i2c_readbytes with a read. For imx, i2c_imx_dma_write and i2c_imx_write are always called with a write in msgs->flags, and i2c_imx_read with a read. For qup, qup_i2c_write_tx_fifo_v1 is always called with a write in qup->msg->flags. For stu300, also restructure debug output for resends, since that code as a result is only handling debug output. Reviewed-by: Guenter Roeck <linux@roeck-us.net> [diolan] Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [efm32 and imx] Acked-by: Linus Walleij <linus.walleij@linaro.org> [stu300] Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: qup: Add command-line parameter to override SCL frequencyAustin Christ2018-05-291-4/+13
| | | | | | | | | | | | | | | | | | | | | | Add a module parameter to override SCL frequency provided by firmware. This can be useful when testing spec compliance for I2C modes or when debugging issues across multiple operating frequencies. Signed-off-by: Austin Christ <austinwc@codeaurora.org> Reviewed-by: Sricharan R <sricharan@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: qup: Correct duty cycle for FM and FM+Austin Christ2018-05-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The I2C spec UM10204 Rev. 6 specifies the following timings. Standard Fast Mode Fast Mode Plus SCL low 4.7us 1.3us 0.5us SCL high 4.0us 0.6us 0.26us This results in a 33%/66% duty cycle as opposed to the 50%/50% duty cycle used for Standard-mode. Add High Time Divider settings to correct duty cycle for FM(400kHz) and FM+(1MHz). Signed-off-by: Austin Christ <austinwc@codeaurora.org> Reviewed-by: Sricharan R <sricharan@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: qup: Add support for Fast Mode PlusAustin Christ2018-05-291-3/+8
| | | | | | | | | | | | | | | | | | | | Previously the QUP driver limited operation mode to I2C Fast Mode. Add Fast Mode Plus functionality by raising SCL limit from 400kHz to 1MHz. Signed-off-by: Austin Christ <austinwc@codeaurora.org> Reviewed-by: Sricharan R <sricharan@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: qup: add probe path for Centriq ACPI devicesAustin Christ2018-05-291-9/+12
| | | | | | | | | | | | | | | | | | | | Add support for Qualcomm Centriq devices that are qup-v2 compatible but do not support DMA, so nodma needs to be set. Signed-off-by: Austin Christ <austinwc@codeaurora.org> Reviewed-by: Sricharan R <sricharan@codeaurora.org> Reviewed-by: Andy Gross <andy.gross@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: robotfuzz-osif: drop pointless testPeter Rosin2018-05-241-2/+2
| | | | | | | | | | | | | | | | | | In the for-loop test, ret will be either 0 or 1. So, the comparison is pointless. Drop it, and drop the initializer which is then also pointless. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: robotfuzz-osif: remove pointless local variablePeter Rosin2018-05-241-10/+7
| | | | | | | | | | | | | | | | Just use the value directly instead of assigning it to a variable first. And then drop the unused variable. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: rk3x: Don't print visible virtual mapping MMIO addressShawn Lin2018-05-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now %p doesn't print visible pointer address unless the user really want it. According to Documentation/core-api/printk-formats.rst, %px should be used instead, otherwise we could see: rk3x-i2c ff110000.i2c: Initialized RK3xxx I2C bus at (____ptrval____) rk3x-i2c ff130000.i2c: Initialized RK3xxx I2C bus at (____ptrval____) rk3x-i2c ff3c0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____) rk3x-i2c ff3d0000.i2c: Initialized RK3xxx I2C bus at (____ptrval____) But I don't really understand why we need dump it in the first place! Let's remove the whole pointless log. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: opal: don't check number of messages in the driverWolfram Sang2018-05-241-4/+0
| | | | | | | | | | | | | | | | | | Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()") and b7f625840267 ("i2c: add quirk checks to core"), the I2C core does this check now. We can remove it here. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Reviewed-by: Peter Rosin <peda@axentia.se>
| * i2c: ibm_iic: don't check number of messages in the driverWolfram Sang2018-05-241-3/+0
| | | | | | | | | | | | | | | | | | Since commit 1eace8344c02 ("i2c: add param sanity check to i2c_transfer()"), the I2C core does this check now. We can remove it from drivers. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Reviewed-by: Peter Rosin <peda@axentia.se>
| * i2c: imx: Switch to SPDX identifierFabio Estevam2018-05-241-10/+1
| | | | | | | | | | | | | | | | Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: xlp9xx: Make sure the transfer size is not more than I2C_SMBUS_BLOCK_SIZEGeorge Cherian2018-05-221-13/+24
| | | | | | | | | | | | | | | | | | | | | | | | For SMBus transactions the max permissible transfer size is I2C_SMBUS_BLOCK_SIZE. It is possible that some clients might not follow it strictly occasionally. This would lead to stack corruption if the driver copies more than I2C_SMBUS_BLOCK_SIZE bytes. Add a check to avoid such conditions. Signed-off-by: Jayachandran C <jnair@caviumnetworks.com> Signed-off-by: George Cherian <george.cherian@cavium.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: xlp9xx: Fix issue seen when updating receive lengthGeorge Cherian2018-05-221-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware does not handle updates to the length register gracefully if the new value is less than the number of bytes received so far. If this happens, the i2c controller will not stop the receive transaction properly. Fix this by ensuring that the updated length is ok. This is done by making sure that the new length written to hardware is at least few bytes more than the bytes received so far. While at that refactor the length updation to a new function. Signed-off-by: Jayachandran C <jnair@caviumnetworks.com> Signed-off-by: George Cherian <george.cherian@cavium.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * i2c: xlp9xx: Add support for SMBAlertGeorge Cherian2018-05-221-0/+24
| | | | | | | | | | | | | | | | | | | | | | Add support for SMBus alert mechanism to i2c-xlp9xx driver. The second interrupt is parsed to use for SMBus alert. The first interrupt is the i2c controller main interrupt. Signed-off-by: Kamlakant Patel <kamlakant.patel@cavium.com> Signed-off-by: George Cherian <george.cherian@cavium.com> Reviewed-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * Merge branch 'i2c/platform_data-immutable' into i2c/for-4.18Wolfram Sang2018-05-177-7/+26
| |\
| | * i2c: pnx: move header into the driverWolfram Sang2018-05-171-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | There are no platform_data users anymore. Move the structs into the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Vladimir Zapolskiy <vz@mleia.com>
| | * i2c: xiic: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Lee Jones <lee.jones@linaro.org>
| | * i2c: pca-platform: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| | * i2c: omap: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Tony Lindgren <tony@atomide.com>
| | * i2c: ocores: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Lee Jones <lee.jones@linaro.org>
| | * i2c: mux: gpio: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
| | * i2c: gpio: move header to platform_dataWolfram Sang2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Lee Jones <lee.jones@linaro.org> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Acked-by: James Hogan <jhogan@kernel.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
| * | i2c: stm32f7: fix documentation typoPierre-Yves MORDRET2018-05-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some data structure members were either misspelled or missing. Fixes: aeb068c572 ("i2c: i2c-stm32f7: add driver") Fixes: 380b8a85e7 ("i2c: i2c-stm32f7: Add initial SMBus protocols support") Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: i801: fix unused-function warningAnders Roxell2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With CONFIG_PM, we get a harmless build warning: drivers/i2c/busses/i2c-i801.c:1723:12: warning: ‘i801_resume’ defined but not used [-Wunused-function] static int i801_resume(struct device *dev) ^~~~~~~~~~~ drivers/i2c/busses/i2c-i801.c:1714:12: warning: ‘i801_suspend’ defined but not used [-Wunused-function] static int i801_suspend(struct device *dev) ^~~~~~~~~~~~ Follow design pattern from other drivers like i2c-brcmstb, i2c-mpc, i2c-ocores, i2c-pnx, i2c-puv3, i2c-st, i2c-stu300 and i2c-mux-pca954x and changing the ifdef CONFIG_PM to CONFIG_PM_SLEEP. Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: xiic: fix spelling mistake: "unexpexted" -> "unexpected"Colin Ian King2018-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | Trivial fix to spelling mistakes in dev_dbg messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: synquacer: fix fence-post error in retry loopPeter Rosin2018-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | There is a difference between attempts and retries. Signed-off-by: Peter Rosin <peda@axentia.se> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: hix5hd2: remove some dead codePeter Rosin2018-05-151-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | The else branch cannot be taken as i will always equal num. Get rid of the whole construct. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: exynos5: simplify transfer functionAndrzej Hajda2018-05-151-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exynos5_i2c_xfer contains lots of dead code, let's remove it and simplify the rest. The patch should not introduce functional changes. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Suggested-by: Peter Rosin <peda@axentia.se> Reviewed-by: Andi Shyti <andi@etezian.org> Reviewed-by: Peter Rosin <peda@axentia.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | i2c: designware: refactor low-level enable/disableAlexander Monakov2018-05-154-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Low-level controller enable function __i2c_dw_enable is overloaded to also handle disabling. What's worse, even though the documentation requires polling the IC_ENABLE_STATUS register when disabling, this is not done: polling needs to be requested specifically by calling __i2c_dw_enable_and_wait, which can also poll on enabling, but that doesn't work if the IC_ENABLE_STATUS register is not implemented. This is quite confusing if not in fact backwards. Especially since the documentation says that disabling should be followed by polling, the driver should be using a separate function where it does one-shot disables to make the optimization stand out. This refactors the two functions so that requested status is given in the name rather than in a boolean argument. Specifically: - __i2c_dw_enable: enable without polling (in accordance with docs) - __i2c_dw_disable: disable and do poll (also as suggested by docs) - __i2c_dw_disable_nowait: disable without polling (Linux-specific) No functional change. Signed-off-by: Alexander Monakov <amonakov@ispras.ru> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> [wsa: fixed blank lines in header file] Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | Merge branch 'i2c/for-current-fixed' into i2c/for-4.18Wolfram Sang2018-05-153-4/+7
| |\ \
| * | | i2c: busses: remove superfluous ignoring of children for RPMWolfram Sang2018-05-083-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These days, the I2C core ensures that the embedded adapter device ignores the PM states of its children already. Because the adapter device is an opaque logical device, there is no need for drivers to repeat that again. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: axxia: enable clock before calling clk_get_rate()Tobias Jordan2018-05-081-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | axxia_i2c_init() uses clk_get_rate() for idev->i2c_clk. clk_get_rate() should only be called if the clock is enabled, so ensure that by moving the clk_prepare_enable() call before the call to axxia_i2c_init(). Found by Linux Driver Verification project (linuxtesting.org). Fixes: 08678b850cd0 ("i2c: axxia: Add I2C driver for AXM55xx") Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: rcar: enhance comment to avoid regressionsWolfram Sang2018-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Give a clear testcase for people wishing to change this code. It is also a reminder for me if people ask about it. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: mlxcpld: Allow configurable adapter id for mlxcpldMichael Shych2018-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It allows mlxcpld driver to be connected to pre-defined adapter number equal or greater than one, in order to avoid current limitation, assuming usage of id number one only. Signed-off-by: Michael Shych <michaelsh@mellanox.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: mlxcpld: Fix adapter functionality support callbackMichael Shych2018-04-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It fixes report about supported functionality. Functionality can be different up to CPLD capability. Fixes: 6bec23bff9149 (i2c: mlxcpld: add master driver for mellanox systems) Signed-off-by: Michael Shych <michaelsh@mellanox.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: mlxcpld: Add support for smbus block read transactionMichael Shych2018-04-301-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It adds support for smbus block read transaction. CPLD smbus block read bit of capability register is verified during driver initialization, and driver data is updated if such capability is available. In case an upper layer requests a read transaction of length one and expects that length will be the first received byte, driver will notify CPLD about SMBus block read transaction flavor, so CPLD will know to execute such kind of transaction. Signed-off-by: Michael Shych <michaelsh@mellanox.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: mlxcpld: Add support for extended transaction length for i2c-mlxcpldMichael Shych2018-04-301-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It adds support for extended length of read and write transactions. New CPLD logic allows double size of the read and write transactions length. This feature is verified through capability register, which is renamed from unclear LPF_REG to CPBLTY_REG. Two bits 5 and 6 of these register are used for length capability detection, while only 01 combination indicates support of extended transaction length. Others mean lack of such support. Signed-off-by: Michael Shych <michaelsh@mellanox.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: mediatek: use of_device_get_match_data()Ryder Lee2018-04-301-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usage of of_device_get_match_data() reduce the code size a bit. Also, the only way to call mtk_i2c_probe() is to match an entry in mtk_i2c_of_match[], so of_id cannot be NULL. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: s3c2410: Remove support for Exynos5440Krzysztof Kozlowski2018-04-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Exynos5440 is not actively developed, there are no development boards available and probably there are no real products with it. Remove wide-tree support for Exynos5440. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: i801: Don't restore config registers on runtime PMJean Delvare2018-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restoring configuration registers is only needed when we hand control to the firmware. This is never the case with runtime power management. The device will autosuspend whenever not used, so avoid useless register writes by defining suspend/resume only, and not runtime_suspend/runtime_resume. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: at91: Read all available bytes at onceDavid Engraf2018-04-301-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FIFO enabled it is possible to read multiple bytes at once in the interrupt handler as long as RXRDY is set. This may also reduce the number of interrupts. This patch polls RXRDY and reads all available bytes at once. Signed-off-by: David Engraf <david.engraf@sysgo.com> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com> [wsa: reformatted comment] Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: i2c-stm32f7: Implement I2C release mechanismPierre-Yves MORDRET2018-04-301-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature prevents I2C lock-ups. Mechanism resets I2C state machine and releases SCL/SDA signals but preserves I2C registers. Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: i2c-stm32f7: Add DMA supportPierre-Yves MORDRET2018-04-302-21/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds DMA support for i2c-stm32f7 driver Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: i2c-stm32: Add generic DMA APIPierre-Yves MORDRET2018-04-302-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a generic DMA API to implement DMA support for i2c-stm32fx drivers Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
| * | | i2c: i2c-stm32f7: Add initial SMBus protocols supportPierre-Yves MORDRET2018-04-301-9/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SMBus support for I2C controller embedded in STM32F7 Soc. All SMBus protocols are implemented except SMBus-specific protocols like SMBus Host Notification and SMBus Alert protocols. Implemented: SMBus Quick command, Send byte, Receive byte, Write byte/word, read byte/word, Process call, Block write/read and Block write-block read process call. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Signed-off-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
OpenPOWER on IntegriCloud