diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 14:58:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 14:58:15 -0400 |
commit | ea584595fc85e65796335033dfca25ed655cd0ed (patch) | |
tree | 79d444c507472f6c66d887ad332e7c1784eeb4de /drivers/pinctrl | |
parent | 782d59c5dfc5ac39ac8cfb4c6dd40597938dde9c (diff) | |
parent | a092e19b688be88f7329bd05f90cb92ebe1a4f5b (diff) |
Merge tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO changes from Linus Walleij:
"This is the bulk of GPIO changes for the v3.18 development cycle:
- Increase the default ARCH_NR_GPIO from 256 to 512. This was done
to avoid having a custom <asm/gpio.h> header for the x86
architecture - GPIO is custom and complicated enough as it is
already! We want to move to a radix to store the descriptors going
forward, and finally get rid of this fixed array size altogether.
- Endgame patching of the gpio_remove() semantics initiated by
Abdoulaye Berthe. It is not accepted by the system that the
removal of a GPIO chip fails during eg reboot or shutdown, and
therefore the return value has now painfully been refactored away.
For special cases like GPIO expanders on a hot-pluggable bus like
USB, we may later add some gpiochip_try_remove() call, but for the
cases we have now, return values are moot.
- Some incremental refactoring of the gpiolib core and ACPI GPIO
library for more descriptor usage.
- Refactor the chained IRQ handler set-up method to handle also
threaded, nested interrupts and set up the parent IRQ correctly.
Switch STMPE and TC3589x drivers to use this registration method.
- Add a .irq_not_threaded flag to the struct gpio_chip, so that also
GPIO expanders that block but are still not using threaded IRQ
handlers.
- New drivers for the ARM64 X-Gene SoC GPIO controller.
- The syscon GPIO driver has been improved to handle the "DSP GPIO"
found on the TI Keystone 2 SoC:s.
- ADNP driver switched to use gpiolib irqchip helpers.
- Refactor the DWAPB driver to support being instantiated from and
MFD cell (platform device).
- Incremental feature improvement in the Zynq, MCP23S08, DWAPB, OMAP,
Xilinx and Crystalcove drivers.
- Various minor fixes"
* tag 'gpio-v3.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (52 commits)
gpio: pch: Build context save/restore only for PM
pinctrl: abx500: get rid of unused variable
gpio: ks8695: fix 'else should follow close brace '}''
gpio: stmpe: add verbose debug code
gpio: stmpe: fix up interrupt enable logic
gpio: staticize xway_stp_init()
gpio: handle also nested irqchips in the chained handler set-up
gpio: set parent irq on chained handlers
gpiolib: irqchip: use irq_find_mapping while removing irqchip
gpio: crystalcove: support virtual GPIO
pinctrl: bcm281xx: make Kconfig dependency more strict
gpio: kona: enable only on BCM_MOBILE or for compile testing
gpio, bcm-kona, LLVMLinux: Remove use of __initconst
gpio: Fix ngpio in gpio-xilinx driver
gpio: dwapb: fix pointer to integer cast
gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard
gpio: xgene: Remove unneeded forward declation for struct xgene_gpio
gpio: xgene: Fix missing spin_lock_init()
gpio: ks8695: fix switch case indentation
gpiolib: add irq_not_threaded flag to gpio_chip
...
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/Kconfig | 2 | ||||
-rw-r--r-- | drivers/pinctrl/nomadik/pinctrl-abx500.c | 16 | ||||
-rw-r--r-- | drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 | ||||
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 8 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-exynos5440.c | 6 | ||||
-rw-r--r-- | drivers/pinctrl/samsung/pinctrl-samsung.c | 15 | ||||
-rw-r--r-- | drivers/pinctrl/sirf/pinctrl-sirf.c | 3 |
7 files changed, 12 insertions, 40 deletions
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 64d06b52f98a..c6a66de6ed72 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig | |||
@@ -86,7 +86,7 @@ config PINCTRL_BCM2835 | |||
86 | 86 | ||
87 | config PINCTRL_BCM281XX | 87 | config PINCTRL_BCM281XX |
88 | bool "Broadcom BCM281xx pinctrl driver" | 88 | bool "Broadcom BCM281xx pinctrl driver" |
89 | depends on OF | 89 | depends on OF && (ARCH_BCM_MOBILE || COMPILE_TEST) |
90 | select PINMUX | 90 | select PINMUX |
91 | select PINCONF | 91 | select PINCONF |
92 | select GENERIC_PINCONF | 92 | select GENERIC_PINCONF |
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c index 47f493149863..228972827132 100644 --- a/drivers/pinctrl/nomadik/pinctrl-abx500.c +++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c | |||
@@ -1174,7 +1174,7 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
1174 | const struct of_device_id *match; | 1174 | const struct of_device_id *match; |
1175 | struct abx500_pinctrl *pct; | 1175 | struct abx500_pinctrl *pct; |
1176 | unsigned int id = -1; | 1176 | unsigned int id = -1; |
1177 | int ret, err; | 1177 | int ret; |
1178 | int i; | 1178 | int i; |
1179 | 1179 | ||
1180 | if (!np) { | 1180 | if (!np) { |
@@ -1266,10 +1266,7 @@ static int abx500_gpio_probe(struct platform_device *pdev) | |||
1266 | return 0; | 1266 | return 0; |
1267 | 1267 | ||
1268 | out_rem_chip: | 1268 | out_rem_chip: |
1269 | err = gpiochip_remove(&pct->chip); | 1269 | gpiochip_remove(&pct->chip); |
1270 | if (err) | ||
1271 | dev_info(&pdev->dev, "failed to remove gpiochip\n"); | ||
1272 | |||
1273 | return ret; | 1270 | return ret; |
1274 | } | 1271 | } |
1275 | 1272 | ||
@@ -1280,15 +1277,8 @@ out_rem_chip: | |||
1280 | static int abx500_gpio_remove(struct platform_device *pdev) | 1277 | static int abx500_gpio_remove(struct platform_device *pdev) |
1281 | { | 1278 | { |
1282 | struct abx500_pinctrl *pct = platform_get_drvdata(pdev); | 1279 | struct abx500_pinctrl *pct = platform_get_drvdata(pdev); |
1283 | int ret; | ||
1284 | |||
1285 | ret = gpiochip_remove(&pct->chip); | ||
1286 | if (ret < 0) { | ||
1287 | dev_err(pct->dev, "unable to remove gpiochip: %d\n", | ||
1288 | ret); | ||
1289 | return ret; | ||
1290 | } | ||
1291 | 1280 | ||
1281 | gpiochip_remove(&pct->chip); | ||
1292 | return 0; | 1282 | return 0; |
1293 | } | 1283 | } |
1294 | 1284 | ||
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 3c29d9187146..746db6acf648 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c | |||
@@ -1276,7 +1276,7 @@ static int nmk_gpio_probe(struct platform_device *dev) | |||
1276 | IRQ_TYPE_EDGE_FALLING); | 1276 | IRQ_TYPE_EDGE_FALLING); |
1277 | if (ret) { | 1277 | if (ret) { |
1278 | dev_err(&dev->dev, "could not add irqchip\n"); | 1278 | dev_err(&dev->dev, "could not add irqchip\n"); |
1279 | ret = gpiochip_remove(&nmk_chip->chip); | 1279 | gpiochip_remove(&nmk_chip->chip); |
1280 | return -ENODEV; | 1280 | return -ENODEV; |
1281 | } | 1281 | } |
1282 | /* Then register the chain on the parent IRQ */ | 1282 | /* Then register the chain on the parent IRQ */ |
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index d30dddd21323..e730935fa457 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c | |||
@@ -936,14 +936,8 @@ EXPORT_SYMBOL(msm_pinctrl_probe); | |||
936 | int msm_pinctrl_remove(struct platform_device *pdev) | 936 | int msm_pinctrl_remove(struct platform_device *pdev) |
937 | { | 937 | { |
938 | struct msm_pinctrl *pctrl = platform_get_drvdata(pdev); | 938 | struct msm_pinctrl *pctrl = platform_get_drvdata(pdev); |
939 | int ret; | ||
940 | |||
941 | ret = gpiochip_remove(&pctrl->chip); | ||
942 | if (ret) { | ||
943 | dev_err(&pdev->dev, "Failed to remove gpiochip\n"); | ||
944 | return ret; | ||
945 | } | ||
946 | 939 | ||
940 | gpiochip_remove(&pctrl->chip); | ||
947 | pinctrl_unregister(pctrl->pctrl); | 941 | pinctrl_unregister(pctrl->pctrl); |
948 | 942 | ||
949 | unregister_restart_handler(&pctrl->restart_nb); | 943 | unregister_restart_handler(&pctrl->restart_nb); |
diff --git a/drivers/pinctrl/samsung/pinctrl-exynos5440.c b/drivers/pinctrl/samsung/pinctrl-exynos5440.c index b995ec2c5d16..88acfc0efd54 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos5440.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos5440.c | |||
@@ -874,11 +874,7 @@ static int exynos5440_gpiolib_register(struct platform_device *pdev, | |||
874 | static int exynos5440_gpiolib_unregister(struct platform_device *pdev, | 874 | static int exynos5440_gpiolib_unregister(struct platform_device *pdev, |
875 | struct exynos5440_pinctrl_priv_data *priv) | 875 | struct exynos5440_pinctrl_priv_data *priv) |
876 | { | 876 | { |
877 | int ret = gpiochip_remove(priv->gc); | 877 | gpiochip_remove(priv->gc); |
878 | if (ret) { | ||
879 | dev_err(&pdev->dev, "gpio chip remove failed\n"); | ||
880 | return ret; | ||
881 | } | ||
882 | return 0; | 878 | return 0; |
883 | } | 879 | } |
884 | 880 | ||
diff --git a/drivers/pinctrl/samsung/pinctrl-samsung.c b/drivers/pinctrl/samsung/pinctrl-samsung.c index 4a47691c32b1..2d37c8f49f3c 100644 --- a/drivers/pinctrl/samsung/pinctrl-samsung.c +++ b/drivers/pinctrl/samsung/pinctrl-samsung.c | |||
@@ -946,9 +946,7 @@ static int samsung_gpiolib_register(struct platform_device *pdev, | |||
946 | 946 | ||
947 | fail: | 947 | fail: |
948 | for (--i, --bank; i >= 0; --i, --bank) | 948 | for (--i, --bank; i >= 0; --i, --bank) |
949 | if (gpiochip_remove(&bank->gpio_chip)) | 949 | gpiochip_remove(&bank->gpio_chip); |
950 | dev_err(&pdev->dev, "gpio chip %s remove failed\n", | ||
951 | bank->gpio_chip.label); | ||
952 | return ret; | 950 | return ret; |
953 | } | 951 | } |
954 | 952 | ||
@@ -958,16 +956,11 @@ static int samsung_gpiolib_unregister(struct platform_device *pdev, | |||
958 | { | 956 | { |
959 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; | 957 | struct samsung_pin_ctrl *ctrl = drvdata->ctrl; |
960 | struct samsung_pin_bank *bank = ctrl->pin_banks; | 958 | struct samsung_pin_bank *bank = ctrl->pin_banks; |
961 | int ret = 0; | ||
962 | int i; | 959 | int i; |
963 | 960 | ||
964 | for (i = 0; !ret && i < ctrl->nr_banks; ++i, ++bank) | 961 | for (i = 0; i < ctrl->nr_banks; ++i, ++bank) |
965 | ret = gpiochip_remove(&bank->gpio_chip); | 962 | gpiochip_remove(&bank->gpio_chip); |
966 | 963 | return 0; | |
967 | if (ret) | ||
968 | dev_err(&pdev->dev, "gpio chip remove failed\n"); | ||
969 | |||
970 | return ret; | ||
971 | } | 964 | } |
972 | 965 | ||
973 | static const struct of_device_id samsung_pinctrl_dt_match[]; | 966 | static const struct of_device_id samsung_pinctrl_dt_match[]; |
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c index b713bd59ffbb..4c831fdfcc2f 100644 --- a/drivers/pinctrl/sirf/pinctrl-sirf.c +++ b/drivers/pinctrl/sirf/pinctrl-sirf.c | |||
@@ -891,8 +891,7 @@ static int sirfsoc_gpio_probe(struct device_node *np) | |||
891 | 891 | ||
892 | out_no_range: | 892 | out_no_range: |
893 | out_banks: | 893 | out_banks: |
894 | if (gpiochip_remove(&sgpio->chip.gc)) | 894 | gpiochip_remove(&sgpio->chip.gc); |
895 | dev_err(&pdev->dev, "could not remove gpio chip\n"); | ||
896 | out: | 895 | out: |
897 | iounmap(regs); | 896 | iounmap(regs); |
898 | return err; | 897 | return err; |