<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/nvmem/core.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-29T09:07:45Z</updated>
<entry>
<title>nvmem: core: fix possibly memleak when use nvmem_cell_info_to_nvmem_cell()</title>
<updated>2020-10-29T09:07:45Z</updated>
<author>
<name>Vadym Kochan</name>
</author>
<published>2020-09-23T20:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70f1f999e24df212e09784a29a58bf77ec29b5eb'/>
<id>urn:sha1:70f1f999e24df212e09784a29a58bf77ec29b5eb</id>
<content type='text'>
[ Upstream commit fc9eec4d643597cf4cb2fef17d48110e677610da ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: fix missing of_node_put() in of_nvmem_device_get()</title>
<updated>2020-10-29T09:07:40Z</updated>
<author>
<name>Vadym Kochan</name>
</author>
<published>2020-09-17T13:44:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c87ffcb2bff3708d4f895926a1d75ae7b117d46'/>
<id>urn:sha1:6c87ffcb2bff3708d4f895926a1d75ae7b117d46</id>
<content type='text'>
[ Upstream commit b1c194dcdb1425fa59eec61ab927cfff33096149 ]

of_parse_phandle() returns device_node with incremented ref count
which needs to be decremented by of_node_put() when device_node
is not used.

Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
Signed-off-by: Vadym Kochan &lt;vadym.kochan@plvision.eu&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200917134437.16637-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvmem: ensure sysfs writes handle write-protect pin</title>
<updated>2020-05-15T14:20:02Z</updated>
<author>
<name>Michael Auchter</name>
</author>
<published>2020-05-11T14:50:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b96fc5416b099a0c2509ca07a80b140d34db2b9b'/>
<id>urn:sha1:b96fc5416b099a0c2509ca07a80b140d34db2b9b</id>
<content type='text'>
Commit 2a127da461a9 ("nvmem: add support for the write-protect pin")
added support for handling write-protect pins to the nvmem core, and
Commit 1c89074bf850 ("eeprom: at24: remove the write-protect pin support")
retrofitted the at24 driver to use this support.

These changes broke write() on the nvmem sysfs attribute for eeproms
which utilize a write-protect pin, as the write callback invokes the
nvmem device's reg_write callback directly which no longer handles
changing the state of the write-protect pin.

Change the read and write callbacks for the sysfs attribute to invoke
nvmme_reg_read/nvmem_reg_write helpers which handle this, rather than
calling reg_read/reg_write directly.

Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
Signed-off-by: Michael Auchter &lt;michael.auchter@ni.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200511145042.31223-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: cleanup old eeprom compat entry attributes</title>
<updated>2020-04-28T13:02:48Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-04-17T12:13:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a4542e55f1b592aa743fb319d4b2fd85f7e136e'/>
<id>urn:sha1:2a4542e55f1b592aa743fb319d4b2fd85f7e136e</id>
<content type='text'>
file permission are derived based on various configs for
default nvmem sysfs file, reuse it to create the eeprom
compat file too.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200417121306.23121-1-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: remove nvmem_sysfs_get_groups()</title>
<updated>2020-03-25T18:23:49Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-03-25T13:19:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=844003052719375bad24a740fed5d32c5a18efaf'/>
<id>urn:sha1:844003052719375bad24a740fed5d32c5a18efaf</id>
<content type='text'>
Now that we are using is_bin_visible callback, we do not need
nvmem_sysfs_get_groups() anymore so move all the relevant data-structures
and code to core.c

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200325131951.31887-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: use is_bin_visible for permissions</title>
<updated>2020-03-25T18:23:48Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-03-25T13:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=664f0549380cd5bee2cdac0a6ccfe21bdf74e027'/>
<id>urn:sha1:664f0549380cd5bee2cdac0a6ccfe21bdf74e027</id>
<content type='text'>
By using is_bin_visible callback to set permissions will remove a
large list of attribute groups. These group permissions can be
dynamically derived in the callback.

Also add checks for read/write callbacks and set permissions accordingly.

Suggested-by: Greg KH &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200325131951.31887-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: use device_register and device_unregister</title>
<updated>2020-03-25T17:56:38Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-03-24T17:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f60442ddc40c21a99720ee990d5924c80a24728d'/>
<id>urn:sha1:f60442ddc40c21a99720ee990d5924c80a24728d</id>
<content type='text'>
use device_register/unregister instead of spliting them with no use.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200324171600.15606-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: add root_only member to nvmem device struct</title>
<updated>2020-03-25T12:45:09Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-03-25T12:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e6de179d7a88b833ccadd18da5099d435acdac65'/>
<id>urn:sha1:e6de179d7a88b833ccadd18da5099d435acdac65</id>
<content type='text'>
As we are planning to move to use sysfs is_bin_visible callback,
having root_only as part of nvmem_device will help decide correct
permissions.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200325122116.15096-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: core: validate nvmem config before parsing</title>
<updated>2020-03-19T06:41:03Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2020-03-10T13:22:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=061a320b32d47438d64d64b412c0ea2c323a1470'/>
<id>urn:sha1:061a320b32d47438d64d64b412c0ea2c323a1470</id>
<content type='text'>
nvmem provider has to provide either reg_read/write, add a check
to enforce this.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200310132257.23358-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>nvmem: release the write-protect pin</title>
<updated>2020-03-19T06:41:03Z</updated>
<author>
<name>Khouloud Touil</name>
</author>
<published>2020-03-10T13:22:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9c3766cb19cdadf2776aba41b64470002645894'/>
<id>urn:sha1:a9c3766cb19cdadf2776aba41b64470002645894</id>
<content type='text'>
Put the write-protect GPIO descriptor in nvmem_release() so that it can
be automatically released when the associated device's reference count
drops to 0.

Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Khouloud Touil &lt;ktouil@baylibre.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
[Bartosz: tweak the commit message]
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20200310132257.23358-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
