From: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
To: Luca Weiss <luca.weiss@fairphone.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Shyam Kumar Thella <sthella@codeaurora.org>,
Anirudh Ghayal <quic_aghayal@quicinc.com>,
Guru Das Srinagesh <quic_gurus@quicinc.com>
Cc: ~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] nvmem: qcom-spmi-sdam: Set size in struct nvmem_config
Date: Fri, 20 Dec 2024 18:36:54 +0200 [thread overview]
Message-ID: <d9030fb2-85a1-4b13-8fac-94ee2defca14@linaro.org> (raw)
In-Reply-To: <20241220-sdam-size-v1-1-17868a8744d3@fairphone.com>
On 12/20/24 14:22, Luca Weiss wrote:
> 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 <luca.weiss@fairphone.com>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
> Related, it would be nice to set sdam->sdam_config.type to an
> appropriate value, the ones currently upstream are:
>
> enum nvmem_type {
> NVMEM_TYPE_UNKNOWN = 0,
> NVMEM_TYPE_EEPROM,
> NVMEM_TYPE_OTP,
> NVMEM_TYPE_BATTERY_BACKED,
> NVMEM_TYPE_FRAM,
> };
>
> I don't know what would fit for SDAM and I couldn't find any info on
> createpoint either, not even what the abbreviation SDAM stands for.
> ---
> drivers/nvmem/qcom-spmi-sdam.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c
> index 9aa8f42faa4c93532cf8c70ea992a4fbb005d006..4f1cca6eab71e1efc5328448f69f863e6db57c5a 100644
> --- a/drivers/nvmem/qcom-spmi-sdam.c
> +++ b/drivers/nvmem/qcom-spmi-sdam.c
> @@ -144,6 +144,7 @@ static int sdam_probe(struct platform_device *pdev)
> 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;
>
--
Best wishes,
Vladimir
next prev parent reply other threads:[~2024-12-20 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 12:22 Luca Weiss
2024-12-20 16:36 ` Vladimir Zapolskiy [this message]
2024-12-20 16:46 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9030fb2-85a1-4b13-8fac-94ee2defca14@linaro.org \
--to=vladimir.zapolskiy@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=phone-devel@vger.kernel.org \
--cc=quic_aghayal@quicinc.com \
--cc=quic_gurus@quicinc.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=stable@vger.kernel.org \
--cc=sthella@codeaurora.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®