[PATCH v2] ASoC: sta3xx: Fix "st,drop-compensation-ns" size

From: Rob Herring (Arm)

Date: Tue Sep 01 2026 - 13:13:42 EST


The "st,drop-compensation-ns" property size is u32 not u16 based on the
schema and one in-tree user.

Assisted-by: Codex:gpt-5-5
Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
---
v2:
- Split to separate patch
---
sound/soc/codecs/sta32x.c | 6 +++---
sound/soc/codecs/sta350.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index d6de739212f9..7e73150f6832 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -1035,7 +1035,7 @@ static int sta32x_probe_dt(struct device *dev, struct sta32x_priv *sta32x)
{
struct device_node *np = dev->of_node;
struct sta32x_platform_data *pdata;
- u16 tmp;
+ u32 tmp;

pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
@@ -1060,8 +1060,8 @@ static int sta32x_probe_dt(struct device *dev, struct sta32x_priv *sta32x)
of_property_read_bool(np, "st,needs_esd_watchdog");

tmp = 140;
- of_property_read_u16(np, "st,drop-compensation-ns", &tmp);
- pdata->drop_compensation_ns = clamp_t(u16, tmp, 0, 300) / 20;
+ of_property_read_u32(np, "st,drop-compensation-ns", &tmp);
+ pdata->drop_compensation_ns = clamp_t(u32, tmp, 0, 300) / 20;

/* CONFE */
pdata->max_power_use_mpcc =
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
index 2ba35076732b..208bf0e22bec 100644
--- a/sound/soc/codecs/sta350.c
+++ b/sound/soc/codecs/sta350.c
@@ -1087,7 +1087,7 @@ static int sta350_probe_dt(struct device *dev, struct sta350_priv *sta350)
struct device_node *np = dev->of_node;
struct sta350_platform_data *pdata;
const char *ffx_power_mode;
- u16 tmp;
+ u32 tmp;
u8 tmp8;

pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
@@ -1127,8 +1127,8 @@ static int sta350_probe_dt(struct device *dev, struct sta350_priv *sta350)
}

tmp = 140;
- of_property_read_u16(np, "st,drop-compensation-ns", &tmp);
- pdata->drop_compensation_ns = clamp_t(u16, tmp, 0, 300) / 20;
+ of_property_read_u32(np, "st,drop-compensation-ns", &tmp);
+ pdata->drop_compensation_ns = clamp_t(u32, tmp, 0, 300) / 20;

pdata->oc_warning_adjustment =
of_property_read_bool(np, "st,overcurrent-warning-adjustment");
--
2.53.0