pinctrl: rockchip: add separate type for rk3288
An upcoming pinctrl function of the rk3288 differs again from everything else, so we'll need a separate type for it. Signed-off-by: Heiko Stübner <heiko@sntech.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
ed62f2f255
commit
66d750e1d0
1 changed files with 5 additions and 1 deletions
|
@ -62,6 +62,7 @@ enum rockchip_pinctrl_type {
|
||||||
RK2928,
|
RK2928,
|
||||||
RK3066B,
|
RK3066B,
|
||||||
RK3188,
|
RK3188,
|
||||||
|
RK3288,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -597,6 +598,7 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num)
|
||||||
? PIN_CONFIG_BIAS_PULL_PIN_DEFAULT
|
? PIN_CONFIG_BIAS_PULL_PIN_DEFAULT
|
||||||
: PIN_CONFIG_BIAS_DISABLE;
|
: PIN_CONFIG_BIAS_DISABLE;
|
||||||
case RK3188:
|
case RK3188:
|
||||||
|
case RK3288:
|
||||||
data >>= bit;
|
data >>= bit;
|
||||||
data &= (1 << RK3188_PULL_BITS_PER_PIN) - 1;
|
data &= (1 << RK3188_PULL_BITS_PER_PIN) - 1;
|
||||||
|
|
||||||
|
@ -651,6 +653,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,
|
||||||
spin_unlock_irqrestore(&bank->slock, flags);
|
spin_unlock_irqrestore(&bank->slock, flags);
|
||||||
break;
|
break;
|
||||||
case RK3188:
|
case RK3188:
|
||||||
|
case RK3288:
|
||||||
spin_lock_irqsave(&bank->slock, flags);
|
spin_lock_irqsave(&bank->slock, flags);
|
||||||
|
|
||||||
/* enable the write to the equivalent lower bits */
|
/* enable the write to the equivalent lower bits */
|
||||||
|
@ -812,6 +815,7 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl,
|
||||||
case RK3066B:
|
case RK3066B:
|
||||||
return pull ? false : true;
|
return pull ? false : true;
|
||||||
case RK3188:
|
case RK3188:
|
||||||
|
case RK3288:
|
||||||
return (pull != PIN_CONFIG_BIAS_PULL_PIN_DEFAULT);
|
return (pull != PIN_CONFIG_BIAS_PULL_PIN_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1838,7 +1842,7 @@ static struct rockchip_pin_ctrl rk3288_pin_ctrl = {
|
||||||
.pin_banks = rk3288_pin_banks,
|
.pin_banks = rk3288_pin_banks,
|
||||||
.nr_banks = ARRAY_SIZE(rk3288_pin_banks),
|
.nr_banks = ARRAY_SIZE(rk3288_pin_banks),
|
||||||
.label = "RK3288-GPIO",
|
.label = "RK3288-GPIO",
|
||||||
.type = RK3188,
|
.type = RK3288,
|
||||||
.grf_mux_offset = 0x0,
|
.grf_mux_offset = 0x0,
|
||||||
.pmu_mux_offset = 0x84,
|
.pmu_mux_offset = 0x84,
|
||||||
.pull_calc_reg = rk3288_calc_pull_reg_and_bit,
|
.pull_calc_reg = rk3288_calc_pull_reg_and_bit,
|
||||||
|
|
Loading…
Add table
Reference in a new issue