diff options
author | Heiko Stübner <heiko@sntech.de> | 2014-07-19 19:49:17 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-07-23 10:39:41 -0400 |
commit | 66d750e1d03875512dec38993b4cac3640a85e54 (patch) | |
tree | 4e69471f236dcb3040e754f3c977c4e9298adf53 /drivers/pinctrl | |
parent | ed62f2f25547ea9a25394087470a5816ee4db71b (diff) |
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/pinctrl-rockchip.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 337c1844f276..3e239c75f52c 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c | |||
@@ -62,6 +62,7 @@ enum rockchip_pinctrl_type { | |||
62 | RK2928, | 62 | RK2928, |
63 | RK3066B, | 63 | RK3066B, |
64 | RK3188, | 64 | RK3188, |
65 | RK3288, | ||
65 | }; | 66 | }; |
66 | 67 | ||
67 | /** | 68 | /** |
@@ -597,6 +598,7 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num) | |||
597 | ? PIN_CONFIG_BIAS_PULL_PIN_DEFAULT | 598 | ? PIN_CONFIG_BIAS_PULL_PIN_DEFAULT |
598 | : PIN_CONFIG_BIAS_DISABLE; | 599 | : PIN_CONFIG_BIAS_DISABLE; |
599 | case RK3188: | 600 | case RK3188: |
601 | case RK3288: | ||
600 | data >>= bit; | 602 | data >>= bit; |
601 | data &= (1 << RK3188_PULL_BITS_PER_PIN) - 1; | 603 | data &= (1 << RK3188_PULL_BITS_PER_PIN) - 1; |
602 | 604 | ||
@@ -651,6 +653,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank, | |||
651 | spin_unlock_irqrestore(&bank->slock, flags); | 653 | spin_unlock_irqrestore(&bank->slock, flags); |
652 | break; | 654 | break; |
653 | case RK3188: | 655 | case RK3188: |
656 | case RK3288: | ||
654 | spin_lock_irqsave(&bank->slock, flags); | 657 | spin_lock_irqsave(&bank->slock, flags); |
655 | 658 | ||
656 | /* enable the write to the equivalent lower bits */ | 659 | /* enable the write to the equivalent lower bits */ |
@@ -812,6 +815,7 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl, | |||
812 | case RK3066B: | 815 | case RK3066B: |
813 | return pull ? false : true; | 816 | return pull ? false : true; |
814 | case RK3188: | 817 | case RK3188: |
818 | case RK3288: | ||
815 | return (pull != PIN_CONFIG_BIAS_PULL_PIN_DEFAULT); | 819 | return (pull != PIN_CONFIG_BIAS_PULL_PIN_DEFAULT); |
816 | } | 820 | } |
817 | 821 | ||
@@ -1838,7 +1842,7 @@ static struct rockchip_pin_ctrl rk3288_pin_ctrl = { | |||
1838 | .pin_banks = rk3288_pin_banks, | 1842 | .pin_banks = rk3288_pin_banks, |
1839 | .nr_banks = ARRAY_SIZE(rk3288_pin_banks), | 1843 | .nr_banks = ARRAY_SIZE(rk3288_pin_banks), |
1840 | .label = "RK3288-GPIO", | 1844 | .label = "RK3288-GPIO", |
1841 | .type = RK3188, | 1845 | .type = RK3288, |
1842 | .grf_mux_offset = 0x0, | 1846 | .grf_mux_offset = 0x0, |
1843 | .pmu_mux_offset = 0x84, | 1847 | .pmu_mux_offset = 0x84, |
1844 | .pull_calc_reg = rk3288_calc_pull_reg_and_bit, | 1848 | .pull_calc_reg = rk3288_calc_pull_reg_and_bit, |