linux/drivers/base
Jim Wylder f8f08fba92 regmap-i2c: Subtract reg size from max_write
[ Upstream commit 611b7eb19d ]

Currently, when an adapter defines a max_write_len quirk,
the data will be chunked into data sizes equal to the
max_write_len quirk value.  But the payload will be increased by
the size of the register address before transmission.  The
resulting value always ends up larger than the limit set
by the quirk.

Avoid this error by setting regmap's max_write to the quirk's
max_write_len minus the number of bytes for the register and
padding.  This allows the chunking to work correctly for this
limited case without impacting other use-cases.

Signed-off-by: Jim Wylder <jwylder@google.com>
Link: https://msgid.link/r/20240523211437.2839942-1-jwylder@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-18 13:07:35 +02:00
..
firmware_loader firmware_loader: use kernel credentials when reading firmware 2022-05-18 10:26:53 +02:00
power PM: sleep: wakeirq: fix wake irq warning in system suspend 2024-04-10 16:18:37 +02:00
regmap regmap-i2c: Subtract reg size from max_write 2024-07-18 13:07:35 +02:00
test driver core: test_async: fix an error code 2023-09-19 12:22:45 +02:00
arch_numa.c arm64: irq: set the correct node for VMAP stack 2024-02-23 08:54:36 +01:00
arch_topology.c arm64: topology: move store_cpu_topology() to shared code 2022-10-26 12:34:22 +02:00
attribute_container.c driver core: attribute_container: fix W=1 warnings 2021-05-14 13:37:10 +02:00
auxiliary.c Merge 5.14-rc3 into driver-core-next 2021-07-27 09:22:08 +02:00
base.h software nodes: Split software_node_notify() 2021-07-16 19:17:05 +02:00
bus.c driver: base: fix UAF when driver_attach failed 2022-06-14 18:36:09 +02:00
cacheinfo.c cacheinfo: clear cache_leaves(cpu) in free_cache_attributes() 2021-07-21 17:29:40 +02:00
class.c class: fix possible memory leak in __class_register() 2022-12-31 13:14:27 +01:00
component.c drivers: base: component: fix memory leak with using debugfs_lookup() 2023-03-11 13:57:38 +01:00
container.c
core.c drivers: core: synchronize really_probe() and dev_uevent() 2024-07-05 09:14:19 +02:00
cpu.c x86/rfds: Mitigate Register File Data Sampling (RFDS) 2024-04-10 16:18:48 +02:00
dd.c driver core: Release all resources during unbind before updating device links 2023-11-28 16:56:36 +00:00
devcoredump.c devcoredump: Send uevent once devcd is ready 2023-12-13 18:36:50 +01:00
devres.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
devtmpfs.c devtmpfs regression fix: reconfigure on each mount 2022-01-20 09:13:13 +01:00
driver.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 17:26:43 +01:00
firmware.c
hypervisor.c
init.c init: Initialize noop_backing_dev_info early 2022-06-22 14:22:02 +02:00
isa.c bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
Kconfig RISC-V Patches for the 5.12 Merge Window 2021-02-26 10:28:35 -08:00
Makefile devres: Enable trace events 2021-06-15 17:14:36 +02:00
map.c driver: base: Prefer unsigned int to bare use of unsigned 2021-07-21 17:30:09 +02:00
memory.c mm/hwpoison: avoid the impact of hwpoison_filter() return value on mce handler 2022-07-12 16:35:05 +02:00
module.c
node.c drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist 2022-08-31 17:16:35 +02:00
pinctrl.c
platform-msi.c platform-msi: Add ABI to show msi_irqs of platform devices 2021-08-24 09:16:20 +02:00
platform.c driver: platform: Add helper for safer setting of driver_override 2023-11-08 17:26:43 +01:00
property.c device property: Allow const parameter to dev_fwnode() 2024-01-05 15:13:40 +01:00
soc.c soc: fix comment for freeing soc_dev_attr 2020-12-09 19:46:31 +01:00
swnode.c software node: Let args be NULL in software_node_get_reference_args 2024-01-25 14:52:51 -08:00
syscore.c
topology.c drivers/base: fix userspace break from using bin_attributes for cpumap and cpulist 2022-08-31 17:16:35 +02:00
trace.c devres: Enable trace events 2021-06-15 17:14:36 +02:00
trace.h devres: Enable trace events 2021-06-15 17:14:36 +02:00
transport_class.c drivers: base: transport_class: fix resource leak when transport_add_device() fails 2023-03-10 09:39:39 +01:00