forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'gpio-v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/k…
…ernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.15 kernel cycle: Core: - Fix the semantics of raw GPIO to actually be raw. No inversion semantics as before, but also no open draining, and allow the raw operations to affect lines used for interrupts as the caller supposedly knows what they are doing if they are getting the big hammer. - Rewrote the __inner_function() notation calls to names that make more sense. I just find this kind of code disturbing. - Drop the .irq_base() field from the gpiochip since now all IRQs are mapped dynamically. This is nice. - Support for .get_multiple() in the core driver API. This allows us to read several GPIO lines with a single register read. This has high value for some usecases: it can be used to create oscilloscopes and signal analyzers and other things that rely on reading several lines at exactly the same instant. Also a generally nice optimization. This uses the new assign_bit() macro from the bitops lib that was ACKed by Andrew Morton and is implemented for two drivers, one of them being the generic MMIO driver so everyone using that will be able to benefit from this. - Do not allow requests of Open Drain and Open Source setting of a GPIO line simultaneously. If the hardware actually supports enabling both at the same time the electrical result would be disastrous. - A new interrupt chip core helper. This will be helpful to deal with "banked" GPIOs, which means GPIO controllers with several logical blocks of GPIO inside them. This is several gpiochips per device in the device model, in contrast to the case when there is a 1-to-1 relationship between a device and a gpiochip. New drivers: - Maxim MAX3191x industrial serializer, a very interesting piece of professional I/O hardware. - Uniphier GPIO driver. This is the GPIO block from the recent Socionext (ex Fujitsu and Panasonic) platform. - Tegra 186 driver. This is based on the new banked GPIO infrastructure. Other improvements: - Some documentation improvements. - Wakeup support for the DesignWare DWAPB GPIO controller. - Reset line support on the DesignWare DWAPB GPIO controller. - Several non-critical bug fixes and improvements for the Broadcom BRCMSTB driver. - Misc non-critical bug fixes like exotic errorpaths, removal of dead code etc. - Explicit comments on fall-through switch() statements" * tag 'gpio-v4.15-1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (65 commits) gpio: tegra186: Remove tegra186_gpio_lock_class gpio: rcar: Add r8a77995 (R-Car D3) support pinctrl: bcm2835: Fix some merge fallout gpio: Fix undefined lock_dep_class gpio: Automatically add lockdep keys gpio: Introduce struct gpio_irq_chip.first gpio: Disambiguate struct gpio_irq_chip.nested gpio: Add Tegra186 support gpio: Export gpiochip_irq_{map,unmap}() gpio: Implement tighter IRQ chip integration gpio: Move lock_key into struct gpio_irq_chip gpio: Move irq_valid_mask into struct gpio_irq_chip gpio: Move irq_nested into struct gpio_irq_chip gpio: Move irq_chained_parent to struct gpio_irq_chip gpio: Move irq_default_type to struct gpio_irq_chip gpio: Move irq_handler to struct gpio_irq_chip gpio: Move irqdomain into struct gpio_irq_chip gpio: Move irqchip into struct gpio_irq_chip gpio: Introduce struct gpio_irq_chip pinctrl: armada-37xx: remove unused variable ...
- Loading branch information
Showing
88 changed files
with
3,158 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
GPIO driver for Maxim MAX3191x industrial serializer | ||
|
||
Required properties: | ||
- compatible: Must be one of: | ||
"maxim,max31910" | ||
"maxim,max31911" | ||
"maxim,max31912" | ||
"maxim,max31913" | ||
"maxim,max31953" | ||
"maxim,max31963" | ||
- reg: Chip select number. | ||
- gpio-controller: Marks the device node as a GPIO controller. | ||
- #gpio-cells: Should be two. For consumer use see gpio.txt. | ||
|
||
Optional properties: | ||
- #daisy-chained-devices: | ||
Number of chips in the daisy-chain (default is 1). | ||
- maxim,modesel-gpios: GPIO pins to configure modesel of each chip. | ||
The number of GPIOs must equal "#daisy-chained-devices" | ||
(if each chip is driven by a separate pin) or 1 | ||
(if all chips are wired to the same pin). | ||
- maxim,fault-gpios: GPIO pins to read fault of each chip. | ||
The number of GPIOs must equal "#daisy-chained-devices" | ||
or 1. | ||
- maxim,db0-gpios: GPIO pins to configure debounce of each chip. | ||
The number of GPIOs must equal "#daisy-chained-devices" | ||
or 1. | ||
- maxim,db1-gpios: GPIO pins to configure debounce of each chip. | ||
The number of GPIOs must equal "maxim,db0-gpios". | ||
- maxim,modesel-8bit: Boolean whether the modesel pin of the chips is | ||
pulled high (8-bit mode). Use this if the modesel pin | ||
is hardwired and consequently "maxim,modesel-gpios" | ||
cannot be specified. By default if neither this nor | ||
"maxim,modesel-gpios" is given, the driver assumes | ||
that modesel is pulled low (16-bit mode). | ||
- maxim,ignore-undervoltage: | ||
Boolean whether to ignore undervoltage alarms signaled | ||
by the "maxim,fault-gpios" or by the status byte | ||
(in 16-bit mode). Use this if the chips are powered | ||
through 5VOUT instead of VCC24V, in which case they | ||
will constantly signal undervoltage. | ||
|
||
For other required and optional properties of SPI slave nodes please refer to | ||
../spi/spi-bus.txt. | ||
|
||
Example: | ||
gpio@0 { | ||
compatible = "maxim,max31913"; | ||
reg = <0>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
|
||
maxim,modesel-gpios = <&gpio2 23>; | ||
maxim,fault-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>; | ||
maxim,db0-gpios = <&gpio2 25>; | ||
maxim,db1-gpios = <&gpio2 26>; | ||
|
||
spi-max-frequency = <25000000>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
UniPhier GPIO controller | ||
|
||
Required properties: | ||
- compatible: Should be "socionext,uniphier-gpio". | ||
- reg: Specifies offset and length of the register set for the device. | ||
- gpio-controller: Marks the device node as a GPIO controller. | ||
- #gpio-cells: Should be 2. The first cell is the pin number and the second | ||
cell is used to specify optional parameters. | ||
- interrupt-parent: Specifies the parent interrupt controller. | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells: Should be 2. The first cell defines the interrupt number. | ||
The second cell bits[3:0] is used to specify trigger type as follows: | ||
1 = low-to-high edge triggered | ||
2 = high-to-low edge triggered | ||
4 = active high level-sensitive | ||
8 = active low level-sensitive | ||
Valid combinations are 1, 2, 3, 4, 8. | ||
- ngpios: Specifies the number of GPIO lines. | ||
- gpio-ranges: Mapping to pin controller pins (as described in gpio.txt) | ||
- socionext,interrupt-ranges: Specifies an interrupt number mapping between | ||
this GPIO controller and its interrupt parent, in the form of arbitrary | ||
number of <child-interrupt-base parent-interrupt-base length> triplets. | ||
|
||
Optional properties: | ||
- gpio-ranges-group-names: Used for named gpio ranges (as described in gpio.txt) | ||
|
||
Example: | ||
gpio: gpio@55000000 { | ||
compatible = "socionext,uniphier-gpio"; | ||
reg = <0x55000000 0x200>; | ||
interrupt-parent = <&aidet>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
gpio-ranges = <&pinctrl 0 0 0>; | ||
gpio-ranges-group-names = "gpio_range"; | ||
ngpios = <248>; | ||
socionext,interrupt-ranges = <0 48 16>, <16 154 5>, <21 217 3>; | ||
}; | ||
|
||
Consumer Example: | ||
|
||
sdhci0_pwrseq { | ||
compatible = "mmc-pwrseq-emmc"; | ||
reset-gpios = <&gpio UNIPHIER_GPIO_PORT(29, 4) GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
Please note UNIPHIER_GPIO_PORT(29, 4) represents PORT294 in the SoC document. | ||
Unfortunately, only the one's place is octal in the port numbering. (That is, | ||
PORT 8, 9, 18, 19, 28, 29, ... are missing.) UNIPHIER_GPIO_PORT() is a helper | ||
macro to calculate 29 * 8 + 4. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2029,13 +2029,15 @@ M: Masahiro Yamada <[email protected]> | |
L: [email protected] (moderated for non-subscribers) | ||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier.git | ||
S: Maintained | ||
F: Documentation/devicetree/bindings/gpio/gpio-uniphier.txt | ||
F: arch/arm/boot/dts/uniphier* | ||
F: arch/arm/include/asm/hardware/cache-uniphier.h | ||
F: arch/arm/mach-uniphier/ | ||
F: arch/arm/mm/cache-uniphier.c | ||
F: arch/arm64/boot/dts/socionext/ | ||
F: drivers/bus/uniphier-system-bus.c | ||
F: drivers/clk/uniphier/ | ||
F: drivers/gpio/gpio-uniphier.c | ||
F: drivers/i2c/busses/i2c-uniphier* | ||
F: drivers/irqchip/irq-uniphier-aidet.c | ||
F: drivers/pinctrl/uniphier/ | ||
|
@@ -12945,6 +12947,13 @@ F: arch/arc/plat-axs10x | |
F: arch/arc/boot/dts/ax* | ||
F: Documentation/devicetree/bindings/arc/axs10* | ||
|
||
SYNOPSYS DESIGNWARE APB GPIO DRIVER | ||
M: Hoan Tran <[email protected]> | ||
L: [email protected] | ||
S: Maintained | ||
F: drivers/gpio/gpio-dwapb.c | ||
F: Documentation/devicetree/bindings/gpio/snps-dwapb-gpio.txt | ||
|
||
SYNOPSYS DESIGNWARE DMAC DRIVER | ||
M: Viresh Kumar <[email protected]> | ||
R: Andy Shevchenko <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.