summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'gpio-updates-for-v6.13-rc1' of ↵Linus Torvalds25 hours3-0/+417
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "Three new drivers, support for some new models in existing ones and lots of various tweaks and improvements across the board (switching to using recommended APIs, code shrink and simplification, etc.). Also a new feature in the character device uAPI where we now notify the user-space about changes triggered by in-kernel users as well, not only when they were done by other user-space agents. Summary: GPIOLIB core: - use the new mem_is_zero() instead of memchr_inv(s, 0, n) - don't store debounce period twice needlessly - clean-up debugfs handling - remove leftover comments referring to no longer used spinlocks - unduplicate some operations like SRCU locks and initializing GPIO descriptors - constify the sysfs class struct - use lock guards in GPIO sysfs code - update GPIO uAPI internal flags all at once atomically for consistency with other places - modify the behavior of the sysfs interface by no longer exporting lines that are named inside the driver code or board files with the sysfs links bearing the line names as this has for many years been largely unused due to the prevalence of DT, ACPI and firmware nodes over board files and made the API inconsistent - for GPIO interrupt providers: free irqs that are still requested by users when removing the chip GPIO uAPI: - notify user-space about changes to GPIO lines' state (requested, released, reconfigured) triggered from the kernel as well (until now we'd only do this for changes triggered from user-space) - to that end: modify the internal workings of the notification mechanism by switching to an atomic notifier which allows us to send events from atomic context - also to that end store the debounce period in the GPIO descriptor struct and not in the character device context struct - while at it, also cover the corner-case of users introducing changes over sysfs while others watch them via the character device - don't report GPIO lines requested as interrupts as "used" to user-space as it can still request them as GPIOs New drivers: - GPIO part of the MFD Congatec Board Controller - PolarFire GPIO controller - GPIOs on FTDI FT2232H Driver improvements: - use generic device property accessors instead of OF-specific ones across many GPIO drivers (mpc8xxx, vf610, eic-sprd, davinci, ts4900, xilinx, mvebu) - use devres helpers to simplify error paths and either shrink or entirely remove the driver's remove() callback (grgpio, amdpt, menz127, max730x, ftgpio010, 74x164, ljca) - use helper variables to store the address of pdev->dev and avoid some line-breaks - use device_for_each_child_node_scoped() to avoid having to put the fwnode on breaks or errors (gpio-sim, gpio-dwapb, gpiolib-acpi) - use a scoped bitmap to simplify the code and drop goto labels in gpio-aggregator - drop unneeded Kconfig dependencies on OF_GPIO (grgpio, mveby, xilinx) - add support for new models to gpio-aspeed, gpio-rockchip and gpio-dwapb - clean-up ACPI handling and some other bits in gpio-xgene-sb - replace deprecated PCI functions in pcie-idio-24 and pci-idio-16 - allow to build davinci and mvebu drivers with COMPILE_TEST=y - remove dead code in gpio-mb86s7x - switch back to using platform_driver::remove() (after the conversion to remove_new()) across the GPIO drivers - remove remaining uses of GPIOF_ACTIVE_LOW across the tree and drop this deprecated symbol - convert the gpio-altera driver to no longer pull in the deprecated legacy-of-mm-gpiochip.h header - use of_property_present() instead of of_property_read_bool() in gpiolib-of and gpio-rockchip - allow to build the tegra186 driver on Tegra234 platforms in Kconfig Late fixes: - add a missing return value check after devm_kasprintf() to gpio-grgpio DT bindings: - document the ngpios property of gpio-mmio - add support for a new aspeed model - fix the example for st,nomadik-gpio Other: - kernel doc and comments tweaks - fix typos in TODO - reorder headers alphabetically in some drivers - fix incorrect format specifiers in gpio tools" * tag 'gpio-updates-for-v6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (98 commits) gpio: tegra186: Allow to enable driver on Tegra234 gpio: grgpio: Add NULL check in grgpio_probe tools: gpio: Fix several incorrect format specifiers gpio: mpfs: add CoreGPIO support gpio: rockchip: support new version GPIO gpio: rockchip: change the GPIO version judgment logic gpio: rockchip: explan the format of the GPIO version ID gpiolib: cdev: use !mem_is_zero() instead of memchr_inv(s, 0, n) MAINTAINERS: add gpio driver to PolarFire entry gpio: Get rid of GPIOF_ACTIVE_LOW USB: gadget: pxa27x_udc: Avoid using GPIOF_ACTIVE_LOW pcmcia: soc_common: Avoid using GPIOF_ACTIVE_LOW leds: gpio: Avoid using GPIOF_ACTIVE_LOW Input: gpio_keys_polled - avoid using GPIOF_ACTIVE_LOW Input: gpio_keys - avoid using GPIOF_ACTIVE_LOW gpio: Use of_property_present() for non-boolean properties gpio: mpfs: add polarfire soc gpio support gpio: altera: Drop legacy-of-mm-gpiochip.h header gpio: pcie-idio-24: Replace deprecated PCI functions gpio: pci-idio-16: Replace deprecated PCI functions ...
| * Merge tag 'v6.12-rc3' of ↵Bartosz Golaszewski2024-10-142-4/+4
| |\ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next Linux 6.12-rc3
| * | i2c: Congatec Board Controller i2c bus driverThomas Richard2024-10-093-0/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add i2c support for the Congatec Board Controller. The Board Controller has two i2c busses, a General Purpose bus and a Power Management bus. Acked-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Thomas Richard <thomas.richard@bootlin.com> Link: https://lore.kernel.org/r/20241001-congatec-board-controller-v3-3-39ceceed5c47@bootlin.com Signed-off-by: Lee Jones <lee@kernel.org>
* | | i2c: designware: do not hold SCL low when I2C_DYNAMIC_TAR_UPDATE is not setLiu Peibao13 days2-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the Tx FIFO is empty and the last command has no STOP bit set, the master holds SCL low. If I2C_DYNAMIC_TAR_UPDATE is not set, BIT(13) MST_ON_HOLD of IC_RAW_INTR_STAT is not enabled, causing the __i2c_dw_disable() timeout. This is quite similar to commit 2409205acd3c ("i2c: designware: fix __i2c_dw_disable() in case master is holding SCL low"). Also check BIT(7) MST_HOLD_TX_FIFO_EMPTY in IC_STATUS, which is available when IC_STAT_FOR_CLK_STRETCH is set. Fixes: 2409205acd3c ("i2c: designware: fix __i2c_dw_disable() in case master is holding SCL low") Co-developed-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com> Signed-off-by: Xiaowu Ding <xiaowu.ding@jaguarmicro.com> Co-developed-by: Angus Chen <angus.chen@jaguarmicro.com> Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com> Signed-off-by: Liu Peibao <loven.liu@jaguarmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
* | | i2c: muxes: Fix return value check in mule_i2c_mux_probe()Yang Yingliang2024-11-051-2/+2
| |/ |/| | | | | | | | | | | | | | | If dev_get_regmap() fails, it returns NULL pointer not ERR_PTR(), replace IS_ERR() with NULL pointer check, and return -ENODEV. Fixes: d0f8e97866bf ("i2c: muxes: add support for tsd,mule-i2c multiplexer") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
* | Merge tag 'i2c-for-6.12-rc2' of ↵Linus Torvalds2024-10-051-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: - Fix potential deadlock during runtime suspend and resume (stm32f7) * tag 'i2c-for-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume
| * | i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resumeMarek Vasut2024-10-011-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case there is any sort of clock controller attached to this I2C bus controller, for example Versaclock or even an AIC32x4 I2C codec, then an I2C transfer triggered from the clock controller clk_ops .prepare callback may trigger a deadlock on drivers/clk/clk.c prepare_lock mutex. This is because the clock controller first grabs the prepare_lock mutex and then performs the prepare operation, including its I2C access. The I2C access resumes this I2C bus controller via .runtime_resume callback, which calls clk_prepare_enable(), which attempts to grab the prepare_lock mutex again and deadlocks. Since the clock are already prepared since probe() and unprepared in remove(), use simple clk_enable()/clk_disable() calls to enable and disable the clock on runtime suspend and resume, to avoid hitting the prepare_lock mutex. Acked-by: Alain Volmat <alain.volmat@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de> Fixes: 4e7bca6fc07b ("i2c: i2c-stm32f7: add PM Runtime support") Cc: <stable@vger.kernel.org> # v5.0+ Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
* / move asm/unaligned.h to linux/unaligned.hAl Viro2024-10-021-1/+1
|/ | | | | | | | | | | | | | | | | | | asm/unaligned.h is always an include of asm-generic/unaligned.h; might as well move that thing to linux/unaligned.h and include that - there's nothing arch-specific in that header. auto-generated by the following: for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i done for i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i done git mv include/asm-generic/unaligned.h include/linux/unaligned.h git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
* Merge tag 'i2c-for-6.12-rc1-additional_fixes' of ↵Linus Torvalds2024-09-296-3/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - fix DesignWare driver ENABLE-ABORT sequence, ensuring ABORT can always be sent when needed - check for PCLK in the SynQuacer controller as an optional clock, allowing ACPI to directly provide the clock rate - KEBA driver Kconfig dependency fix - fix XIIC driver power suspend sequence * tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled i2c: keba: I2C_KEBA should depend on KEBA_CP500 i2c: synquacer: Deal with optional PCLK correctly i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled
| * i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabledJinjie Ruan2024-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | It is not valid to call pm_runtime_set_suspended() for devices with runtime PM enabled because it returns -EAGAIN if it is enabled already and working. So, call pm_runtime_disable() before to fix it. Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management") Cc: <stable@vger.kernel.org> # v4.6+ Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| * i2c: keba: I2C_KEBA should depend on KEBA_CP500Geert Uytterhoeven2024-09-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | The KEBA I2C controller is only present on KEBA PLC devices. Hence add a dependency on KEBA_CP500, to prevent asking the user about this driver when configuring a kernel without KEBA CP500 system FPGA support. Fixes: c7e08c816cd2fdf8 ("i2c: keba: Add KEBA I2C controller support") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Gerhard Engleder <eg@keba.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| * i2c: synquacer: Deal with optional PCLK correctlyArd Biesheuvel2024-09-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | ACPI boot does not provide clocks and regulators, but instead, provides the PCLK rate directly, and enables the clock in firmware. So deal gracefully with this. Fixes: 55750148e559 ("i2c: synquacer: Fix an error handling path in synquacer_i2c_probe()") Cc: stable@vger.kernel.org # v6.10+ Cc: Andi Shyti <andi.shyti@kernel.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| * i2c: designware: fix controller is holding SCL low while ENABLE bit is disabledKimriver Liu2024-09-243-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was observed that issuing the ABORT bit (IC_ENABLE[1]) will not work when IC_ENABLE is already disabled. Check if the ENABLE bit (IC_ENABLE[0]) is disabled when the controller is holding SCL low. If the ENABLE bit is disabled, the software needs to enable it before trying to issue the ABORT bit. otherwise, the controller ignores any write to ABORT bit. These kernel logs show up whenever an I2C transaction is attempted after this failure. i2c_designware e95e0000.i2c: timeout waiting for bus ready i2c_designware e95e0000.i2c: timeout in disabling adapter The patch fixes the issue where the controller cannot be disabled while SCL is held low if the ENABLE bit is already disabled. Fixes: 2409205acd3c ("i2c: designware: fix __i2c_dw_disable() in case master is holding SCL low") Signed-off-by: Kimriver Liu <kimriver.liu@siengine.com> Cc: <stable@vger.kernel.org> # v6.6+ Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
* | [tree-wide] finally take no_llseek outAl Viro2024-09-271-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | no_llseek had been defined to NULL two years ago, in commit 868941b14441 ("fs: remove no_llseek") To quote that commit, At -rc1 we'll need do a mechanical removal of no_llseek - git grep -l -w no_llseek | grep -v porting.rst | while read i; do sed -i '/\<no_llseek\>/d' $i done would do it. Unfortunately, that hadn't been done. Linus, could you do that now, so that we could finally put that thing to rest? All instances are of the form .llseek = no_llseek, so it's obviously safe. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'i2c-for-6.12-rc1' of ↵Linus Torvalds2024-09-2341-545/+1461
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "I2C core: - finally remove the I2C_COMPAT symbol after 15 years of deprecation - lock client addresses during initialization to prevent race conditions between different kinds of instantiation - use scoped foreach OF child loops - testunit cleanups and documentation improvements, as well as two new tests, one for repeated start and one for triggering SMBusAlert interrupts I2C host drivers: - DesignWare and Renesas I2C driver updates. The first has has undergone through a series of cleanups that have been sent to the mailing list a year ago for the first time and finally get merged in this pull request. They are many, from typos (e.g. i2/i2c), to cosmetics, to refactoring (e.g. move inline functions to librarieas) and many others. - all the DesignWare Kconfig options have been grouped under the I2C_DESIGNWARE_CORE and this required some adaptation in many of the kernel configuration files for different arm and mips boards Cleanups: - improve the exit path in the runtime resume function for the Qualcomm Geni platform - get rid of the unused "target_addr" parameter in the Intel LJCA driver - intialize the restart_flag in the MediaTek controller in one single place - constify a few global data structures in the virtio driver - simplify the bus speed handling in the Renesas driver init function making it more readable - improved probe function of the Renesas R-Car driver - switch the iMX/MXC driver to use RUNTIME_PM_OPS() instead of SET_RUNTIME_PM_OPS() - iMX/MXC driver cleanups - use devm_clk_get_enabled() to simplify the Renesas EMEV2, Ingenic and MPC drivers Refactoring: - Fix a potential out of boundary array access in the Nuvoton driver. This is not a bug fix because the issue could never occur due to hardware not having the properties listed in the array. The change makes the driver more future proof and, at the same time, silences code analyzers. Improvements: - several patches improving the runtime power management handling of the Renesas I2C (riic) driver - use a more descriptive adapter name in the Intel i801 driver to show the presence of the IDF feature - kill pending transactions when irq's can't complete their handling in the Intel Denverton (ismt) driver, triggering a timeout New Feature: - support fast mode plus in the Renesas I2C (riic) driver New support: - Added support for: - Renesas R9A08G045 - Rockchip RK3576 - KEBA I2C - Theobroma Systems Mule Multiplexer. - new i2c-keba.c driver - new driver for The Mule i2c multiplexer Core I2C framework: - move runtime PM functions in order to allow them to be accessed during device add Devicetree: - nVidia and Qualcomm binding improvements - get rid of redundant "multi-master" property in the aspeed binding - convert i2c-sprd binding to YAML AT24 updates: - document a new model from giantec in DT bindings" * tag 'i2c-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (69 commits) i2c: designware: Use pci_get_drvdata() i2c: designware: Propagate firmware node i2c: designware: Uninline i2c_dw_probe() i2c: ljca: Remove unused "target_addr" parameter i2c: keba: Add KEBA I2C controller support i2c: i801: Use a different adapter-name for IDF adapters i2c: core: Setup i2c_adapter runtime-pm before calling device_add() dt-bindings: i2c: i2c-sprd: convert to YAML i2c: ismt: kill transaction in hardware on timeout i2c: designware: Group all DesignWare drivers under a single option net: txgbe: Fix I2C Kconfig dependencies RISC-V: configs: enable I2C_DESIGNWARE_CORE with I2C_DESIGNWARE_PLATFORM mips: configs: enable I2C_DESIGNWARE_CORE with I2C_DESIGNWARE_PLATFORM arm64: defconfig: enable I2C_DESIGNWARE_CORE with I2C_DESIGNWARE_PLATFORM ARM: configs: enable I2C_DESIGNWARE_CORE with I2C_DESIGNWARE_PLATFORM ARC: configs: enable I2C_DESIGNWARE_CORE with I2C_DESIGNWARE_PLATFORM i2c: virtio: Constify struct i2c_algorithm and struct virtio_device_id i2c: rcar: tidyup priv->devtype handling on rcar_i2c_probe() i2c: imx: Convert comma to semicolon i2c: jz4780: Use devm_clk_get_enabled() helpers ...
| * Merge tag 'i2c-host-6.12' of ↵Wolfram Sang2024-09-2139-457/+1309
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow The DesignWare and the Renesas I2C drivers have received most of the changes in this pull request. The first has has undergone through a series of cleanups that have been sent to the mailing list a year ago for the first time and finally get merged in this pull request. They are many, from typos (e.g. i2/i2c), to cosmetics, to refactoring (e.g. move inline functions to librarieas) and many others. Besides that, all the DesignWare Kconfig options have been grouped under the I2C_DESIGNWARE_CORE and this required some adaptation in many of the kernel configuration files for different arm and mips boards. Follows the list of the rest of the changes grouped by type of change. Cleanups -------- The Qualcomm Geni platform improves the exit path in the runtime resume function. The Intel LJCA driver loses "target_addr" parameter in ljca_i2c_stop() because it was unused. The MediaTek controller intializes the restart_flag in the transfer function using the ternary conditional operator ("? :") instead of initializing it in different parts. Constified a few global data structures in the virtio driver. The Renesas driver simplifies the bus speed handling in the init function making it more readable. Improved an if/else statement in probe function of the Renesas R-Car driver. The iMX/MXC driver switches to using the RUNTIME_PM_OPS() instead of SET_RUNTIME_PM_OPS(). Still in the iMX/MXC driver a comma ',' has been replaced by a semicolon ';', while in different drivers the ',' has been removed from the '{ }' delimiters. Finally three devm_clk_get_enabled() have been used to simplify the devm_clk_get/clk_prepare_enable tuple in the Renesas EMEV2, Ingenic and MPC drivers. Refactors --------- The Nuvoton fixes a potential out of boundary array access. This is not a bug fix because the issue could never occur due to hardware not having the properties listed in the array. The change makes the driver more future proof and, at the same time, silences code analyzers. Improvements ------------ The Renesas I2C (riic) driver undergoes several patches improving the runtime power management handling. The Intel i801 driver uses a more descriptive adapter's name to show the presence of the IDF feature. In the Intel Denverton (ismt) adapter the pending transactions are killed when irq's can't complete their handling, triggering a timeout. This could have been considered as a bug fix, but because, standing to Vasily, it's very sporadic, I preferred considering the patch rather as an improvement. New Feature ----------- The Renesas I2C (riic) driver now supports the fast mode plus. New support ----------- Added support for: - Renesas R9A08G045 - Rockchip RK3576 - KEBA I2C - Theobroma Systems Mule Multiplexer. The Keba comes with a new driver, i2c-keba.c. The Mule is an i2c multiplexer and it also comes with a new driver, mux/i2c-mux-mule.c. Core patch ---------- This pull request includes also a patch in the I2C framework, in i2c-core-base.c where the runtime PM functions have been replaced in order to allow to be accessed during the device add. Devicetree ---------- Some cleanups in the devicetree, as well. nVidia and Qualcomm bindings improve their "if:then:" blocks. While the aspeed binding loses the "multi-master" property because it was redundant. The i2c-sprd binding has been converted to YAML.
| | * i2c: designware: Use pci_get_drvdata()Andy Shevchenko2024-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the wrapper function for getting the driver data using pci_dev instead of using dev_get_drvdata() with &pdev->dev, so we can directly pass a struct pci_dev. This is a purely cosmetic change. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Propagate firmware nodeAndy Shevchenko2024-09-113-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate firmware node by using a specific API call, i.e. device_set_node(). Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Uninline i2c_dw_probe()Andy Shevchenko2024-09-112-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since i2c_dw_probe() is going to be extended, uninline it to reduce the noise in the common header. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: ljca: Remove unused "target_addr" parameterAndi Shyti2024-09-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stop command doesn't use any address on the target: w_packet->data[0] = 0; and indeed the targed_addr parameter was unused. Remove it. Cc: Wentong Wu <wentong.wu@intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: keba: Add KEBA I2C controller supportGerhard Engleder2024-09-103-0/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The KEBA I2C controller is found in the system FPGA of KEBA PLC devices. It is used to connect EEPROMs and hardware monitoring chips. The It is a simple I2C controller with a fixed bus speed of 100 kbit/s. The whole message transmission is executed by the driver. The driver triggers all steps over control, status and data register. There are no FIFOs or interrupts. Signed-off-by: Gerhard Engleder <eg@keba.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: i801: Use a different adapter-name for IDF adaptersHans de Goede2024-09-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On chipsets with a second 'Integrated Device Function' SMBus controller use a different adapter-name for the second IDF adapter. This allows platform glue code which is looking for the primary i801 adapter to manually instantiate i2c_clients on to differentiate between the 2. This allows such code to find the primary i801 adapter by name, without needing to duplicate the PCI-ids to feature-flags mapping from i2c-i801.c. Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: core: Setup i2c_adapter runtime-pm before calling device_add()Hans de Goede2024-09-101-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform glue code, which is not build into the kernel and thus cannot use i2c_register_board_info() may want to use bus_register_notifier() to listen for i2c-adapters to show up on which the platform code needs to manually instantiate platform specific i2c_clients. This results in calling i2c_new_client_device() from the bus notifier which happens near the device_add() call. If the i2c-core has not yet setup runtime-pm (specifically the no-callbacks and ignore-children flags) for the device embedded inside struct i2c_adapter and the driver for the i2c_client calls pm_runtime_set_active() this will trigger the following error inside __pm_runtime_set_status(): "runtime PM trying to activate child device %s but parent (%s) is not active\n" and the i2c_client's runtime-status will not be updated. Split the device_register() call for the adapter into device_initialize() and device_add() and move the pm-runtime init calls inbetween these 2 calls so that the runtime-status can be correctly set when a driver binds from the bus-notifier. Note the moved pm-runtime init calls just override the initial value of some flags in struct device set by device_initialize() and calling these before device_add() is safe. Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: ismt: kill transaction in hardware on timeoutVasily Khoruzhick2024-09-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Intel Denverton SoC ismt controller may enter weird state when transaction gets stuck. It times out in the driver, but unless transaction is explicitly killed in the controller, it won't be able to perform new transactions anymore. The issue is extremely difficult to reproduce and may take weeks of non- stop smbus traffic. Numerous hours with logic analyzer didn't yield any useful results, it looks like the controller stops toggling SCK line, i.e. the issue is likely in the controller, since device doesn't do clock stretching, so nothing is driving SCK except the host. Explicitly kill transaction on timeout to recover the controller from this state. Signed-off-by: Vasily Khoruzhick <vasilykh@arista.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Group all DesignWare drivers under a single optionHeikki Krogerus2024-09-101-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are quite a few drivers and options for the DesignWare I2C adapter in the Kconfig. Grouping all of them under the I2C_DESIGNWARE_CORE. That makes the menuconfig a bit more easier to understand. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: virtio: Constify struct i2c_algorithm and struct virtio_device_idChristophe JAILLET2024-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'struct i2c_algorithm' and 'struct virtio_device_id' are not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security, especially when the structure holds some function pointers, which is the case for struct i2c_algorithm. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 6663 568 16 7247 1c4f drivers/i2c/busses/i2c-virtio.o After: ===== text data bss dec hex filename 6735 472 16 7223 1c37 drivers/i2c/busses/i2c-virtio.o -- Compile tested only Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: rcar: tidyup priv->devtype handling on rcar_i2c_probe()Kuninori Morimoto2024-09-101-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rcar_i2c_probe() has priv->devtype operation, but handling (A) and (C) in same place is more understandable ( (A) and (B) are independent). (A) if (priv->devtype < I2C_RCAR_GEN3) { ... } (B) ... (C) if (priv->devtype >= I2C_RCAR_GEN3) { ... } Let's merge it with if-else Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: imx: Convert comma to semicolonShen Lichuan2024-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | To ensure code clarity and prevent potential errors, it's advisable to employ the ';' as a statement separator, except when ',' are intentionally used for specific purposes. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: jz4780: Use devm_clk_get_enabled() helpersRong Qianfeng2024-09-101-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). While at it, no more special handling needed here, remove the goto label "err:". Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com> Acked-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: emev2: Use devm_clk_get_enabled() helpersRong Qianfeng2024-09-101-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The devm_clk_get_enabled() helpers: - call devm_clk_get() - call clk_prepare_enable() and register what is needed in order to call clk_disable_unprepare() when needed, as a managed resource. This simplifies the code and avoids the calls to clk_disable_unprepare(). While at it, no need to save clk pointer, drop sclk from struct em_i2c_device. Signed-off-by: Rong Qianfeng <rongqianfeng@vivo.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: muxes: add support for tsd,mule-i2c multiplexerFarouk Bouabid2024-09-103-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Theobroma Systems Mule is an MCU that emulates a set of I2C devices, among which an amc6821 and devices that are reachable through an I2C-mux. The devices on the mux can be selected by writing the appropriate device number to an I2C config register (amc6821 reg 0xff). This driver is expected to be probed as a platform device with amc6821 as its parent i2c device. Add support for the mule-i2c-mux platform driver. The amc6821 driver support for the mux will be added in a later commit. Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Farouk Bouabid <farouk.bouabid@cherry.de> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: npcm: restore slave addresses array lengthTyrone Ting2024-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The smatch check warning is "buffer overflow 'npcm_i2caddr' 2 <= 9". The original design supports 10 target addresses although only 2 addresses are required for current implementation. Restore the npcm_i2caddr array length to fix the smatch warning. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202408130818.FgDP5uNm-lkp@intel.com/ Signed-off-by: Tyrone Ting <kfting@nuvoton.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: mpc: Use devm_clk_get_optional_enabled() to simplify codeZhang Zekun2024-09-101-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_clk_get_optional() and clk_prepare_enable() can be replaced by the helper function devm_clk_get_optional_enabled(). Let's simplify the code by using devm_clk_get_optional_enabled() and avoid calling clk_disable_unprepare(). Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Consolidate PM opsAndy Shevchenko2024-09-104-105/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the same (*) PM ops in the PCI and platform drivers. Instead, consolidate that PM ops under exported variable and deduplicate them. *) With the subtle ACPI and P-Unit behaviour differences in PCI case. But this is not a problem as for ACPI we need to take care of the P-Unit semaphore anyway and calling PM ops for PCI makes sense as it might provide specific operation regions in ACPI (however there are no known devices on market that are using it with PCI enabled I2C). Note, the clocks are not in use in the PCI case. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Sanket Goswami <Sanket.Goswami@amd.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Simplify unsupported bus speed handlingGeert Uytterhoeven2024-09-101-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify checking for unsupported bus speeds and reporting errors by factoring out the calculation of the maximum bus speed, and by using the dev_err_probe() helper. While at it, use "%u" for u32, and improve the error message. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Remove ->disable() callbackAndy Shevchenko2024-09-106-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 90312351fd1e ("i2c: designware: MASTER mode as separated driver") introduced ->disable() callback but there is no real use for it. Both i2c-designware-master.c and i2c-designware-slave.c set it to the same i2c_dw_disable() and scope is inside the same kernel module. That said, replace the callback by explicitly calling the i2c_dw_disable(). Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Move exports to I2C_DW namespacesAndy Shevchenko2024-09-105-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce scope of the I²C DesignWare driver exports to I2C_DW namespaces. This will prevent abuse of the symbols and clean up global namespace. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Unify the firmware type checksAndy Shevchenko2024-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of asymmetrical checks for the firmware type use the is_*_node() calls. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Consolidate firmware parsing and configuring codeAndy Shevchenko2024-09-104-70/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the same code flows in the PCI and platform drivers. Moreover, the flow requires the common code to export a few functions. Instead, consolidate that flow under new function called i2c_dw_fw_parse_and_configure() and drop unneeded exports. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Rename dw_i2c_of_configure() -> i2c_dw_of_configure()Andy Shevchenko2024-09-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the sake of consistency, rename dw_i2c_of_configure() and change its parameter to be aligned with the i2c_dw_acpi_configure(). Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Add support for fast mode plusClaudiu Beznea2024-09-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fast mode plus is available on most of the IP variants that RIIC driver is working with. The exception is (according to HW manuals of the SoCs where this IP is available) the Renesas RZ/A1H. For this, patch introduces the struct riic_of_data::fast_mode_plus. Fast mode plus was tested on RZ/G3S, RZ/G2{L,UL,LC}, RZ/Five by instantiating the RIIC frequency to 1MHz and issuing i2c reads on the fast mode plus capable devices (and the i2c clock frequency was checked on RZ/G3S). Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Define individual arrays to describe the register offsetsClaudiu Beznea2024-09-101-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define individual arrays to describe the register offsets. In this way we can describe different IP variants that share the same register offsets but have differences in other characteristics. Commit prepares for the addition of fast mode plus. Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Add suspend/resume supportClaudiu Beznea2024-09-101-11/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add suspend/resume support for the RIIC driver. This is necessary for the Renesas RZ/G3S SoC which support suspend to deep sleep state where power to most of the SoC components is turned off. As a result the I2C controller needs to be reconfigured after suspend/resume. For this, the reset line was stored in the driver private data structure as well as i2c timings. The reset line and I2C timings are necessary to re-initialize the controller after resume. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Enable runtime PM autosuspend supportClaudiu Beznea2024-09-101-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable runtime PM autosuspend support for the RIIC driver. With this, in case there are consecutive xfer requests the device wouldn't be runtime enabled/disabled after each consecutive xfer but after the the delay configured by user. With this, we can avoid touching hardware registers involved in runtime PM suspend/resume saving in this way some cycles. The default chosen autosuspend delay is zero to keep the previous driver behavior. Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Use pm_runtime_resume_and_get()Claudiu Beznea2024-09-101-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pm_runtime_get_sync() may return with error. In case it returns with error dev->power.usage_count needs to be decremented. pm_runtime_resume_and_get() takes care of this. Thus use it. Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Call pm_runtime_get_sync() when need to access registersClaudiu Beznea2024-09-101-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to runtime resume the device as long as the IP registers are not accessed. Calling pm_runtime_get_sync() at the register access time leads to a simpler error path. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: riic: Use temporary variable for struct deviceClaudiu Beznea2024-09-101-23/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use a temporary variable for the struct device pointers to avoid dereferencing. Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Drop return value from dw_i2c_of_configure()Andy Shevchenko2024-09-101-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dw_i2c_of_configure() is called without checking of the returned value, hence just drop it by converting to void. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Drop return value from i2c_dw_acpi_configure()Andy Shevchenko2024-09-102-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i2c_dw_acpi_configure() is called without checking of the returned value, hence just drop it by converting to void. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
| | * i2c: designware: Always provide device ID tablesAndy Shevchenko2024-09-101-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to have ugly ifdeffery and additional macros for the device ID tables. Always provide them. Since we touch the ACPI table, make it sorted by ID. Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>