diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2018-11-14 12:30:43 +0100 |
---|---|---|
committer | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2018-11-14 16:27:43 +0100 |
commit | b0d08ec3aef3cc4fb105f1d65681907ebef9be0f (patch) | |
tree | 4c1be0cbcc512951f192a41ca9ac203089892bc7 /target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch | |
parent | 9d07678d359e05866abf8a69972ad8ae41ff62d2 (diff) | |
download | upstream-b0d08ec3aef3cc4fb105f1d65681907ebef9be0f.tar.gz upstream-b0d08ec3aef3cc4fb105f1d65681907ebef9be0f.tar.bz2 upstream-b0d08ec3aef3cc4fb105f1d65681907ebef9be0f.zip |
sunxi: remove kernel 4.9 support
This target has been on 4.14 for a long time now.
Remove these leftovers as it interferes with kernel bumping.
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch')
-rw-r--r-- | target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch b/target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch deleted file mode 100644 index 35c6876812..0000000000 --- a/target/linux/sunxi/patches-4.9/0033-pinctrl-sunxi-Support-generic-binding.patch +++ /dev/null @@ -1,106 +0,0 @@ -From cefbf1a1b29531a970bc2908a50a75d6474fcc38 Mon Sep 17 00:00:00 2001 -From: Maxime Ripard <maxime.ripard@free-electrons.com> -Date: Thu, 20 Oct 2016 15:49:03 +0200 -Subject: pinctrl: sunxi: Support generic binding - -Our bindings are mostly irrelevant now that we have generic pinctrl -bindings that cover exactly the same uses cases. - -Add support for the new ones, and obviously keep our old binding support in -order to keep the ABI stable. - -Acked-by: Chen-Yu Tsai <wens@csie.org> -Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> -Signed-off-by: Linus Walleij <linus.walleij@linaro.org> ---- - drivers/pinctrl/sunxi/pinctrl-sunxi.c | 48 +++++++++++++++++++++++++++++++++-- - 1 file changed, 46 insertions(+), 2 deletions(-) - ---- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c -+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c -@@ -149,18 +149,33 @@ static int sunxi_pctrl_get_group_pins(st - - static bool sunxi_pctrl_has_bias_prop(struct device_node *node) - { -- return of_find_property(node, "allwinner,pull", NULL); -+ return of_find_property(node, "bias-pull-up", NULL) || -+ of_find_property(node, "bias-pull-down", NULL) || -+ of_find_property(node, "bias-disable", NULL) || -+ of_find_property(node, "allwinner,pull", NULL); - } - - static bool sunxi_pctrl_has_drive_prop(struct device_node *node) - { -- return of_find_property(node, "allwinner,drive", NULL); -+ return of_find_property(node, "drive-strength", NULL) || -+ of_find_property(node, "allwinner,drive", NULL); - } - - static int sunxi_pctrl_parse_bias_prop(struct device_node *node) - { - u32 val; - -+ /* Try the new style binding */ -+ if (of_find_property(node, "bias-pull-up", NULL)) -+ return PIN_CONFIG_BIAS_PULL_UP; -+ -+ if (of_find_property(node, "bias-pull-down", NULL)) -+ return PIN_CONFIG_BIAS_PULL_DOWN; -+ -+ if (of_find_property(node, "bias-disable", NULL)) -+ return PIN_CONFIG_BIAS_DISABLE; -+ -+ /* And fall back to the old binding */ - if (of_property_read_u32(node, "allwinner,pull", &val)) - return -EINVAL; - -@@ -180,6 +195,21 @@ static int sunxi_pctrl_parse_drive_prop( - { - u32 val; - -+ /* Try the new style binding */ -+ if (!of_property_read_u32(node, "drive-strength", &val)) { -+ /* We can't go below 10mA ... */ -+ if (val < 10) -+ return -EINVAL; -+ -+ /* ... and only up to 40 mA ... */ -+ if (val > 40) -+ val = 40; -+ -+ /* by steps of 10 mA */ -+ return rounddown(val, 10); -+ } -+ -+ /* And then fall back to the old binding */ - if (of_property_read_u32(node, "allwinner,drive", &val)) - return -EINVAL; - -@@ -191,6 +221,12 @@ static const char *sunxi_pctrl_parse_fun - const char *function; - int ret; - -+ /* Try the generic binding */ -+ ret = of_property_read_string(node, "function", &function); -+ if (!ret) -+ return function; -+ -+ /* And fall back to our legacy one */ - ret = of_property_read_string(node, "allwinner,function", &function); - if (!ret) - return function; -@@ -203,6 +239,14 @@ static const char *sunxi_pctrl_find_pins - { - int count; - -+ /* Try the generic binding */ -+ count = of_property_count_strings(node, "pins"); -+ if (count > 0) { -+ *npins = count; -+ return "pins"; -+ } -+ -+ /* And fall back to our legacy one */ - count = of_property_count_strings(node, "allwinner,pins"); - if (count > 0) { - *npins = count; |