pinctrl: mediatek: introduce multiple memory bases support
authorSam Shih <sam.shih@mediatek.com>
Thu, 21 Apr 2022 06:23:52 +0000 (14:23 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 5 May 2022 13:29:58 +0000 (09:29 -0400)
commit10334e0bc8884301466bbca9c474a8a580a3e7ee
treeb866e10c68e93290f9efdbe951fb8d9be0cfff18
parentdafe0fbfb0f37e2d3be3e25a60975e1eb31ef8b7
pinctrl: mediatek: introduce multiple memory bases support

Pinctrl design of some mediatek SoC need to access registers that
distribute in multiple memory base address. this patch introduce new
mechanism in mediatek pinctrl driver to support the chips which have
the new design.

This patch add a member 'base_calc' in pinctrl private data, and changed
original 'base' private data to an array of *iomem.

When 'base_calc' attribute is set, it will requests multiplue regs base
from the DT, if 'base_calc' attribute is not set, it only use legacy way
to request single reg resource from the DT.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.h