<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nvmem, branch v5.12</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=v5.12</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.12'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-02-05T10:25:52Z</updated>
<entry>
<title>nvmem: qcom-spmi-sdam: Fix uninitialized pdev pointer</title>
<updated>2021-02-05T10:25:52Z</updated>
<author>
<name>Subbaraman Narayanamurthy</name>
<email>subbaram@codeaurora.org</email>
</author>
<published>2021-02-05T10:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2057ee29973b9741d43d3f475a6b02fb46a0e61'/>
<id>urn:sha1:e2057ee29973b9741d43d3f475a6b02fb46a0e61</id>
<content type='text'>
"sdam-&gt;pdev" is uninitialized and it is used to print error logs.
Fix it. Since device pointer can be used from sdam_config, use it
directly thereby removing pdev pointer.

Fixes: 40ce9798794f ("nvmem: add QTI SDAM driver")
Cc: stable@vger.kernel.org
Signed-off-by: Subbaraman Narayanamurthy &lt;subbaram@codeaurora.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210205100853.32372-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: Kconfig: Correct typo in NVMEM_RMEM</title>
<updated>2021-02-05T10:25:52Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2021-02-05T10:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b31f1eb41c140d7979f855df73064b3a3ae8055a'/>
<id>urn:sha1:b31f1eb41c140d7979f855df73064b3a3ae8055a</id>
<content type='text'>
s/drivers/driver/ as the configuration selects a single driver.

Suggested-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Acked-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210205100853.32372-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: skip child nodes not matching binding</title>
<updated>2021-02-04T16:04:19Z</updated>
<author>
<name>Ahmad Fatoum</name>
<email>a.fatoum@pengutronix.de</email>
</author>
<published>2021-01-29T17:14:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0445efacec75b85c2a3c176957ee050ba9be53f0'/>
<id>urn:sha1:0445efacec75b85c2a3c176957ee050ba9be53f0</id>
<content type='text'>
The nvmem cell binding applies to all eeprom child nodes matching
"^.*@[0-9a-f]+$" without taking a compatible into account.

Linux drivers, like at24, are even more extensive and assume
_all_ at24 eeprom child nodes to be nvmem cells since e888d445ac33
("nvmem: resolve cells from DT at registration time").

Since df5f3b6f5357 ("dt-bindings: nvmem: stm32: new property for
data access"), the additionalProperties: True means it's Ok to have
other properties as long as they don't match "^.*@[0-9a-f]+$".

The barebox bootloader extends the MTD partitions binding to
EEPROM and can fix up following device tree node:

  &amp;eeprom {
    partitions {
      compatible = "fixed-partitions";
    };
  };

This is allowed binding-wise, but drivers using nvmem_register()
like at24 will fail to parse because the function expects all child
nodes to have a reg property present. This results in the whole
EEPROM driver probe failing despite the device tree being correct.

Fix this by skipping nodes lacking a reg property instead of
returning an error. This effectively makes the drivers adhere
to the binding because all nodes with a unit address must have
a reg property and vice versa.

Fixes: e888d445ac33 ("nvmem: resolve cells from DT at registration time").
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210129171430.11328-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: Add driver to expose reserved memory as nvmem</title>
<updated>2021-02-04T16:04:18Z</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenzjulienne@suse.de</email>
</author>
<published>2021-01-29T17:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a3fa75a4d9cb6bcfc9081ef224a4cdcd4b3eafe'/>
<id>urn:sha1:5a3fa75a4d9cb6bcfc9081ef224a4cdcd4b3eafe</id>
<content type='text'>
Firmware/co-processors might use reserved memory areas in order to pass
data stemming from an nvmem device otherwise non accessible to Linux.
For example an EEPROM memory only physically accessible to firmware, or
data only accessible early at boot time.

In order to expose this data to other drivers and user-space, the driver
models the reserved memory area as an nvmem device.

Tested-by: Tim Gover &lt;tim.gover@raspberrypi.com&gt;
Reviewed-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenzjulienne@suse.de&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210129171430.11328-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: imx-iim: Use of_device_get_match_data()</title>
<updated>2021-02-04T16:04:18Z</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2021-01-29T17:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=579db09c6106977c0496f2cca48606b289df4bdf'/>
<id>urn:sha1:579db09c6106977c0496f2cca48606b289df4bdf</id>
<content type='text'>
The retrieval of driver data via of_device_get_match_data() can make
the code simpler.

Use of_device_get_match_data() to simplify the code.

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210129171430.11328-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: Fix a resource leak on error in nvmem_add_cells_from_of()</title>
<updated>2021-02-04T16:04:18Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-01-29T17:14:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72e008ce307fa2f35f6783997378b32e83122839'/>
<id>urn:sha1:72e008ce307fa2f35f6783997378b32e83122839</id>
<content type='text'>
This doesn't call of_node_put() on the error path so it leads to a
memory leak.

Fixes: 0749aa25af82 ("nvmem: core: fix regression in of_nvmem_cell_get()")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210129171430.11328-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: imx-ocotp: add support for the unaliged word count</title>
<updated>2020-11-27T15:10:07Z</updated>
<author>
<name>Peng Fan</name>
<email>peng.fan@nxp.com</email>
</author>
<published>2020-11-27T10:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3311bf18467272388039922a5e29c4925b291f73'/>
<id>urn:sha1:3311bf18467272388039922a5e29c4925b291f73</id>
<content type='text'>
When offset is not 4 bytes aligned, directly shift righty by 2 bits
will cause reading out wrong data. Since imx ocotp only supports
4 bytes reading once, we need handle offset is not 4 bytes aligned
and enlarge the bytes to 4 bytes aligned. After reading finished,
copy the needed data from buffer to caller and free buffer.

Signed-off-by: Peng Fan &lt;peng.fan@nxp.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20201127102837.19366-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: qfprom: Don't touch certain fuses</title>
<updated>2020-11-27T15:10:06Z</updated>
<author>
<name>Evan Green</name>
<email>evgreen@chromium.org</email>
</author>
<published>2020-11-27T10:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=044ee8f85267599a9b0112911f5c16d4548b4289'/>
<id>urn:sha1:044ee8f85267599a9b0112911f5c16d4548b4289</id>
<content type='text'>
Some fuse ranges are protected by the XPU such that the AP cannot
access them. Attempting to do so causes an SError. Use the newly
introduced per-soc compatible string, and the newly introduced
nvmem keepout support to attach the set of regions
we should not access.

Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Evan Green &lt;evgreen@chromium.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20201127102837.19366-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: Add support for keepout regions</title>
<updated>2020-11-27T15:10:06Z</updated>
<author>
<name>Evan Green</name>
<email>evgreen@chromium.org</email>
</author>
<published>2020-11-27T10:28:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd3bb8f54a88107570334c156efb0c724a261003'/>
<id>urn:sha1:fd3bb8f54a88107570334c156efb0c724a261003</id>
<content type='text'>
Introduce support into the nvmem core for arrays of register ranges
that should not result in actual device access. For these regions a
constant byte (repeated) is returned instead on read, and writes are
quietly ignored and returned as successful.

This is useful for instance if certain efuse regions are protected
from access by Linux because they contain secret info to another part
of the system (like an integrated modem).

Signed-off-by: Evan Green &lt;evgreen@chromium.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20201127102837.19366-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: fix possibly memleak when use nvmem_cell_info_to_nvmem_cell()</title>
<updated>2020-09-27T12:25:48Z</updated>
<author>
<name>Vadym Kochan</name>
<email>vadym.kochan@plvision.eu</email>
</author>
<published>2020-09-23T20:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc9eec4d643597cf4cb2fef17d48110e677610da'/>
<id>urn:sha1:fc9eec4d643597cf4cb2fef17d48110e677610da</id>
<content type='text'>
Fix missing 'kfree_const(cell-&gt;name)' when call to
nvmem_cell_info_to_nvmem_cell() in several places:

     * after nvmem_cell_info_to_nvmem_cell() failed during
       nvmem_add_cells()

     * during nvmem_device_cell_{read,write} when cell-&gt;name is
       kstrdup'ed() without calling kfree_const() at the end, but
       really there is no reason to do that 'dup, because the cell
       instance is allocated on the stack for some short period to be
       read/write without exposing it to the caller.

So the new nvmem_cell_info_to_nvmem_cell_nodup() helper is introduced
which is used to convert cell_info -&gt; cell without name duplication as
a lighweight version of nvmem_cell_info_to_nvmem_cell().

Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
Reviewed-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Vadym Kochan &lt;vadym.kochan@plvision.eu&gt;
Link: https://lore.kernel.org/r/20200923204456.14032-1-vadym.kochan@plvision.eu
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
