soc: mediatek: pwrap: add pwrap_read32 for reading in 32-bit mode
authorSean Wang <sean.wang@mediatek.com>
Wed, 18 Oct 2017 08:28:43 +0000 (16:28 +0800)
committerMatthias Brugger <matthias.bgg@gmail.com>
Fri, 20 Oct 2017 09:54:36 +0000 (11:54 +0200)
commitec83368635ac153d58517bd286afc1fe773a1272
treeb0622b1b4a5cf2fc41d4d58dd6e649c7c89757cf
parentc77d3b8d0ce856836c682617eeaac2ac00164c53
soc: mediatek: pwrap: add pwrap_read32 for reading in 32-bit mode

Some regulators such as MediaTek MT6380 has to be read in 32-bit mode.
So the patch adds pwrap_read32, rename old pwrap_read into pwrap_read16
and one function pointer is introduced for increasing flexibility allowing
the determination which mode is used by the pwrap slave detection through
device tree.

Signed-off-by: Chenglin Xu <chenglin.xu@mediatek.com>
Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c