]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
2 months agoi2c: Use str_read_write() helper
Yumeng Fang [Fri, 23 May 2025 08:54:45 +0000 (16:54 +0800)]
i2c: Use str_read_write() helper

Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoMerge tag 'i2c-host-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti...
Wolfram Sang [Fri, 23 May 2025 15:18:16 +0000 (17:18 +0200)]
Merge tag 'i2c-host-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow

i2c-host updates for v6.16

Cleanups and refactorings
- Many drivers switched to dev_err_probe()
- Generic cleanups applied to designware, iproc, ismt, mlxbf,
  npcm7xx, qcom-geni, pasemi, and thunderx
- davinci: declare I2C mangling support among I2C features
- designware: clean up DTS handling
- designware: fix PM runtime on driver unregister
- imx: improve error logging during probe
- lpc2k: improve checks in probe error path
- xgene-slimpro: improve PCC shared memory handling
- pasemi: improve error handling in reset, smbus clear, timeouts
- tegra: validate buffer length during transfers
- wmt: convert binding to YAML format

Improvements and extended support:
- microchip-core: add SMBus support
- mlxbf: add support for repeated start in block transfers
- mlxbf: improve timer configuration
- npcm: attempt clock toggle recovery before failing init
- octeon: add support for block mode operations
- pasemi: add support for unjam device feature
- riic: add support for bus recovery

New device support:
- MediaTek Dimensity 1200 (MT6893)
- Sophgo SG2044
- Renesas RZ/V2N (R9A09G056)
- Rockchip RK3528
- AMD ISP (new driver)

Misc changes:
- core: add support for Write Disable-aware SPD

2 months agoi2c: mlxbf: avoid 64-bit division
Arnd Bergmann [Tue, 20 May 2025 15:25:45 +0000 (17:25 +0200)]
i2c: mlxbf: avoid 64-bit division

The 64-bit division in mlxbf_i2c_get_ticks() causes link failures
when compile-testing on 32-bit machines:

ERROR: modpost: "__udivdi3" [drivers/i2c/busses/i2c-mlxbf.ko] undefined!

Change this to a div_u64(), which should replace the constant division
with a a multiply/shift combination in the mlxbf_i2c_get_ticks().

The frequency calculation functions require a slow library call but
should be used much rarer.

Fixes: 053859002c20 ("i2c: mlxbf: Allow build with COMPILE_TEST")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250520152600.1975628-1-arnd@kernel.org
Signed-off-by: Andi Shyti <andi@smida.it>
2 months agoi2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 13 May 2025 21:02:47 +0000 (23:02 +0200)]
i2c: viai2c-wmt: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250513210246.528370-2-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi@smida.it>
2 months agoi2c: designware: Don't warn about missing get_clk_rate_khz
Heikki Krogerus [Tue, 13 May 2025 12:40:15 +0000 (15:40 +0300)]
i2c: designware: Don't warn about missing get_clk_rate_khz

Converting the WARN_ON() to a dev_dbg() message in
i2c_dw_clk_rate().

That removes the need to supply a dummy implementation for
the callback (or alternatively a dummy clk device) when the
fallback path is preferred where the existing values already
in the clock registers are used - when a firmware has
programmed the clock registers.

The fallback path was introduced in commit 4fec76e0985c
("i2c: designware: Fix wrong setting for {ss,fs,hs}_{h,l}cnt
registers").

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20250513124015.2568924-1-heikki.krogerus@linux.intel.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: designware: Invoke runtime suspend on quick slave re-registration
Tan En De [Sat, 12 Apr 2025 02:33:03 +0000 (10:33 +0800)]
i2c: designware: Invoke runtime suspend on quick slave re-registration

Replaced pm_runtime_put() with pm_runtime_put_sync_suspend() to ensure
the runtime suspend is invoked immediately when unregistering a slave.
This prevents a race condition where suspend was skipped when
unregistering and registering slave in quick succession.

For example, consider the rapid sequence of
`delete_device -> new_device -> delete_device -> new_device`.
In this sequence, it is observed that the dw_i2c_plat_runtime_suspend()
might not be invoked after `delete_device` operation.

This is because after `delete_device` operation, when the
pm_runtime_put() is about to trigger suspend, the following `new_device`
operation might race and cancel the suspend.

If that happens, during the `new_device` operation,
dw_i2c_plat_runtime_resume() is skipped (since there was no suspend), which
means `i_dev->init()`, i.e. i2c_dw_init_slave(), is skipped.
Since i2c_dw_init_slave() is skipped, i2c_dw_configure_fifo_slave() is
skipped too, which leaves `DW_IC_INTR_MASK` unconfigured. If we inspect
the interrupt mask register using devmem, it will show as zero.

Example shell script to reproduce the issue:
```
  #!/bin/sh

  SLAVE_LADDR=0x1010
  SLAVE_BUS=13
  NEW_DEVICE=/sys/bus/i2c/devices/i2c-$SLAVE_BUS/new_device
  DELETE_DEVICE=/sys/bus/i2c/devices/i2c-$SLAVE_BUS/delete_device

  # Create initial device
  echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE
  sleep 2

  # Rapid sequence of
  # delete_device -> new_device -> delete_device -> new_device
  echo $SLAVE_LADDR > $DELETE_DEVICE
  echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE
  echo $SLAVE_LADDR > $DELETE_DEVICE
  echo slave-24c02 $SLAVE_LADDR > $NEW_DEVICE

  # Using devmem to inspect IC_INTR_MASK will show as zero
```

Signed-off-by: Tan En De <ende.tan@starfivetech.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Link: https://lore.kernel.org/r/20250412023303.378600-1-ende.tan@starfivetech.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c-mlxbf: Improve I2C bus timing configuration
Chris Babroski [Tue, 6 May 2025 19:30:59 +0000 (19:30 +0000)]
i2c-mlxbf: Improve I2C bus timing configuration

Update the I2C bus timing configuration on BlueField to match the
configuration recommended and verified by the HW team.

I2C block read failures were found on BlueField 3 during communication
with a device that requires the use of repeated start conditions.
Testing showed that these failures were caused by the I2C transaction
getting aborted early due to a short bus "timeout" configuration value.
This value determines how long the clock can be held low before the I2C
transaction is aborted.

Upon further inspection, it was also found that other I2C bus timing
configuration values used by the kernel driver do not match the
configuration that is recommended by the HW team and used in the
BlueField BSP I2C drivers.

Signed-off-by: Chris Babroski <cbabroski@nvidia.com>
Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
Link: https://lore.kernel.org/r/20250506193059.321345-2-cbabroski@nvidia.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c-mlxbf: Add repeated start condition support
Chris Babroski [Tue, 6 May 2025 19:30:58 +0000 (19:30 +0000)]
i2c-mlxbf: Add repeated start condition support

Add support for SMBus repeated start conditions to the Mellanox I2C
driver. This support is specifically enabled for the
I2C_FUNC_SMBUS_WRITE_I2C_BLOCK implementation which is required for
communication with a specific I2C device on BlueField 3.

Signed-off-by: Chris Babroski <cbabroski@nvidia.com>
Reviewed-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
Link: https://lore.kernel.org/r/20250506193059.321345-1-cbabroski@nvidia.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Sun, 11 May 2025 20:39:21 +0000 (22:39 +0200)]
i2c: xgene-slimpro: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250511203920.325704-2-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: i2c-wmt: Convert to YAML
Alexey Charkov [Tue, 6 May 2025 10:38:15 +0000 (14:38 +0400)]
dt-bindings: i2c: i2c-wmt: Convert to YAML

Rewrite the textual description for the WonderMedia I2C controller
as YAML schema, and switch the filename to follow the compatible
string.

The controller only supports two bus speeds (100kHz and 400kHz)
so restrict clock-frequency values accordingly.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Alexey Charkov <alchark@gmail.com>
Link: https://lore.kernel.org/r/20250506-vt8500-i2c-binding-v3-1-401c3e090a88@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: microchip-corei2c: add smbus support
prashanth kumar burujukindi [Wed, 30 Apr 2025 11:23:39 +0000 (12:23 +0100)]
i2c: microchip-corei2c: add smbus support

Add hardware support for the SMBUS commands smbus_quick, smbus_byte,
smbus_byte_data, smbus_word_data and smbus_block_data, replacing the
fallback to software emulation

Signed-off-by: prashanth kumar burujukindi <prashanthkumar.burujukindi@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20250430-preview-dormitory-85191523283d@spud
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: mlxbf: Allow build with COMPILE_TEST
Andi Shyti [Mon, 5 May 2025 21:58:54 +0000 (23:58 +0200)]
i2c: mlxbf: Allow build with COMPILE_TEST

Extend the Kconfig dependency to include COMPILE_TEST so the
Mellanox BlueField I2C driver can be built on non-ARM64 platforms
for compile testing purposes.

Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Cc: Khalil Blaiech <kblaiech@nvidia.com>
Cc: Asmaa Mnebhi <asmaa@nvidia.com>
Link: https://lore.kernel.org/r/20250505215854.2896383-1-andi.shyti@kernel.org
2 months agoi2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP
Geert Uytterhoeven [Tue, 6 May 2025 13:02:06 +0000 (15:02 +0200)]
i2c: I2C_DESIGNWARE_AMDISP should depend on DRM_AMD_ISP

The AMD Image Signal Processor I2C functionality is only present on AMD
platforms with ISP support, and its platform device is instantiated by
the AMD ISP driver.  Hence add a dependency on DRM_AMD_ISP, to prevent
asking the user about this driver when configuring a kernel that does
not support the AMD ISP.

Fixes: d6263c468a76 ("i2c: amd-isp: Add ISP i2c-designware driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Link: https://lore.kernel.org/r/3888f892b8c4d8c8acd17e56581e726ace7f7092.1746536495.git.geert+renesas@glider.be
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: atr: add passthrough flag
Cosmin Tanislav [Wed, 7 May 2025 12:19:15 +0000 (15:19 +0300)]
i2c: atr: add passthrough flag

Some I2C ATRs can have other I2C ATRs as children. The I2C messages of
the child ATRs need to be forwarded as-is if the parent I2C ATR can
only do static mapping.

In the case of GMSL, the deserializer I2C ATR actually doesn't have I2C
address remapping hardware capabilities, but it is able to select which
GMSL link to talk to, allowing it to change the address of the
serializer.

The child ATRs need to have their alias pools defined in such a way to
prevent overlapping addresses between them, but there's no way around
this without orchestration between multiple ATR instances.

To allow for this use-case, add a flag that allows unmapped addresses
to be passed through, since they are already remapped by the child ATRs.

There's no case where an address that has not been remapped by the child
ATR will hit the parent ATR.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: add static flag
Cosmin Tanislav [Wed, 7 May 2025 12:19:13 +0000 (15:19 +0300)]
i2c: atr: add static flag

Some I2C ATRs do not support dynamic remapping, only static mapping
of direct children.

Mappings will only be added or removed as a result of devices being
added or removed from a child bus.

The ATR pool will have to be big enough to accommodate all devices
expected to be added to the child buses.

Add a new flag that prevents old mappings to be replaced or new mappings
to be created in the alias finding code paths. That mens adding a flags
parameter to i2c_atr_new() and an i2c_atr_flags enum.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: allow replacing mappings in attach_addr()
Cosmin Tanislav [Wed, 7 May 2025 12:19:12 +0000 (15:19 +0300)]
i2c: atr: allow replacing mappings in attach_addr()

It is possible for aliases to be exhausted while we are still attaching
children.

Allow replacing mapping on attach by calling
i2c_atr_replace_mapping_by_addr() if i2c_atr_create_mapping_by_addr()
fails.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: deduplicate logic in attach_addr()
Cosmin Tanislav [Wed, 7 May 2025 12:19:11 +0000 (15:19 +0300)]
i2c: atr: deduplicate logic in attach_addr()

This is the same logic as in i2c_atr_create_mapping_by_addr().

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: do not create mapping in detach_addr()
Cosmin Tanislav [Wed, 7 May 2025 12:19:10 +0000 (15:19 +0300)]
i2c: atr: do not create mapping in detach_addr()

It is useless to create a new mapping just to detach it immediately.

Use the newly added i2c_atr_find_mapping_by_addr() function to avoid it,
and exit without logging an error if not found.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: split up i2c_atr_get_mapping_by_addr()
Cosmin Tanislav [Wed, 7 May 2025 12:19:09 +0000 (15:19 +0300)]
i2c: atr: split up i2c_atr_get_mapping_by_addr()

The i2c_atr_get_mapping_by_addr() function handles three separate
usecases: finding an existing mapping, creating a new mapping, or
replacing an existing mapping if a new mapping cannot be created
because there aren't enough aliases available.

Split up the function into three different functions handling its
individual usecases to prepare for better usage of each one.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: find_mapping() -> get_mapping()
Cosmin Tanislav [Wed, 7 May 2025 12:19:08 +0000 (15:19 +0300)]
i2c: atr: find_mapping() -> get_mapping()

A find operation implies that a null result is not an error.

Use get naming to clarify things and to prepare for splitting up the
logic inside this function.

Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: atr: Fix lockdep for nested ATRs
Tomi Valkeinen [Wed, 7 May 2025 12:19:07 +0000 (15:19 +0300)]
i2c: atr: Fix lockdep for nested ATRs

When we have an ATR, and another ATR as a subdevice of the first ATR,
we get lockdep warnings for the i2c_atr.lock and
i2c_atr_chan.orig_addrs_lock. This is because lockdep uses a static key
for the locks, and doesn't see the locks of the separate ATR instances
as separate.

Fix this by generating a dynamic lock key per lock instance.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: remove 'of_node' member from i2c_boardinfo
Wolfram Sang [Mon, 19 May 2025 11:13:14 +0000 (13:13 +0200)]
i2c: remove 'of_node' member from i2c_boardinfo

There is no user of this member anymore. We can remove it.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: use only 'fwnode' for client devices
Wolfram Sang [Mon, 19 May 2025 11:13:13 +0000 (13:13 +0200)]
i2c: use only 'fwnode' for client devices

No client sets 'of_node' anymore, so we don't need to handle the case in
the core anymore.

Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: powermac: convert of_node usage to fwnode
Wolfram Sang [Mon, 19 May 2025 11:13:12 +0000 (13:13 +0200)]
i2c: powermac: convert of_node usage to fwnode

'of_node' in i2c_boardinfo is deprecated in favor of 'fwnode'. The I2C
core handles them equally, so simply convert this driver to fwnode.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agodocs: i2c: Fix "resitors" to "resistors"
Sumanth Gavini [Sat, 17 May 2025 08:25:27 +0000 (01:25 -0700)]
docs: i2c: Fix "resitors" to "resistors"

Fix misspelling reported by codespell

Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: core: add useful info when defer probe
Xu Yang [Wed, 7 May 2025 10:27:14 +0000 (18:27 +0800)]
i2c: core: add useful info when defer probe

Add an useful info when failed to get irq/wakeirq due to -EPROBE_DEFER.

Before:
[   15.737361] i2c 2-0050: deferred probe pending: (reason unknown)

After:
[   15.816295] i2c 2-0050: deferred probe pending: tcpci: can't get irq

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Reviewed-by: Carlos Song <carlos.song@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2 months agoi2c: mlxbf: Use str_read_write() helper
Feng Wei [Tue, 1 Apr 2025 11:26:03 +0000 (19:26 +0800)]
i2c: mlxbf: Use str_read_write() helper

Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: Feng Wei <feng.wei8@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Link: https://lore.kernel.org/r/20250401192603311H5OxuFmUSbPc4VnQQkhZr@zte.com.cn
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: thunderx: Use non-hybrid PCI devres API
Philipp Stanner [Thu, 17 Apr 2025 08:25:12 +0000 (10:25 +0200)]
i2c: thunderx: Use non-hybrid PCI devres API

thunderx enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250417082511.22272-3-phasta@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: ismt: Use non-hybrid PCI devres API
Philipp Stanner [Thu, 17 Apr 2025 08:25:11 +0000 (10:25 +0200)]
i2c: ismt: Use non-hybrid PCI devres API

ismt enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_region() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Replace the call to sometimes-managed pci_request_region() with one to
the always-managed pcim_request_region().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250417082511.22272-2-phasta@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: davinci: add I2C_FUNC_PROTOCOL_MANGLING to feature list
Marcus Folkesson [Wed, 26 Mar 2025 14:39:47 +0000 (15:39 +0100)]
i2c: davinci: add I2C_FUNC_PROTOCOL_MANGLING to feature list

The driver do support I2C_M_IGNORE_NAK, so add
I2C_FUNC_PROTOCOL_MANGLING to the feature list.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250326-i2c-v1-1-82409ebe9f2b@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: i2c-rk3x: Add compatible string for RK3528
Yao Zi [Thu, 17 Apr 2025 12:01:17 +0000 (12:01 +0000)]
dt-bindings: i2c: i2c-rk3x: Add compatible string for RK3528

Document I2C controllers integrated in RK3528, which are compatible with
the RK3399 variant.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250417120118.17610-4-ziyao@disroot.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: smbus: introduce Write Disable-aware SPD instantiating functions
Yo-Jung (Leo) Lin [Wed, 30 Apr 2025 11:26:16 +0000 (19:26 +0800)]
i2c: smbus: introduce Write Disable-aware SPD instantiating functions

Some SMBus controllers may restrict writes to addresses where SPD sensors
may reside. This may lead to some SPD sensors not functioning correctly,
and might need extra handling. Introduce new SPD-instantiating functions
that are aware of this, and use them instead.

Signed-off-by: Yo-Jung Lin (Leo) <leo.lin@canonical.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250430-for-upstream-i801-spd5118-no-instantiate-v2-1-2f54d91ae2c7@canonical.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: renesas,riic: Document RZ/V2N (R9A09G056) support
Lad Prabhakar [Thu, 1 May 2025 20:33:10 +0000 (21:33 +0100)]
dt-bindings: i2c: renesas,riic: Document RZ/V2N (R9A09G056) support

Document support for the I2C Bus Interface (RIIC) found on the Renesas
RZ/V2N (R9A09G056) SoC. The RIIC IP is identical to that on RZ/V2H(P),
so `renesas,riic-r9a09g057` will be used as a fallback compatible,
enabling reuse of the existing driver without changes.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250501203310.140137-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: riic: Implement bus recovery
Lad Prabhakar [Thu, 1 May 2025 20:40:03 +0000 (21:40 +0100)]
i2c: riic: Implement bus recovery

Implement I2C bus recovery support for the RIIC controller by making use
of software-controlled SCL and SDA line manipulation. The controller allows
forcing SCL and SDA levels through control bits, which enables generation
of manual clock pulses and a stop condition to free a stuck bus.

This implementation wires up the bus recovery mechanism using
i2c_generic_scl_recovery and provides get/set operations for SCL and SDA.

This allows the RIIC driver to recover from bus hang scenarios where SDA
is held low by a slave.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Link: https://lore.kernel.org/r/20250501204003.141134-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: dw: Add Sophgo SG2044 SoC I2C controller
Inochi Amaoto [Sun, 13 Apr 2025 22:35:02 +0000 (06:35 +0800)]
dt-bindings: i2c: dw: Add Sophgo SG2044 SoC I2C controller

Add compatible string for Sophgo SG2044 SoC I2C controller which can be
used specifically for the SG2044 SoC.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250413223507.46480-9-inochiama@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: dw: merge duplicate compatible entry.
Inochi Amaoto [Sun, 13 Apr 2025 22:34:55 +0000 (06:34 +0800)]
dt-bindings: i2c: dw: merge duplicate compatible entry.

Each vendor have an items entry of its own compatible, It is needless
and some can be merged as it share the same base "snps,designware-i2c"
compatible.

Merge the duplicate compatible entry into one item entry.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250413223507.46480-2-inochiama@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: tegra: check msg length in SMBUS block read
Akhil R [Thu, 24 Apr 2025 05:33:20 +0000 (11:03 +0530)]
i2c: tegra: check msg length in SMBUS block read

For SMBUS block read, do not continue to read if the message length
passed from the device is '0' or greater than the maximum allowed bytes.

Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20250424053320.19211-1-akhilrajeev@nvidia.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Log bus reset causes
Hector Martin [Sun, 27 Apr 2025 11:30:46 +0000 (11:30 +0000)]
i2c: pasemi: Log bus reset causes

This ensures we get all information we need to debug issues when users
forward us their logs.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-4-af28568296c0@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Improve error recovery
Hector Martin [Sun, 27 Apr 2025 11:30:45 +0000 (11:30 +0000)]
i2c: pasemi: Improve error recovery

Add handling for all the missing error condition, and better recovery in
pasemi_smb_clear().

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
Co-developed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-3-af28568296c0@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Improve timeout handling
Sven Peter [Sun, 27 Apr 2025 11:30:44 +0000 (11:30 +0000)]
i2c: pasemi: Improve timeout handling

The hardware (supposedly) has a 25ms timeout for clock stretching
and the driver uses 100ms which should be plenty.
The interrupt path however misses handling for errors while waiting for
the completion and the polling path uses an open-coded readx_poll_timeout.
Note that we drop reg_write(smbus, REG_SMSTA, status) while fixing those
issues here which will be done anyway whenever the next transaction starts
via pasemi_smb_clear.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-2-af28568296c0@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Enable the unjam machine
Hector Martin [Sun, 27 Apr 2025 11:30:43 +0000 (11:30 +0000)]
i2c: pasemi: Enable the unjam machine

The I2C bus can get stuck under some conditions (desync between
controller and device). The pasemi controllers include an unjam feature
that is enabled on reset, but was being disabled by the driver. Keep it
enabled by explicitly setting the UJM bit in the CTL register. This
should help recover the bus from certain conditions, which would
otherwise remain stuck forever.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Link: https://lore.kernel.org/r/20250427-pasemi-fixes-v3-1-af28568296c0@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Remove unnecessary double negation
Andi Shyti [Fri, 18 Apr 2025 21:16:35 +0000 (23:16 +0200)]
i2c: iproc: Remove unnecessary double negation

True is true when greater than '0', no need for double negation
inside the if statement.

Link: https://lore.kernel.org/r/20250418211635.2666234-11-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: When there's an error treat it as an error
Andi Shyti [Fri, 18 Apr 2025 21:16:34 +0000 (23:16 +0200)]
i2c: iproc: When there's an error treat it as an error

If the xfer fails, it indicates a real error. Log it with an
error message instead of a debug message to reflect its severity.

Link: https://lore.kernel.org/r/20250418211635.2666234-10-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Move function and avoid prototypes
Andi Shyti [Sat, 26 Apr 2025 20:19:20 +0000 (22:19 +0200)]
i2c: iproc: Move function and avoid prototypes

Shuffle a bit the code in order to avoid prototypes.

Link: https://lore.kernel.org/r/20250426201920.272135-1-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Fix indentation of bcm_iproc_i2c_slave_init()
Andi Shyti [Fri, 18 Apr 2025 21:16:32 +0000 (23:16 +0200)]
i2c: iproc: Fix indentation of bcm_iproc_i2c_slave_init()

Adjust the indentation of the bcm_iproc_i2c_slave_init() function
definition to match standard kernel coding style. Don't end the
line with an open parenthesis.

Link: https://lore.kernel.org/r/20250418211635.2666234-8-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Replace udelay() with usleep_range()
Andi Shyti [Fri, 18 Apr 2025 21:16:31 +0000 (23:16 +0200)]
i2c: iproc: Replace udelay() with usleep_range()

Replace udelay(100) with usleep_range(100, 200) as recommended
by kernel documentation. The delay is not in atomic context, so
busy-waiting is unnecessary.

Also update the comment for clarity.

Link: https://lore.kernel.org/r/20250418211635.2666234-7-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Remove stray blank line in slave ISR
Andi Shyti [Fri, 18 Apr 2025 21:16:30 +0000 (23:16 +0200)]
i2c: iproc: Remove stray blank line in slave ISR

Drop an unnecessary blank line in bcm_iproc_i2c_slave_isr().

Link: https://lore.kernel.org/r/20250418211635.2666234-6-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Fix alignment to match the open parenthesis
Andi Shyti [Fri, 18 Apr 2025 21:16:29 +0000 (23:16 +0200)]
i2c: iproc: Fix alignment to match the open parenthesis

Alignment should match the open parenthesis but in some places it
didn't

Link: https://lore.kernel.org/r/20250418211635.2666234-5-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Use u32 instead of uint32_t
Andi Shyti [Fri, 18 Apr 2025 21:16:28 +0000 (23:16 +0200)]
i2c: iproc: Use u32 instead of uint32_t

In the kernel u32 should be used instead of unit32_t.

Link: https://lore.kernel.org/r/20250418211635.2666234-4-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Use dev_err_probe in probe
Andi Shyti [Fri, 18 Apr 2025 21:16:27 +0000 (23:16 +0200)]
i2c: iproc: Use dev_err_probe in probe

Use dev_err_probe() instead of dev_err() and then return.

Link: https://lore.kernel.org/r/20250418211635.2666234-3-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: iproc: Drop unnecessary initialisation of 'ret'
Andi Shyti [Fri, 18 Apr 2025 21:16:26 +0000 (23:16 +0200)]
i2c: iproc: Drop unnecessary initialisation of 'ret'

The 'ret' variable doesn't need to be initialised, as it is
always assigned before use.

While here, reorder the variable declarations in reverse
Christmas tree style, by line length.

Link: https://lore.kernel.org/r/20250418211635.2666234-2-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: amd-isp: Add ISP i2c-designware driver
Pratap Nirujogi [Thu, 24 Apr 2025 18:49:26 +0000 (14:49 -0400)]
i2c: amd-isp: Add ISP i2c-designware driver

The camera sensor is connected via ISP I2C bus in AMD SOC
architectures. Add new I2C designware driver to support
new camera sensors on AMD HW.

Co-developed-by: Venkata Narendra Kumar Gutta <vengutta@amd.com>
Signed-off-by: Venkata Narendra Kumar Gutta <vengutta@amd.com>
Co-developed-by: Bin Du <bin.du@amd.com>
Signed-off-by: Bin Du <bin.du@amd.com>
Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250424184952.1290019-1-pratap.nirujogi@amd.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agodt-bindings: i2c: i2c-mt65xx: Add MediaTek Dimensity 1200 MT6893
AngeloGioacchino Del Regno [Wed, 16 Apr 2025 12:03:03 +0000 (14:03 +0200)]
dt-bindings: i2c: i2c-mt65xx: Add MediaTek Dimensity 1200 MT6893

Add support for the MediaTek Dimensity 1200 (MT6893) SoC; this
chip's multiple I2C controller instances are fully compatible
with the ones found in the MT8192 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20250416120303.148017-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: octeon: add block-mode i2c operations
Aryan Srivastava [Mon, 24 Mar 2025 19:29:46 +0000 (08:29 +1300)]
i2c: octeon: add block-mode i2c operations

Add functions to perform block read and write operations. This applies
for cases where the requested operation is for >8 bytes of data.

When not using the block mode transfer, the driver will attempt a series
of 8 byte i2c operations until it reaches the desired total. For
example, for a 40 byte request the driver will complete 5 separate
transactions. This results in large transactions taking a significant
amount of time to process.

Add block mode such that the driver can request larger transactions, up
to 1024 bytes per transfer.

Many aspects of the block mode transfer is common with the regular 8
byte operations. Use generic functions for parts of the message
construction and sending the message. The key difference for the block
mode is the usage of separate FIFO buffer to store data.

Write to this buffer in the case of a write (before command send).
Read from this buffer in the case of a read (after command send).

Data is written into this buffer by placing data into the MSB onwards.
This means the bottom 8 bits of the data will match the top 8 bits, and
so on and so forth.

Set specific bits in message for block mode, enable block mode transfers
from global i2c management registers, construct message, send message,
read or write from FIFO buffer as required.

The block-mode transactions result in a significant speed increase in
large i2c requests.

Signed-off-by: Aryan Srivastava <aryan.srivastava@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20250324192946.3078712-2-aryan.srivastava@alliedtelesis.co.nz
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Sort includes alphabetically
Sven Peter [Tue, 15 Apr 2025 15:36:56 +0000 (15:36 +0000)]
i2c: pasemi: Sort includes alphabetically

No functional changes.

Signed-off-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://lore.kernel.org/r/20250415-pasemi-fixes-v2-2-c543bf53151a@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: pasemi: Use correct bits.h include
Sven Peter [Tue, 15 Apr 2025 15:36:55 +0000 (15:36 +0000)]
i2c: pasemi: Use correct bits.h include

When changing the #defines to use BIT and GENMASK the bitfield.h include
was added instead of the correct bits.h include.

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://lore.kernel.org/r/20250415-pasemi-fixes-v2-1-c543bf53151a@svenpeter.dev
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: designware: Use better constants from units.h
Andy Shevchenko [Wed, 16 Apr 2025 10:17:02 +0000 (13:17 +0300)]
i2c: designware: Use better constants from units.h

When we use constants in a time or frequency related contexts,
it's better to utilise the respective definitions that have
encoded units in them. This will make code better to read and
understand.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250416101702.2128740-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: scx200_acb: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:47 +0000 (20:34 +0200)]
i2c: scx200_acb: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-11-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:46 +0000 (20:34 +0200)]
i2c: i2c-xiic: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: virtio: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:44 +0000 (20:34 +0200)]
i2c: virtio: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-8-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: viperboard: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:43 +0000 (20:34 +0200)]
i2c: viperboard: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-7-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: viapro: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:42 +0000 (20:34 +0200)]
i2c: viapro: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-6-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: via: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:40 +0000 (20:34 +0200)]
i2c: via: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-4-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: uniphier: Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:39 +0000 (20:34 +0200)]
i2c: uniphier: Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-3-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: uniphier(-f): Replace dev_err() with dev_err_probe() in probe function
Enrico Zanda [Tue, 15 Apr 2025 18:34:38 +0000 (20:34 +0200)]
i2c: uniphier(-f): Replace dev_err() with dev_err_probe() in probe function

This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Link: https://lore.kernel.org/r/20250415183447.396277-2-e.zanda1@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: npcm: Add clock toggle recovery
Tali Perry [Fri, 28 Mar 2025 19:32:50 +0000 (19:32 +0000)]
i2c: npcm: Add clock toggle recovery

During init of the bus, the module checks that the bus is idle.
If one of the lines are stuck try to recover them first before failing.
Sometimes SDA and SCL are low if improper reset occurs (e.g., reboot).

Signed-off-by: Tali Perry <tali.perry1@gmail.com>
Signed-off-by: Mohammed Elbadry <mohammed.0.elbadry@gmail.com>
Reviewed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250328193252.1570811-1-mohammed.0.elbadry@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: rzv2m: Constify struct i2c_algorithm
Christophe JAILLET [Sat, 29 Mar 2025 14:37:07 +0000 (15:37 +0100)]
i2c: rzv2m: Constify struct i2c_algorithm

'struct i2c_algorithm' is 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.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  11027     646      16   11689    2da9 drivers/i2c/busses/i2c-rzv2m.o

After:
=====
   text    data     bss     dec     hex filename
  11107     566      16   11689    2da9 drivers/i2c/busses/i2c-rzv2m.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Link: https://lore.kernel.org/r/537d93441ced53bffa6553b8ec93d007e64cb9a5.1743258995.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: imx: add some dev_err_probe calls
Alexander Stein [Tue, 8 Apr 2025 10:02:59 +0000 (12:02 +0200)]
i2c: imx: add some dev_err_probe calls

Add corresponding error messages if DMA channels are not available during
probe. Using dev_err_probe adds deferred probe messages as well.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20250408100300.556703-1-alexander.stein@ew.tq-group.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: xgene-slimpro: Simplify PCC shared memory region handling
Sudeep Holla [Fri, 11 Apr 2025 11:23:03 +0000 (12:23 +0100)]
i2c: xgene-slimpro: Simplify PCC shared memory region handling

The PCC driver now handles mapping and unmapping of shared memory
areas as part of pcc_mbox_{request,free}_channel(). Without these before,
this xgene-slimpro I2C driver did handling of those mappings like several
other PCC mailbox client drivers.

There were redundant operations, leading to unnecessary code. Maintaining
the consistency across these driver was harder due to scattered handling
of shmem.

Just use the mapped shmem and remove all redundant operations from this
driver.

Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250411112303.1149086-1-sudeep.holla@arm.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: lpc2k: Add check for clk_enable()
Chenyuan Yang [Sat, 12 Apr 2025 19:37:13 +0000 (14:37 -0500)]
i2c: lpc2k: Add check for clk_enable()

Add check for the return value of clk_enable() to catch
the potential error.

This is similar to the commit 8332e6670997
("spi: zynq-qspi: Add check for clk_enable()").

Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Link: https://lore.kernel.org/r/20250412193713.105838-1-chenyuan0y@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: npcm7xx: Remove redundant ret variable
Zhang Songyi [Thu, 20 Mar 2025 00:43:21 +0000 (01:43 +0100)]
i2c: npcm7xx: Remove redundant ret variable

Return value from npcm_i2c_get_slave_addr() directly instead of taking
this in another redundant variable.

This improvement has been suggested by Zeal Robot <zealci@zte.com.cn>

Signed-off-by: Zhang Songyi <zhang.songyi@zte.com.cn>
Link: https://lore.kernel.org/r/20250320004321.1914366-1-andi.shyti@kernel.org
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoi2c: qcom-geni: Use generic definitions for bus frequencies
Andy Shevchenko [Sat, 22 Mar 2025 14:47:36 +0000 (16:47 +0200)]
i2c: qcom-geni: Use generic definitions for bus frequencies

Since we have generic definitions for bus frequencies, let's use them.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org>
Reviewed-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Link: https://lore.kernel.org/r/20250322144736.472777-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
2 months agoLinux 6.15-rc7
Linus Torvalds [Sun, 18 May 2025 20:57:29 +0000 (13:57 -0700)]
Linux 6.15-rc7

2 months agoMerge tag 'dmaengine-fix-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Sat, 17 May 2025 19:53:39 +0000 (12:53 -0700)]
Merge tag 'dmaengine-fix-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:
 "This has a bunch of idxd driver fixes, dmatest revert and bunch of
  smaller driver fixes:

   - a bunch of idxd potential mem leak fixes

   - dmatest revert for waiting for interrupt fix as that causes issue

   - a couple of ti k3 udma fixes for locking and cap_mask

   - mediatek deadlock fix and unused variable cleanup fix"

* tag 'dmaengine-fix-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: mediatek: drop unused variable
  dmaengine: fsl-edma: Fix return code for unhandled interrupts
  dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()
  dmaengine: idxd: Fix ->poll() return value
  dmaengine: idxd: Refactor remove call with idxd_cleanup() helper
  dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call
  dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe
  dmaengine: idxd: fix memory leak in error handling path of idxd_alloc
  dmaengine: idxd: Add missing cleanups in cleanup internals
  dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals
  dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups
  dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines
  dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs
  dmaengine: ptdma: Move variable condition check to the first place and remove redundancy
  dmaengine: idxd: Fix allowing write() from different address spaces
  dmaengine: ti: k3-udma: Add missing locking
  dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
  dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
  dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open

2 months agoMerge tag 'phy-fixes-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Linus Torvalds [Sat, 17 May 2025 19:49:47 +0000 (12:49 -0700)]
Merge tag 'phy-fixes-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull phy fixes from Vinod Koul:
 "A bunch of renesas fixes and few smaller fixes in other drivers:

   - Rensas fixes for unbind ole detection, irq, locking etc

   - tegra fixes for error handling at init and UTMI power states and
     stray unlock fix

   - rockchip missing assignment and pll output fixes

   - startfive usb host detection fixes"

* tag 'phy-fixes-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: Fix error handling in tegra_xusb_port_init
  phy: renesas: rcar-gen3-usb2: Set timing registers only once
  phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
  phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
  phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
  phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind
  phy: tegra: xusb: remove a stray unlock
  phy: phy-rockchip-samsung-hdptx: Fix PHY PLL output 50.25MHz error
  phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure
  phy: rockchip-samsung-dcphy: Add missing assignment
  phy: can-transceiver: Re-instate "mux-states" property presence check
  phy: qcom-qmp-ufs: check for mode type for phy setting
  phy: tegra: xusb: Use a bitmask for UTMI pad power state tracking

2 months agoMerge tag 'soundwire-6.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 17 May 2025 19:04:19 +0000 (12:04 -0700)]
Merge tag 'soundwire-6.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire fix from Vinod Koul:

 - Fix for irq domain creation race in the core

* tag 'soundwire-6.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: bus: Fix race on the creation of the IRQ domain

2 months agoMerge tag 'mm-hotfixes-stable-2025-05-17-09-41' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 17 May 2025 17:56:52 +0000 (10:56 -0700)]
Merge tag 'mm-hotfixes-stable-2025-05-17-09-41' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull hotfixes from Andrew Morton:
 "Nine singleton hotfixes, all MM.  Four are cc:stable"

* tag 'mm-hotfixes-stable-2025-05-17-09-41' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm: userfaultfd: correct dirty flags set for both present and swap pte
  zsmalloc: don't underflow size calculation in zs_obj_write()
  mm/page_alloc: fix race condition in unaccepted memory handling
  mm/page_alloc: ensure try_alloc_pages() plays well with unaccepted memory
  MAINTAINERS: add mm GUP section
  mm/codetag: move tag retrieval back upfront in __free_pages()
  mm/memory: fix mapcount / refcount sanity check for mTHP reuse
  kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
  mm: hugetlb: fix incorrect fallback for subpool

2 months agoMerge tag 'irq-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 17 May 2025 16:02:11 +0000 (09:02 -0700)]
Merge tag 'irq-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc irqchip driver fixes from Ingo Molnar:

 - Remove the MSI_CHIP_FLAG_SET_ACK flag from 5 irqchip drivers
   that did not require it

 - Fix IRQ handling delays in the riscv-imsic irqchip driver

* tag 'irq-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/riscv-imsic: Start local sync timer on correct CPU
  irqchip: Drop MSI_CHIP_FLAG_SET_ACK from unsuspecting MSI drivers

2 months agoMerge tag 'x86-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 17 May 2025 15:43:51 +0000 (08:43 -0700)]
Merge tag 'x86-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc x86 fixes from Ingo Molnar:

 - Fix SEV-SNP kdump bugs

 - Update the email address of Alexey Makhalov in MAINTAINERS

 - Add the CPU feature flag for the Zen6 microarchitecture

 - Fix typo in system message

* tag 'x86-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Remove duplicated word in warning message
  x86/CPU/AMD: Add X86_FEATURE_ZEN6
  x86/sev: Make sure pages are not skipped during kdump
  x86/sev: Do not touch VMSA pages during SNP guest memory kdump
  MAINTAINERS: Update Alexey Makhalov's email address
  x86/sev: Fix operator precedence in GHCB_MSR_VMPL_REQ_LEVEL macro

2 months agoMerge tag 'perf-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 17 May 2025 15:38:11 +0000 (08:38 -0700)]
Merge tag 'perf-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 perf event fix from Ingo Molnar:
 "Fix PEBS-via-PT crash"

* tag 'perf-urgent-2025-05-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Fix segfault with PEBS-via-PT with sample_freq

2 months agoMerge tag 'loongarch-fixes-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 17 May 2025 14:48:25 +0000 (07:48 -0700)]
Merge tag 'loongarch-fixes-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch fixes from Huacai Chen:
 "Fix some bugs in kernel-fpu, cpu idle function, hibernation and
  uprobes"

* tag 'loongarch-fixes-6.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  LoongArch: uprobes: Remove redundant code about resume_era
  LoongArch: uprobes: Remove user_{en,dis}able_single_step()
  LoongArch: Save and restore CSR.CNTC for hibernation
  LoongArch: Move __arch_cpu_idle() to .cpuidle.text section
  LoongArch: Fix MAX_REG_OFFSET calculation
  LoongArch: Prevent cond_resched() occurring within kernel-fpu

2 months agoMerge tag 'i2c-for-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sat, 17 May 2025 14:46:42 +0000 (07:46 -0700)]
Merge tag 'i2c-for-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:

 - designware: cleanup properly on probe failure

* tag 'i2c-for-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: designware: Fix an error handling path in i2c_dw_pci_probe()

2 months agoMerge tag 'i2c-host-fixes-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel...
Wolfram Sang [Sat, 17 May 2025 08:22:34 +0000 (10:22 +0200)]
Merge tag 'i2c-host-fixes-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

i2c-host-fixes for v6.15-rc7

- designware: cleanup properly on probe failure

2 months agoMerge tag '6.15-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 17 May 2025 01:02:41 +0000 (18:02 -0700)]
Merge tag '6.15-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - Fix memory leak in mkdir error path

 - Fix max rsize miscalculation after channel reconnect

* tag '6.15-rc6-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix zero rsize error messages
  smb: client: fix memory leak during error handling for POSIX mkdir

2 months agoMerge tag 'drm-fixes-2025-05-17' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Fri, 16 May 2025 23:07:39 +0000 (16:07 -0700)]
Merge tag 'drm-fixes-2025-05-17' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly drm fixes, I'll be honest and say I think this is larger than
  I'd prefer at this point, the main blow out point is that xe has two
  larger fixes.

  One is a fix for active context utilisation reporting, it's for a
  reported regression and will end up in stable anyways, so I don't see
  any point in holding it up.

  The second is a fix for mixed cpu/gpu atomics, which are currently
  broken, but are also not something your average desktop/laptop user is
  going to hit in normal operation, and having them fixed now is better
  than threading them through stable later.

  Other than those, it's mostly the usual, a bunch of amdgpu randoms and
  a few other minor fixes.

  dma-buf:
   - Avoid memory reordering in fence handling

  meson:
   - Avoid integer overflow in mode-clock calculations

  panel-mipi-dbi:
   - Fix output with drm_client_setup_with_fourcc()

  amdgpu:
   - Fix CSA unmap
   - Fix MALL size reporting on GFX11.5
   - AUX fix
   - DCN 3.5 fix
   - VRR fix
   - DP MST fix
   - DML 2.1 fixes
   - Silence DP AUX spam
   - DCN 4.0.1 cursor fix
   - VCN 4.0.5 fix

  ivpu:
   - Fix buffer size in debugfs code

  gpuvm:
   - Add timeslicing and allocation restriction for SVM

  xe:
   - Fix shrinker debugfs name
   - Add HW workaround to Xe2
   - Fix SVM when mixing GPU and CPU atomics
   - Fix per client engine utilization due to active contexts not saving
     timestamp with lite restore enabled"

* tag 'drm-fixes-2025-05-17' of https://gitlab.freedesktop.org/drm/kernel: (24 commits)
  drm/xe: Add WA BB to capture active context utilization
  drm/xe: Save the gt pointer in lrc and drop the tile
  drm/xe: Save CTX_TIMESTAMP mmio value instead of LRC value
  drm/xe: Timeslice GPU on atomic SVM fault
  drm/gpusvm: Add timeslicing support to GPU SVM
  drm/xe: Strict migration policy for atomic SVM faults
  drm/gpusvm: Introduce devmem_only flag for allocation
  drm/xe/xe2hpg: Add Wa_22021007897
  drm/amdgpu: read back register after written for VCN v4.0.5
  Revert "drm/amd/display: Hardware cursor changes color when switched to software cursor"
  dma-buf: insert memory barrier before updating num_fences
  drm/xe: Fix the gem shrinker name
  drm/amd/display: Avoid flooding unnecessary info messages
  drm/amd/display: Fix null check of pipe_ctx->plane_state for update_dchubp_dpp
  drm/amd/display: check stream id dml21 wrapper to get plane_id
  drm/amd/display: fix link_set_dpms_off multi-display MST corner case
  drm/amd/display: Defer BW-optimization-blocked DRR adjustments
  Revert: "drm/amd/display: Enable urgent latency adjustment on DCN35"
  drm/amd/display: Correct the reply value when AUX write incomplete
  drm/amdgpu: fix incorrect MALL size for GFX1151
  ...

2 months agoMerge tag 'nfs-for-6.15-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Fri, 16 May 2025 21:29:12 +0000 (14:29 -0700)]
Merge tag 'nfs-for-6.15-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - NFS: Fix a couple of missed handlers for the ENETDOWN and ENETUNREACH
   transport errors

 - NFS: Handle Oopsable failure of nfs_get_lock_context in the unlock
   path

 - NFSv4: Fix a race in nfs_local_open_fh()

 - NFSv4/pNFS: Fix a couple of layout segment leaks in layoutreturn

 - NFSv4/pNFS Avoid sharing pNFS DS connections between net namespaces
   since IP addresses are not guaranteed to refer to the same nodes

 - NFS: Don't flush file data while holding multiple directory locks in
   nfs_rename()

* tag 'nfs-for-6.15-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Avoid flushing data while holding directory locks in nfs_rename()
  NFS/pnfs: Fix the error path in pnfs_layoutreturn_retry_later_locked()
  NFSv4/pnfs: Reset the layout state after a layoutreturn
  NFS/localio: Fix a race in nfs_local_open_fh()
  nfs: nfs3acl: drop useless assignment in nfs3_get_acl()
  nfs: direct: drop useless initializer in nfs_direct_write_completion()
  nfs: move the nfs4_data_server_cache into struct nfs_net
  nfs: don't share pNFS DS connections between net namespaces
  nfs: handle failure of nfs_get_lock_context in unlock path
  pNFS/flexfiles: Record the RPC errors in the I/O tracepoints
  NFSv4/pnfs: Layoutreturn on close must handle fatal networking errors
  NFSv4: Handle fatal ENETDOWN and ENETUNREACH errors

2 months agoNFS: Avoid flushing data while holding directory locks in nfs_rename()
Trond Myklebust [Sun, 27 Apr 2025 22:21:06 +0000 (18:21 -0400)]
NFS: Avoid flushing data while holding directory locks in nfs_rename()

The Linux client assumes that all filehandles are non-volatile for
renames within the same directory (otherwise sillyrename cannot work).
However, the existence of the Linux 'subtree_check' export option has
meant that nfs_rename() has always assumed it needs to flush writes
before attempting to rename.

Since NFSv4 does allow the client to query whether or not the server
exhibits this behaviour, and since knfsd does actually set the
appropriate flag when 'subtree_check' is enabled on an export, it
should be OK to optimise away the write flushing behaviour in the cases
where it is clearly not needed.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
2 months agoNFS/pnfs: Fix the error path in pnfs_layoutreturn_retry_later_locked()
Trond Myklebust [Sat, 10 May 2025 15:05:36 +0000 (11:05 -0400)]
NFS/pnfs: Fix the error path in pnfs_layoutreturn_retry_later_locked()

If there isn't a valid layout, or the layout stateid has changed, the
cleanup after a layout return should clear out the old data.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2 months agoNFSv4/pnfs: Reset the layout state after a layoutreturn
Trond Myklebust [Sat, 10 May 2025 14:50:13 +0000 (10:50 -0400)]
NFSv4/pnfs: Reset the layout state after a layoutreturn

If there are still layout segments in the layout plh_return_lsegs list
after a layout return, we should be resetting the state to ensure they
eventually get returned as well.

Fixes: 68f744797edd ("pNFS: Do not free layout segments that are marked for return")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2 months agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 16 May 2025 17:28:22 +0000 (10:28 -0700)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "Fix to zone block devices to make the maximum segment count match what
  the block layer is capable of"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer

2 months agoMerge tag 'block-6.15-20250515' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 16 May 2025 17:21:25 +0000 (10:21 -0700)]
Merge tag 'block-6.15-20250515' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Christoph:
      - fixes for atomic writes (Alan Adamson)
      - fixes for polled CQs in nvmet-epf (Damien Le Moal)
      - fix for polled CQs in nvme-pci (Keith Busch)
      - fix compile on odd configs that need to be forced to inline
        (Kees Cook)
      - one more quirk (Ilya Guterman)

 - Fix for missing allocation of an integrity buffer for some cases

 - Fix for a regression with ublk command cancelation

* tag 'block-6.15-20250515' of git://git.kernel.dk/linux:
  ublk: fix dead loop when canceling io command
  nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
  nvme: all namespaces in a subsystem must adhere to a common atomic write size
  nvme: multipath: enable BLK_FEAT_ATOMIC_WRITES for multipathing
  nvmet: pci-epf: remove NVMET_PCI_EPF_Q_IS_SQ
  nvmet: pci-epf: improve debug message
  nvmet: pci-epf: cleanup nvmet_pci_epf_raise_irq()
  nvmet: pci-epf: do not fall back to using INTX if not supported
  nvmet: pci-epf: clear completion queue IRQ flag on delete
  nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable
  nvme-pci: make nvme_pci_npages_prp() __always_inline
  block: always allocate integrity buffer when required

2 months agoMerge tag 'io_uring-6.15-20250515' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 16 May 2025 16:59:24 +0000 (09:59 -0700)]
Merge tag 'io_uring-6.15-20250515' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a regression with highmem and mapping of regions, where
   the coalescing code assumes any page is directly mapped

 - Fix an issue with HYBRID_IOPOLL and passthrough commands,
   where the timer wasn't always setup correctly

 - Fix an issue with fdinfo not correctly locking around reading
   the rings, which can be an issue if the ring is being resized
   at the same time

* tag 'io_uring-6.15-20250515' of git://git.kernel.dk/linux:
  io_uring/fdinfo: grab ctx->uring_lock around io_uring_show_fdinfo()
  io_uring/memmap: don't use page_address() on a highmem page
  io_uring/uring_cmd: fix hybrid polling initialization issue

2 months agoMerge tag 'xfs-fixes-6.15-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Fri, 16 May 2025 16:51:49 +0000 (09:51 -0700)]
Merge tag 'xfs-fixes-6.15-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
 "This includes a bug fix for a possible data corruption vector on the
  zoned allocator garbage collector"

* tag 'xfs-fixes-6.15-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: Fix comment on xfs_trans_ail_update_bulk()
  xfs: Fix a comment on xfs_ail_delete
  xfs: Fail remount with noattr2 on a v5 with v4 enabled
  xfs: fix zoned GC data corruption due to wrong bv_offset
  xfs: free up mp->m_free[0].count in error case

2 months agoMerge tag 'acpi-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 16 May 2025 16:40:07 +0000 (09:40 -0700)]
Merge tag 'acpi-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix ACPI PPTT parsing code to address a regression introduced recently
  and add more sanity checking of data supplied by the platform firmware
  to avoid using invalid data (Jeremy Linton)"

* tag 'acpi-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: PPTT: Fix processor subtable walk

2 months agoMerge tag 'spi-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brooni...
Linus Torvalds [Fri, 16 May 2025 16:24:54 +0000 (09:24 -0700)]
Merge tag 'spi-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few small driver specific fixes, the most substantial one being the
  Tegra one which fixes spurious errors with default delays for chip
  select hold times"

* tag 'spi-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-sun4i: fix early activation
  spi: tegra114: Use value to check for invalid delays
  spi: loopback-test: Do not split 1024-byte hexdumps

2 months agoMerge tag 'regulator-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 16 May 2025 16:19:37 +0000 (09:19 -0700)]
Merge tag 'regulator-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "This fixes an invalid memory access in the MAX20086 driver which could
  occur during error handling for failed probe due to a hidden use of
  devres in the core DT parsing code"

* tag 'regulator-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: max20086: fix invalid memory access

2 months agoMerge tag 'gpio-fixes-for-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 16 May 2025 16:13:51 +0000 (09:13 -0700)]
Merge tag 'gpio-fixes-for-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix an interrupt storm on system wake-up in gpio-pca953x

 - fix an out-of-bounds write in gpio-virtuser

 - update MAINTAINERS with an entry for the sloppy logic analyzer

* tag 'gpio-fixes-for-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: virtuser: fix potential out-of-bound write
  gpio: pca953x: fix IRQ storm on system wake up
  MAINTAINERS: add me as maintainer for the gpio sloppy logic analyzer

2 months agoMerge tag 'sound-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 16 May 2025 16:06:12 +0000 (09:06 -0700)]
Merge tag 'sound-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A handful small fixes. The only significant change is the fix for MIDI
  2.0 UMP handling in ALSA sequencer, but as MIDI 2.0 stuff is still new
  and rarely used, the impact should be pretty limited.

  Other than that, quirks for USB-audio and a few cosmetic fixes and
  changes in drivers that should be safe to apply"

* tag 'sound-6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera
  ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
  ALSA: sh: SND_AICA should depend on SH_DMA_API
  ALSA: usb-audio: Add sample rate quirk for Audioengine D1
  ALSA: ump: Fix a typo of snd_ump_stream_msg_device_info
  ALSA/hda: intel-sdw-acpi: Correct sdw_intel_acpi_scan() function parameter
  ALSA: seq: Fix delivery of UMP events to group ports

2 months agox86/mm: Remove duplicated word in warning message
Lukas Bulwahn [Fri, 16 May 2025 09:08:10 +0000 (11:08 +0200)]
x86/mm: Remove duplicated word in warning message

Commit bbeb69ce3013 ("x86/mm: Remove CONFIG_HIGHMEM64G support") introduces
a new warning message MSG_HIGHMEM_TRIMMED, which accidentally introduces a
duplicated 'for for' in the warning message.

Remove this duplicated word.

This was noticed while reviewing for references to obsolete kernel build
config options.

Fixes: bbeb69ce3013 ("x86/mm: Remove CONFIG_HIGHMEM64G support")
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Link: https://lore.kernel.org/r/20250516090810.556623-1-lukas.bulwahn@redhat.com
2 months agoMerge tag 'drm-xe-fixes-2025-05-15-1' of https://gitlab.freedesktop.org/drm/xe/kernel...
Dave Airlie [Fri, 16 May 2025 01:21:29 +0000 (11:21 +1000)]
Merge tag 'drm-xe-fixes-2025-05-15-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes

Core Changes:
- Add timeslicing and allocation restriction for SVM

Driver Changes:
- Fix shrinker debugfs name
- Add HW workaround to Xe2
- Fix SVM when mixing GPU and CPU atomics
- Fix per client engine utilization due to active contexts
  not saving timestamp with lite restore enabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/qil4scyn6ucnt43u5ju64bi7r7n5r36k4pz5rsh2maz7isle6g@lac3jpsjrrvs