<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nvmem, branch v6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-03-10T09:55:49Z</updated>
<entry>
<title>nvmem: core: return -ENOENT if nvmem cell is not found</title>
<updated>2023-03-10T09:55:49Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2023-03-10T09:48:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=06be62083c5308c76a891ca975d66d832e2afc07'/>
<id>urn:sha1:06be62083c5308c76a891ca975d66d832e2afc07</id>
<content type='text'>
Prior to commit 5d8e6e6c10a3 ("nvmem: core: add an index parameter to
the cell") of_nvmem_cell_get() would return -ENOENT if the cell wasn't
found. Particularly, if of_property_match_string() returned -EINVAL,
that return code was passed as the index to of_parse_phandle(), which
then detected it as invalid and returned NULL. That led to an return
code of -ENOENT.

With the new code, the negative index will lead to an -EINVAL of
of_parse_phandle_with_optional_args() which pass straight to the
caller and break those who expect an -ENOENT.

Fix it by always returning -ENOENT.

Fixes: 5d8e6e6c10a3 ("nvmem: core: add an index parameter to the cell")
Reported-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Link: https://lore.kernel.org/r/2143916.GUh0CODmnK@steina-w/
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Tested-by: Alexander Stein &lt;alexander.stein@ew.tq-group.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230310094845.139400-1-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: stm32: fix OPTEE dependency</title>
<updated>2023-02-06T18:07:00Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2023-02-06T13:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1dc7e37bb0ec1c997fac82031332a38c7610352f'/>
<id>urn:sha1:1dc7e37bb0ec1c997fac82031332a38c7610352f</id>
<content type='text'>
The stm32 nvmem driver fails to link as built-in when OPTEE
is a loadable module:

aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec:
stm32-bsec-optee-ta.c:(.text+0xc8): undefined reference to `tee_client_open_session'
aarch64-linux-ld: drivers/nvmem/stm32-bsec-optee-ta.o: in function `stm32_bsec:
stm32-bsec-optee-ta.c:(.text+0x1fc): undefined reference to `tee_client_open_context'

Change the CONFIG_NVMEM_STM32_ROMEM definition so it can only
be built-in if OPTEE is either built-in or disabled, and
make NVMEM_STM32_BSEC_OPTEE_TA a hidden symbol instead.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-23-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: qcom-spmi-sdam: register at device init time</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2023-02-06T13:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb7dda20f42a9137e9ee53d5ed3b743d49338cb5'/>
<id>urn:sha1:eb7dda20f42a9137e9ee53d5ed3b743d49338cb5</id>
<content type='text'>
There are currently no in-tree users of the Qualcomm SDAM nvmem driver
and there is generally no point in registering a driver that can be
built as a module at subsys init time.

Register the driver at the normal device init time instead and let
driver core sort out the probe order.

Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Reviewed-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-21-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: rave-sp-eeprm: fix kernel-doc bad line warning</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-02-06T13:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e5ac22aa564026e99defc3a8e02082521a5b231'/>
<id>urn:sha1:3e5ac22aa564026e99defc3a8e02082521a5b231</id>
<content type='text'>
Convert an empty line to " *" to avoid a kernel-doc warning:

drivers/nvmem/rave-sp-eeprom.c:48: warning: bad line:

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Cc: Andrey Vostrikov &lt;andrey.vostrikov@cogentembedded.com&gt;
Cc: Nikita Yushchenko &lt;nikita.yoush@cogentembedded.com&gt;
Cc: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-20-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: stm32: detect bsec pta presence for STM32MP15x</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2023-02-06T13:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df2f34ef1d924125ffaf29dfdaf7cdbd3183c321'/>
<id>urn:sha1:df2f34ef1d924125ffaf29dfdaf7cdbd3183c321</id>
<content type='text'>
On STM32MP15x SoC, the SMC backend is optional when OP-TEE is used;
the PTA BSEC should be used as it is done on STM32MP13x platform,
but the BSEC SMC can be also used: it is a legacy mode in OP-TEE,
not recommended but used in previous OP-TEE firmware.

The presence of OP-TEE is dynamically detected in STM32MP15x device tree
and the supported NVMEM backend is dynamically detected:
- PTA with stm32_bsec_pta_find
- SMC with stm32_bsec_check

With OP-TEE but without PTA and SMC detection, the probe is deferred for
STM32MP15x devices.

On STM32MP13x platform, only the PTA is supported with cfg-&gt;ta = true
and this detection is skipped.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-19-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: stm32: add OP-TEE support for STM32MP13x</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2023-02-06T13:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a0bc3522e746025e2d9a63ab2cb5d7062c2d39c'/>
<id>urn:sha1:6a0bc3522e746025e2d9a63ab2cb5d7062c2d39c</id>
<content type='text'>
For boot with OP-TEE on STM32MP13, the communication with the secure
world no more use STMicroelectronics SMC but communication with the
STM32MP BSEC TA, for data access (read/write) or lock operation:
- all the request are sent to OP-TEE trusted application,
- for upper OTP with ECC protection and with word programming only
  each OTP are permanently locked when programmed to avoid ECC error
  on the second write operation

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Etienne Carriere &lt;etienne.carriere@linaro.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-18-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of()</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2023-02-06T13:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50014d659617dc58780a5d31ceb76c82779a9d8b'/>
<id>urn:sha1:50014d659617dc58780a5d31ceb76c82779a9d8b</id>
<content type='text'>
Convert nvmem_add_cells_from_of() to use the new nvmem_add_one_cell().
This will remove duplicate code and it will make it possible to add a
hook to a nvmem layout in between, which can change fields before the
cell is finally added.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-17-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: add nvmem_add_one_cell()</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2023-02-06T13:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ded6830d376d5e7bf43d59f7f7fdf1a59abc676'/>
<id>urn:sha1:2ded6830d376d5e7bf43d59f7f7fdf1a59abc676</id>
<content type='text'>
Add a new function to add exactly one cell. This will be used by the
nvmem layout drivers to add custom cells. In contrast to the
nvmem_add_cells(), this has the advantage that we don't have to assemble
a list of cells on runtime.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-16-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: drop the removal of the cells in nvmem_add_cells()</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2023-02-06T13:43:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc5bdd323dde6494623f3ffe3a5b887fa21cd375'/>
<id>urn:sha1:cc5bdd323dde6494623f3ffe3a5b887fa21cd375</id>
<content type='text'>
If nvmem_add_cells() fails, the whole nvmem_register() will fail
and the cells will then be removed anyway. This is a preparation
to introduce a nvmem_add_one_cell() which can then be used by
nvmem_add_cells().

This is then the same to what nvmem_add_cells_from_table() and
nvmem_add_cells_from_of() do.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-15-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: add an index parameter to the cell</title>
<updated>2023-02-06T18:06:59Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2023-02-06T13:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d8e6e6c10a3d37486d263b16ddc15991a7e4a88'/>
<id>urn:sha1:5d8e6e6c10a3d37486d263b16ddc15991a7e4a88</id>
<content type='text'>
Sometimes a cell can represend multiple values. For example, a base
ethernet address stored in the NVMEM can be expanded into multiple
discreet ones by adding an offset.

For this use case, introduce an index parameter which is then used to
distiguish between values. This parameter will then be passed to the
post process hook which can then use it to create different values
during reading.

At the moment, there is only support for the device tree path. You can
add the index to the phandle, e.g.

  &amp;net {
          nvmem-cells = &lt;&amp;base_mac_address 2&gt;;
          nvmem-cell-names = "mac-address";
  };

  &amp;nvmem_provider {
          base_mac_address: base-mac-address@0 {
                  #nvmem-cell-cells = &lt;1&gt;;
                  reg = &lt;0 6&gt;;
          };
  };

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20230206134356.839737-13-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
