]> git.baikalelectronics.ru Git - kernel.git/commit
nvmem: core: add NVMEM_SYSFS Kconfig
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 16 Apr 2019 09:59:24 +0000 (10:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 17:44:33 +0000 (19:44 +0200)
commit1d872f57e79fc57ac8ac1384f7f8ab5ec16bb534
treeefc94c4d7eebd08678b03a27ecd51272da797665
parent7bdfc2a9e12ed9d44277732a465cc7a2d86ba51d
nvmem: core: add NVMEM_SYSFS Kconfig

Many nvmem providers are not very keen on having default sysfs
nvmem entry, as most of the usecases for them are inside kernel
itself. And in some cases read/writes to some areas in nvmem are
restricted and trapped at secure monitor level, so accessing them
from userspace would result in board reboots.

This patch adds new NVMEM_SYSFS Kconfig to make binary sysfs entry
an optional one. This provision will give more flexibility to users.
This patch also moves existing sysfs code to a new file so that its
not compiled in when its not really required.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Gaurav Kohli <gkohli@codeaurora.org>
Tested-by: Gaurav Kohli <gkohli@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/stable/sysfs-bus-nvmem
drivers/nvmem/Kconfig
drivers/nvmem/Makefile
drivers/nvmem/core.c
drivers/nvmem/nvmem-sysfs.c [new file with mode: 0644]
drivers/nvmem/nvmem.h [new file with mode: 0644]