From nobody Fri Jul 24 21:27:33 2026 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D62B2931FF for ; Fri, 24 Jul 2026 13:01:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784898099; cv=none; b=CRISxSTdNoxevyJmq2bsq7JIIC1xTVDBEJuhpz5pYe7fkXlICEXcU/jUI/QTWSzjpw8P4oaCpQoMNNw6o6skZgBBVvlEKp7yb6xox+BMvh6QBowLx93NSr7rc7sOFRQB3uYEGLnw2ebhp4XP2IAe6ZyIuB/ItevGrFJ/UvKmggo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784898099; c=relaxed/simple; bh=CKwM/9o6XC1frP3TdHZrFXb08H0reDc9OwuOpAhOYG0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uXD3xJsKW78KujJZ3plPGITHmu2l70s1qlsbfwEAyu8pJ56zd2hYJ1GvAgG4f0TGlcyu+su8wFUP6nFdboQIHwVqFap/Ev+pAMUSTL/9cuwz4ZM6tUP925jiDAKoNd9eBJzgMKWRshF8awmG7BjsLukWPcmvgykEBoVMKqwXUeY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dugPHRUr; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dugPHRUr" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-38125cebfdaso461069a91.1 for ; Fri, 24 Jul 2026 06:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784898097; x=1785502897; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=KWSzgoADyXumYAGz6QoG8y0ywKHUqveo6iLUqIscNv0=; b=dugPHRUrqcDuhbd8VLtOsusr6GloCZiAUbpzohatcuOU7eTGwVW6CWByzWhQFeNTFD b8qMWzosd8CE8wlWbShbuVT4ydehqBrBXosoySk33KZYKOJ5oZIyTvaTIM5H5GcWB2+K jnQ9ODtH45GMgDBA0OhbiDcYhveGWneIVEfTBVHoxKiwqFeAmD1BWndltSXQoChPsKbU 8I6BIWyu5G1XSgN75fu2nxPLBF+dqSZYrpGZWExXZpjm4op0uFFW9MnlbjvsCTymifJ3 0GwOmKgDWGm96vG9CAeCCiY4J4BXGyFPfzXhRyLscyWhufGSAz6Hu7clciBB+FT1pgl5 5pTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784898097; x=1785502897; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KWSzgoADyXumYAGz6QoG8y0ywKHUqveo6iLUqIscNv0=; b=YPIh7oFUdPCFEZwjgyk6tGT0/kFz7njAuzADRohniI0bKupp8kRGd15y1JGxQ1jKdx 2ptWhgN2eXbDIkW9yse9N170XWTqyF0YahlNOHnLx+wAHc+Vlw/St3I0zdtP1E4PBiZg UavnjRrGGzqRmb7xRWTPV3zrUztB0S1DovC+gDpCB6EaDGFfFpggXilOpIPpRPzJSNx0 5HrOZT6ZPYx/6+DdqgmGZwDyBFDy+3MVNV//8zXBnuvyN2x7F4pYO7T7Z1jWmERMmhHK IDex6a2WlNI/WuPFYlt0MkLHWul4vPrXJDHxpVWUxqWAL6Miy22Ew39nOblgeUX83Aa2 +MhA== X-Forwarded-Encrypted: i=1; AHgh+RrEVaDV/iQoVRpebj9FgMBksUeJf+fJ476q4NBTVdtjR0JjCzHEXGHtXmpm9be2wRRJnWo+XzP130dbf3A=@vger.kernel.org X-Gm-Message-State: AOJu0YwU980mSpgLuQIs4sLb2UtVqy8lLM35SFdi5k2AMIKhi+a6LDuh e2ifbax2OMvv4fwU4k223ZxshFrb4Dc4IeQQOg+Lk5+S+ZgGkT72DIY= X-Gm-Gg: AR+sD11sT25a5WT71L1w3TrAGmdbjW4STuCbgHgOWtL/dSU0z28gHBlSyrkL+MTS+oT fxK2avaI3U06GkUiYdJj8UGJ5iww61cerHuZ3u7oxgWJPofdCofojHA9U3kS0ah8QQ9X1QUyorw 93KTFyisymYs2DJXcwmpBM0VsA8pkbZuRAEx6t6xVHFBsN2nYqTkA7TvPeRkdYD2Wcegd+D4Ala K3zVhB4dbmOxqEQDV3dH6xLWT2CHonZpJ1GYXO4feqp3PUp1pttdbYYRSMKeousxjhx+fVN8D8w 1do7+R43oFIDSadK/4YSnCuF0HfHcQUHoBxq6g0tW1TWzjEUuyXj1WyojKW8+Hx9B7kXhFuSfYW dkGi8hk4ttq/7h7oGYrdIhZczyMsa3RYgms/U7fjmcspcErlsfoXD6t4NS6CiEr6I6I0iPGrwjb trEAMp38xMpod+U3OlidRGOlyxZ/Q= X-Received: by 2002:a17:90b:3e85:b0:38e:7f52:c8bd with SMTP id 98e67ed59e1d1-38ec6537fa9mr7492148a91.3.1784898097077; Fri, 24 Jul 2026 06:01:37 -0700 (PDT) Received: from t-rex ([2401:4900:1a5e:93db:310f:3bc6:10c2:6175]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13d2eb01aa0sm6521889c88.3.2026.07.24.06.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2026 06:01:36 -0700 (PDT) From: kr494167@gmail.com To: broonie@kernel.org, lgirdwood@gmail.com Cc: chancel.liu@nxp.com, david.rhodes@cirrus.com, rf@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Surendra Singh Chouhan Subject: [PATCH] ASoC: cs42xx8: fix regmap SPI flag masks to target high byte Date: Fri, 24 Jul 2026 18:31:28 +0530 Message-ID: <20260724130128.76334-1-kr494167@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Surendra Singh Chouhan cs42xx8_spi_probe() configures reg_bits=3D16 so regmap sends a 2-byte address field over SPI big-endian. The SPI frame format requires the chip address byte (0x9E for write, 0x9F for read) to be in the high byte of the 16-bit address field and the register address in the low byte: write: [0x9E, MAP_addr, data] read: [0x9F, MAP_addr] -> [data] However, write_flag_mask was set to 0x9E and read_flag_mask to 0x9F. Because 0x9E is a 16-bit value of 0x009E, regmap OR'd 0x9E into the low byte (bits 7..0) of the address instead of the high byte (bits 15..8), corrupting the register address on the wire. Fix this by setting write_flag_mask to 0x9E00 and read_flag_mask to 0x9F00. Fixes: 3158f585f4f2 ("ASoC: cs42xx8: Add SPI bus support for CS42448/CS4288= 8 codec") Signed-off-by: Surendra Singh Chouhan --- sound/soc/codecs/cs42xx8-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42xx8-spi.c b/sound/soc/codecs/cs42xx8-spi.c index 2e4b8e6c4081..cf5e39a44f94 100644 --- a/sound/soc/codecs/cs42xx8-spi.c +++ b/sound/soc/codecs/cs42xx8-spi.c @@ -52,8 +52,8 @@ static int cs42xx8_spi_probe(struct spi_device *spi) * write_flag_mask/read_flag_mask are OR'd into that address field: */ config.reg_bits =3D 16; - config.write_flag_mask =3D 0x9E; - config.read_flag_mask =3D 0x9F; + config.write_flag_mask =3D 0x9E00; + config.read_flag_mask =3D 0x9F00; =20 ret =3D cs42xx8_probe(&spi->dev, devm_regmap_init_spi(spi, &config), drvdata); --=20 2.55.0