UPSTREAM: nvmem: core: remove regmap dependency
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Sun, 24 Apr 2016 19:28:05 +0000 (20:28 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 5 Aug 2016 03:07:19 +0000 (11:07 +0800)
commit1a9a43c8d49628d9436e03059e139069b6d47384
treee7502992714f0e686157b39cabcf322838652eda
parent5751401d433f8e288d906c8515ca3e64fd342101
UPSTREAM: nvmem: core: remove regmap dependency

nvmem uses regmap_raw_read/write apis to read/write data from providers,
regmap raw apis stopped working with recent kernels which removed raw
accessors on mmio bus. This resulted in broken nvmem for providers
which are based on regmap mmio bus. This issue can be fixed temporarly
by moving to other regmap apis, but we might hit same issue in future.
Moving to interfaces based on read/write callbacks from providers would
be more robust.

This patch removes regmap dependency from nvmem and introduces
read/write callbacks from the providers.

Without this patch nvmem providers like qfprom based on regmap mmio
bus would not work.

Change-Id: I510034b1cfe3057ef1e7eb20ad6a4175458f0b2b
Reported-by: Rajendra Nayak <rjendra@qti.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
cherry pick from 795ddd18d38f9762fbfefceab9aa16caef0cf431)
drivers/nvmem/Kconfig
drivers/nvmem/core.c
include/linux/nvmem-provider.h