aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-07 15:40:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-07 15:40:27 -0400
commitc7d28eca1d58d335ff8de6f33559b221bdd029f9 (patch)
tree3522cae5809d6912ccc307a4b0a7dea3ffeb8225 /include
parentdddd564dbb5934c9a0c401491cafb98ab1c82fc6 (diff)
parent413058df4331ce29f9934a5870d582c7e71fe15f (diff)
Merge tag 'gpio-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.13 series. Some administrativa: I have a slew of 8250 serial patches and the new IOT2040 serial+GPIO driver coming in through this tree, along with a whole bunch of Exar 8250 fixes. These are ACKed by Greg and also hit drivers/platform/* where they are ACKed by Andy Shevchenko. Speaking about drivers/platform/* there is also a bunch of ACPI stuff coming through that route, again ACKed by Andy. The MCP23S08 changes are coming in here as well. You already have the commits in your tree, so this is just a result of sharing an immutable branch between pin control and GPIO. Core: - Export add/remove for lookup tables so that modules can export GPIO descriptor tables. - Handle GPIO sleep states: it is now possible to flag that a GPIO line may loose its state during suspend/resume of the system to save power. This is used in the Wolfson Micro Arizona driver. - ACPI-based GPIO was tightened up a lot around the edges. - Use bitmap_fill() to speed up a loop. New drivers: - Exar XRA1403 SPI-based GPIO. - MVEBU driver now supports Armada 7K and 8K. - LP87565 PMIC GPIO. - Renesas R-CAR R8A7743 (RZ/G1M). - The new IOT2040 8250 serial/GPIO also comes in through this changeset. Substantial driver changes: - Seriously fix the Exar 8250 GPIO portions to work. - The MCP23S08 was moved out to a pin control driver. - Convert MEVEBU to use regmap for register access. - Drop Vulcan support from the Broadcom driver. - Serious cleanup and improvement of the mockup driver, giving us a better test coverage. Misc: - Lots of janitorial clean up. - A bunch of documentation fixes" * tag 'gpio-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (70 commits) serial: exar: Add support for IOT2040 device gpio-exar/8250-exar: Make set of exported GPIOs configurable platform: Accept const properties serial: exar: Factor out platform hooks gpio-exar/8250-exar: Rearrange gpiochip parenthood gpio: exar: Fix iomap request gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards serial: uapi: Add support for bus termination gpio: rcar: Add R8A7743 (RZ/G1M) support gpio: gpio-wcove: Fix GPIO control register offset calculation gpio: lp87565: Add support for GPIO gpio: dwapb: fix missing first irq for edgeboth irq type MAINTAINERS: Take maintainership for GPIO ACPI support gpio: exar: Fix reading of directions and values gpio: exar: Allocate resources on behalf of the platform device gpio-exar/8250-exar: Fix passing in of parent PCI device gpio: mockup: use devm_kcalloc() where applicable gpio: mockup: add myself as author gpio: mockup: improve the error message gpio: mockup: don't return magic numbers from probe() ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/gpio/gpio.h4
-rw-r--r--include/linux/acpi.h7
-rw-r--r--include/linux/gpio/driver.h3
-rw-r--r--include/linux/gpio/machine.h2
-rw-r--r--include/linux/of_gpio.h1
-rw-r--r--include/linux/platform_data/adp5588.h (renamed from include/linux/i2c/adp5588.h)0
-rw-r--r--include/linux/platform_data/max732x.h (renamed from include/linux/i2c/max732x.h)0
-rw-r--r--include/linux/platform_data/pcf857x.h (renamed from include/linux/i2c/pcf857x.h)0
-rw-r--r--include/linux/platform_device.h2
9 files changed, 18 insertions, 1 deletions
diff --git a/include/dt-bindings/gpio/gpio.h b/include/dt-bindings/gpio/gpio.h
index b4f54da694eb..c5074584561d 100644
--- a/include/dt-bindings/gpio/gpio.h
+++ b/include/dt-bindings/gpio/gpio.h
@@ -28,4 +28,8 @@
28#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN) 28#define GPIO_OPEN_DRAIN (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_DRAIN)
29#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE) 29#define GPIO_OPEN_SOURCE (GPIO_SINGLE_ENDED | GPIO_LINE_OPEN_SOURCE)
30 30
31/* Bit 3 express GPIO suspend/resume persistence */
32#define GPIO_SLEEP_MAINTAIN_VALUE 0
33#define GPIO_SLEEP_MAY_LOOSE_VALUE 8
34
31#endif 35#endif
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index cafdfb84ca28..99f96df83dd8 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -964,6 +964,8 @@ int devm_acpi_dev_add_driver_gpios(struct device *dev,
964 const struct acpi_gpio_mapping *gpios); 964 const struct acpi_gpio_mapping *gpios);
965void devm_acpi_dev_remove_driver_gpios(struct device *dev); 965void devm_acpi_dev_remove_driver_gpios(struct device *dev);
966 966
967bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
968 struct acpi_resource_gpio **agpio);
967int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index); 969int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index);
968#else 970#else
969static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev, 971static inline int acpi_dev_add_driver_gpios(struct acpi_device *adev,
@@ -980,6 +982,11 @@ static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
980} 982}
981static inline void devm_acpi_dev_remove_driver_gpios(struct device *dev) {} 983static inline void devm_acpi_dev_remove_driver_gpios(struct device *dev) {}
982 984
985static inline bool acpi_gpio_get_irq_resource(struct acpi_resource *ares,
986 struct acpi_resource_gpio **agpio)
987{
988 return false;
989}
983static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index) 990static inline int acpi_dev_gpio_irq_get(struct acpi_device *adev, int index)
984{ 991{
985 return -ENXIO; 992 return -ENXIO;
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 393582867afd..af20369ec8e7 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -213,6 +213,9 @@ bool gpiochip_line_is_irq(struct gpio_chip *chip, unsigned int offset);
213bool gpiochip_line_is_open_drain(struct gpio_chip *chip, unsigned int offset); 213bool gpiochip_line_is_open_drain(struct gpio_chip *chip, unsigned int offset);
214bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset); 214bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset);
215 215
216/* Sleep persistence inquiry for drivers */
217bool gpiochip_line_is_persistent(struct gpio_chip *chip, unsigned int offset);
218
216/* get driver data */ 219/* get driver data */
217void *gpiochip_get_data(struct gpio_chip *chip); 220void *gpiochip_get_data(struct gpio_chip *chip);
218 221
diff --git a/include/linux/gpio/machine.h b/include/linux/gpio/machine.h
index f738d50cc17d..6e76b16fcade 100644
--- a/include/linux/gpio/machine.h
+++ b/include/linux/gpio/machine.h
@@ -9,6 +9,8 @@ enum gpio_lookup_flags {
9 GPIO_ACTIVE_LOW = (1 << 0), 9 GPIO_ACTIVE_LOW = (1 << 0),
10 GPIO_OPEN_DRAIN = (1 << 1), 10 GPIO_OPEN_DRAIN = (1 << 1),
11 GPIO_OPEN_SOURCE = (1 << 2), 11 GPIO_OPEN_SOURCE = (1 << 2),
12 GPIO_SLEEP_MAINTAIN_VALUE = (0 << 3),
13 GPIO_SLEEP_MAY_LOOSE_VALUE = (1 << 3),
12}; 14};
13 15
14/** 16/**
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index 1e089d5a182b..ca10f43564de 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -31,6 +31,7 @@ enum of_gpio_flags {
31 OF_GPIO_ACTIVE_LOW = 0x1, 31 OF_GPIO_ACTIVE_LOW = 0x1,
32 OF_GPIO_SINGLE_ENDED = 0x2, 32 OF_GPIO_SINGLE_ENDED = 0x2,
33 OF_GPIO_OPEN_DRAIN = 0x4, 33 OF_GPIO_OPEN_DRAIN = 0x4,
34 OF_GPIO_SLEEP_MAY_LOOSE_VALUE = 0x8,
34}; 35};
35 36
36#ifdef CONFIG_OF_GPIO 37#ifdef CONFIG_OF_GPIO
diff --git a/include/linux/i2c/adp5588.h b/include/linux/platform_data/adp5588.h
index c2153049cfbd..c2153049cfbd 100644
--- a/include/linux/i2c/adp5588.h
+++ b/include/linux/platform_data/adp5588.h
diff --git a/include/linux/i2c/max732x.h b/include/linux/platform_data/max732x.h
index c04bac8bf2fe..c04bac8bf2fe 100644
--- a/include/linux/i2c/max732x.h
+++ b/include/linux/platform_data/max732x.h
diff --git a/include/linux/i2c/pcf857x.h b/include/linux/platform_data/pcf857x.h
index 0767a2a6b2f1..0767a2a6b2f1 100644
--- a/include/linux/i2c/pcf857x.h
+++ b/include/linux/platform_data/pcf857x.h
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 98c2a7c7108e..49f634d96118 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -172,7 +172,7 @@ extern int platform_device_add_resources(struct platform_device *pdev,
172extern int platform_device_add_data(struct platform_device *pdev, 172extern int platform_device_add_data(struct platform_device *pdev,
173 const void *data, size_t size); 173 const void *data, size_t size);
174extern int platform_device_add_properties(struct platform_device *pdev, 174extern int platform_device_add_properties(struct platform_device *pdev,
175 struct property_entry *properties); 175 const struct property_entry *properties);
176extern int platform_device_add(struct platform_device *pdev); 176extern int platform_device_add(struct platform_device *pdev);
177extern void platform_device_del(struct platform_device *pdev); 177extern void platform_device_del(struct platform_device *pdev);
178extern void platform_device_put(struct platform_device *pdev); 178extern void platform_device_put(struct platform_device *pdev);