summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorDavid Heidelberg <david@ixit.cz>2026-09-03 16:42:05 +0200
committerLee Jones <lee@kernel.org>2026-09-10 17:32:07 +0100
commit5a5f978cf3cd2f50b9e123f851f5c6577519ee89 (patch)
tree2adf4b061137e73c7898f7b103426e082a5edbd5 /drivers/mfd
parent3c0de351738ea03c455bc7bb0ba54de00fc024a3 (diff)
downloadlinux-next-5a5f978cf3cd2f50b9e123f851f5c6577519ee89.tar.gz
linux-next-5a5f978cf3cd2f50b9e123f851f5c6577519ee89.zip
mfd: wcd934x: set DMA mask on parent to silence "DMA mask not set"
The wcd934x MFD parent (a slim_device) never initializes its dma_mask/coherent_dma_mask. When the DT-aware children pass through of_dma_configure() this triggers the "DMA mask not set" warning for each child. Cc: stable@vger.kernel.org Fixes: f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference") Assisted-by: tencent:hy3 Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://patch.msgid.link/20260903-wcd-dma-v2-1-189cff560a28@ixit.cz Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/wcd934x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mfd/wcd934x.c b/drivers/mfd/wcd934x.c
index 3c3080e8c8cf..7bea64fc0956 100644
--- a/drivers/mfd/wcd934x.c
+++ b/drivers/mfd/wcd934x.c
@@ -2,6 +2,7 @@
// Copyright (c) 2019, Linaro Limited
#include <linux/clk.h>
+#include <linux/dma-mapping.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
@@ -217,6 +218,11 @@ static int wcd934x_slim_probe(struct slim_device *sdev)
struct gpio_desc *reset_gpio;
int ret;
+ ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
+ if (ret)
+ return dev_err_probe(dev, ret,
+ "Failed to set DMA mask\n");
+
ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata)
return -ENOMEM;