summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/mediatek/pinctrl-mt7623.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2018-09-08 14:07:32 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-09-19 00:53:22 +0300
commitb7d7f9eeca551f9cf1f6418749cd609d371faf55 (patch)
treebd3acab198ae52c6787d3d6d9ecea0cb632d4d39 /drivers/pinctrl/mediatek/pinctrl-mt7623.c
parent9d9b171c6897265c5af870affd83fe3c51f1df76 (diff)
downloadlinux-b7d7f9eeca551f9cf1f6418749cd609d371faf55.tar.xz
pinctrl: mediatek: extend struct mtk_pin_desc which per-pin driver depends on
Because the pincrl-mtk-common.c is an implementation for per-pin binding, its pin descriptor includes more information than pinctrl-mtk-common-v2 so far can support. So, we complement these data before writing a driver using pincrl-mtk-common-v2.c for per-pin binding. By the way, the size of struct mtk_pin_desc would be larger than struct pinctrl_pin_desc can hold, so it's necessary to have a copy before the pins information is being registered into the core. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mediatek/pinctrl-mt7623.c')
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mt7623.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7623.c b/drivers/pinctrl/mediatek/pinctrl-mt7623.c
index 1f2030c3f782..b8d9d31db74f 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7623.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7623.c
@@ -30,7 +30,7 @@
_x_bits, 16, 1)
#define MT7623_PIN(_number, _name, _eint_n, _drv_grp) \
- MTK_PIN(_number, _name, _eint_n, _drv_grp)
+ MTK_PIN(_number, _name, 0, _eint_n, _drv_grp)
static const struct mtk_pin_field_calc mt7623_pin_mode_range[] = {
PIN_FIELD15(0, 278, 0x760, 0x10, 0, 3),
@@ -1373,7 +1373,7 @@ static const struct mtk_eint_hw mt7623_eint_hw = {
static struct mtk_pin_soc mt7623_data = {
.reg_cal = mt7623_reg_cals,
- .pins = (const struct pinctrl_pin_desc *)mt7623_pins,
+ .pins = mt7623_pins,
.npins = ARRAY_SIZE(mt7623_pins),
.grps = mt7623_groups,
.ngrps = ARRAY_SIZE(mt7623_groups),
@@ -1381,7 +1381,6 @@ static struct mtk_pin_soc mt7623_data = {
.nfuncs = ARRAY_SIZE(mt7623_functions),
.eint_hw = &mt7623_eint_hw,
.gpio_m = 0,
- .eint_m = 0,
.ies_present = true,
.base_names = mtk_default_register_base_names,
.nbase_names = ARRAY_SIZE(mtk_default_register_base_names),