Skip to content

Commit e88f516

Browse files
lweiss-fairphonegregkh
authored andcommitted
nvmem: qcom-spmi-sdam: Set size in struct nvmem_config
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: 40ce979 ("nvmem: add QTI SDAM driver") Cc: [email protected] Signed-off-by: Luca Weiss <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1b2cb4d commit e88f516

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/nvmem/qcom-spmi-sdam.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static int sdam_probe(struct platform_device *pdev)
144144
sdam->sdam_config.owner = THIS_MODULE;
145145
sdam->sdam_config.add_legacy_fixed_of_cells = true;
146146
sdam->sdam_config.stride = 1;
147+
sdam->sdam_config.size = sdam->size;
147148
sdam->sdam_config.word_size = 1;
148149
sdam->sdam_config.reg_read = sdam_read;
149150
sdam->sdam_config.reg_write = sdam_write;

0 commit comments

Comments
 (0)