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 0A10625B67F; Tue, 11 Mar 2025 15:28:53 +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=1741706933; cv=none; b=ddh3qqtT+Sj9jMcGHTQ4KgFIo+EXHInt/FZrtuoIzNebkxUW7bWaUSKazP71vN2vuU6pCeV8oAwTY2RhAVx7dYpa9s6M8dA5ngaBR/msGlro6rm5fyY40WVik83m+uwyEWtIH9VSJn/DGHBU4wgFS1qdr090hQYBYPzMCwu5od8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741706933; c=relaxed/simple; bh=QmHBiyfvT2WsStgPL3H6muOMcZMqzV60y5bgsPXje5g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kxoljibtJj0/svW/6I721bjIu56JAhz674fHIBL6uQI6THcRm2nTj6qG/MurmZqLFpmx+LyR4ZAP2u/kPpLxuo0TpNOgUWbVSh9kkAv/k9dVLhgpc3xrQT8bVy3GGWhELerkkDqe1p/hBcrt/hffJJOJD1BVFc+wMAl6wSEmvvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GicS/GjS; 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="GicS/GjS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85FDDC4CEE9; Tue, 11 Mar 2025 15:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741706932; bh=QmHBiyfvT2WsStgPL3H6muOMcZMqzV60y5bgsPXje5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GicS/GjSbxp4FyF/1yQJ4xVm91mxh86EdI5xCKJG2ZyKbS/WxcH+m9BwVNaANLgt7 ryx4xl9tEzZvtaoDtHKDnS0UT1LCpUu8/G4cTG0WJ0DV1WOzjc3Wkis8k3wkJS+R0v kg3YTVxocCvWdilBQiTrNj7DopXm6lP26RNaBJwo= 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 5.10 210/462] nvmem: qcom-spmi-sdam: Set size in struct nvmem_config Date: Tue, 11 Mar 2025 15:57:56 +0100 Message-ID: <20250311145806.658663418@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250311145758.343076290@linuxfoundation.org> References: <20250311145758.343076290@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-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 @@ -143,6 +143,7 @@ static int sdam_probe(struct platform_de sdam->sdam_config.id = NVMEM_DEVID_AUTO; sdam->sdam_config.owner = THIS_MODULE, 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;