From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99ABF145348; Thu, 13 Feb 2025 14:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739458270; cv=none; b=p4QZ7f9DwnLcEDZc/W5B6Z8nnHEnIzTjuig/odIQPcE+dxl9Gl64NukYK7HxPUeRhsC9QDTjKgIGZjsi/x9z3I3iwquh5KBIlM34lmGamWtl8GKA7Es9fFS8sTGkGJExZLAvEKUS0kzpVsL1seqf37t7eHT6TdbFRhsVIOzcWGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739458270; c=relaxed/simple; bh=Vt3c8GzlsxbZCQgea6+7PLnxOOMTIzSgpPlqTdkpwzs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tt1MefBFAHHPbWgP5zKLfSTnwiFvJ1zsbcBaSUR4dz108WYcJZJTNhU4kOFs/HjcNS07AIQFgKG3coaMlY6wodiKYlXVLaqAwWQwW4ueCsp66wcOk9ZiO636m2WQoWEa6zgCMwNMo66qbpZXKVV852zxy0MhUJen7AMz7ViHtqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WZDR3x+n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WZDR3x+n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23A0FC4CED1; Thu, 13 Feb 2025 14:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739458270; bh=Vt3c8GzlsxbZCQgea6+7PLnxOOMTIzSgpPlqTdkpwzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WZDR3x+ncVtM0koVJdgo+fN2uhj7YNuCZdIdU6B9YE0MozQAheT6f27uidiXmhF14 I4sZq+/wrNQohZgQ8BH964CAJC7H8cyWSQTJxF+EWuug+UfYUq+9XZx4uaz5XHsTRs V8RyeBwBX9oJx+2Oe/gDjjRaVgupp2TdVnnweMoQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luca Weiss , Vladimir Zapolskiy , Srinivas Kandagatla Subject: [PATCH 6.12 351/422] nvmem: qcom-spmi-sdam: Set size in struct nvmem_config Date: Thu, 13 Feb 2025 15:28:20 +0100 Message-ID: <20250213142450.097875824@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142436.408121546@linuxfoundation.org> References: <20250213142436.408121546@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luca Weiss commit e88f516ea417c71bb3702603ac6af9e95338cfa6 upstream. Let the nvmem core know what size the SDAM is, most notably this fixes the size of /sys/bus/nvmem/devices/spmi_sdam*/nvmem being '0' and makes user space work with that file. ~ # hexdump -C -s 64 /sys/bus/nvmem/devices/spmi_sdam2/nvmem 00000040 02 01 00 00 04 00 00 00 00 00 00 00 00 00 00 00 |................| 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000080 Fixes: 40ce9798794f ("nvmem: add QTI SDAM driver") Cc: stable@vger.kernel.org Signed-off-by: Luca Weiss Reviewed-by: Vladimir Zapolskiy Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20241230141901.263976-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/qcom-spmi-sdam.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/nvmem/qcom-spmi-sdam.c +++ b/drivers/nvmem/qcom-spmi-sdam.c @@ -144,6 +144,7 @@ static int sdam_probe(struct platform_de sdam->sdam_config.owner = THIS_MODULE; sdam->sdam_config.add_legacy_fixed_of_cells = true; sdam->sdam_config.stride = 1; + sdam->sdam_config.size = sdam->size; sdam->sdam_config.word_size = 1; sdam->sdam_config.reg_read = sdam_read; sdam->sdam_config.reg_write = sdam_write;