]> git.baikalelectronics.ru Git - kernel.git/commit
nvmem: Add nvmem_device based consumer apis.
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 27 Jul 2015 11:13:45 +0000 (12:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 20:43:44 +0000 (13:43 -0700)
commit0bc8cbf27f6119a210ecfa33c8288a758671b7df
treef52d6cbb6926345bb556c0b14d4a639abc4f9cec
parent9906a723e75866f4de77dc0765e36379410ffb8f
nvmem: Add nvmem_device based consumer apis.

This patch adds read/write apis which are based on nvmem_device. It is
common that the drivers like omap cape manager or qcom cpr driver to
access bytes directly at particular offset in the eeprom and not from
nvmem cell info in DT. These driver would need to get access to the nvmem
directly, which is what these new APIS provide.

These wrapper apis would help such users to avoid code duplication in
there drivers and also avoid them reading a big eeprom blob and parsing
it internally in there driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c
include/linux/nvmem-consumer.h