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)
commite2a5402ec7c6d0442cca370a0097e75750f81398
treef52d6cbb6926345bb556c0b14d4a639abc4f9cec
parent69aba7948cbe53f2f1827e84e9dd0ae470a5072e
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