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.17-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.17 kernel cycle: New drivers: - Nintendo Wii GameCube GPIO, known as "Hollywood" - Raspberry Pi mailbox service GPIO expander - Spreadtrum main SC9860 SoC and IEC GPIO controllers. Improvements: - Implemented .get_multiple() callback for most of the high-performance industrial GPIO cards for the ISA bus. - ISA GPIO drivers now select the ISA_BUS_API instead of depending on it. This is merged with the same pattern for all the ISA drivers and some other Kconfig cleanups related to this. Cleanup: - Delete the TZ1090 GPIO drivers following the deletion of this SoC from the ARM tree. - Move the documentation over to driver-api to conform with the rest of the kernel documentation build. - Continue to make the GPIO drivers include only <linux/gpio/driver.h> and not the too broad <linux/gpio.h> that we want to get rid of. - Managed to remove VLA allocation from two drivers pending more fixes in this area for the next merge window. - Misc janitorial fixes" * tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits) gpio: Add Spreadtrum PMIC EIC driver support gpio: Add Spreadtrum EIC driver support dt-bindings: gpio: Add Spreadtrum EIC controller documentation gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe() pinctrl: qcom: Don't allow protected pins to be requested gpiolib: Support 'gpio-reserved-ranges' property gpiolib: Change bitmap allocation to kmalloc_array gpiolib: Extract mask allocation into subroutine dt-bindings: gpio: Add a gpio-reserved-ranges property gpio: mockup: fix a potential crash when creating debugfs entries gpio: pca953x: add compatibility for pcal6524 and pcal9555a gpio: dwapb: Add support for a bus clock gpio: Remove VLA from xra1403 driver gpio: Remove VLA from MAX3191X driver gpio: ws16c48: Implement get_multiple callback gpio: gpio-mm: Implement get_multiple callback gpio: 104-idi-48: Implement get_multiple callback gpio: 104-dio-48e: Implement get_multiple callback gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks gpio: pci-idio-16: Implement get_multiple callback ...
- Loading branch information
Showing
77 changed files
with
2,771 additions
and
1,274 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
Spreadtrum EIC controller bindings | ||
|
||
The EIC is the abbreviation of external interrupt controller, which can | ||
be used only in input mode. The Spreadtrum platform has 2 EIC controllers, | ||
one is in digital chip, and another one is in PMIC. The digital chip EIC | ||
controller contains 4 sub-modules: EIC-debounce, EIC-latch, EIC-async and | ||
EIC-sync. But the PMIC EIC controller contains only one EIC-debounce sub- | ||
module. | ||
|
||
The EIC-debounce sub-module provides up to 8 source input signal | ||
connections. A debounce mechanism is used to capture the input signals' | ||
stable status (millisecond resolution) and a single-trigger mechanism | ||
is introduced into this sub-module to enhance the input event detection | ||
reliability. In addition, this sub-module's clock can be shut off | ||
automatically to reduce power dissipation. Moreover the debounce range | ||
is from 1ms to 4s with a step size of 1ms. The input signal will be | ||
ignored if it is asserted for less than 1 ms. | ||
|
||
The EIC-latch sub-module is used to latch some special power down signals | ||
and generate interrupts, since the EIC-latch does not depend on the APB | ||
clock to capture signals. | ||
|
||
The EIC-async sub-module uses a 32kHz clock to capture the short signals | ||
(microsecond resolution) to generate interrupts by level or edge trigger. | ||
|
||
The EIC-sync is similar with GPIO's input function, which is a synchronized | ||
signal input register. It can generate interrupts by level or edge trigger | ||
when detecting input signals. | ||
|
||
Required properties: | ||
- compatible: Should be one of the following: | ||
"sprd,sc9860-eic-debounce", | ||
"sprd,sc9860-eic-latch", | ||
"sprd,sc9860-eic-async", | ||
"sprd,sc9860-eic-sync", | ||
"sprd,sc27xx-eic". | ||
- reg: Define the base and range of the I/O address space containing | ||
the GPIO controller registers. | ||
- gpio-controller: Marks the device node as a GPIO controller. | ||
- #gpio-cells: Should be <2>. The first cell is the gpio number and | ||
the second cell is used to specify optional parameters. | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells: Should be <2>. Specifies the number of cells needed | ||
to encode interrupt source. | ||
- interrupts: Should be the port interrupt shared by all the gpios. | ||
|
||
Example: | ||
eic_debounce: gpio@40210000 { | ||
compatible = "sprd,sc9860-eic-debounce"; | ||
reg = <0 0x40210000 0 0x80>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; | ||
}; | ||
|
||
eic_latch: gpio@40210080 { | ||
compatible = "sprd,sc9860-eic-latch"; | ||
reg = <0 0x40210080 0 0x20>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; | ||
}; | ||
|
||
eic_async: gpio@402100a0 { | ||
compatible = "sprd,sc9860-eic-async"; | ||
reg = <0 0x402100a0 0 0x20>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; | ||
}; | ||
|
||
eic_sync: gpio@402100c0 { | ||
compatible = "sprd,sc9860-eic-sync"; | ||
reg = <0 0x402100c0 0 0x20>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; | ||
}; | ||
|
||
pmic_eic: gpio@300 { | ||
compatible = "sprd,sc27xx-eic"; | ||
reg = <0x300>; | ||
interrupt-parent = <&sc2731_pmic>; | ||
interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
}; |
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,28 @@ | ||
Spreadtrum GPIO controller bindings | ||
|
||
The controller's registers are organized as sets of sixteen 16-bit | ||
registers with each set controlling a bank of up to 16 pins. A single | ||
interrupt is shared for all of the banks handled by the controller. | ||
|
||
Required properties: | ||
- compatible: Should be "sprd,sc9860-gpio". | ||
- reg: Define the base and range of the I/O address space containing | ||
the GPIO controller registers. | ||
- gpio-controller: Marks the device node as a GPIO controller. | ||
- #gpio-cells: Should be <2>. The first cell is the gpio number and | ||
the second cell is used to specify optional parameters. | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells: Should be <2>. Specifies the number of cells needed | ||
to encode interrupt source. | ||
- interrupts: Should be the port interrupt shared by all the gpios. | ||
|
||
Example: | ||
ap_gpio: gpio@40280000 { | ||
compatible = "sprd,sc9860-gpio"; | ||
reg = <0 0x40280000 0 0x1000>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; | ||
}; |
45 changes: 0 additions & 45 deletions
45
Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
27 changes: 27 additions & 0 deletions
27
Documentation/devicetree/bindings/gpio/nintendo,hollywood-gpio.txt
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,27 @@ | ||
Nintendo Wii (Hollywood) GPIO controller | ||
|
||
Required properties: | ||
- compatible: "nintendo,hollywood-gpio | ||
- reg: Physical base address and length of the controller's registers. | ||
- 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: | ||
- bit 0 specifies polarity (0 for normal, 1 for inverted). | ||
|
||
Optional properties: | ||
- ngpios: see Documentation/devicetree/bindings/gpio/gpio.txt | ||
- interrupt-controller: Marks the device node as an interrupt controller. | ||
- #interrupt-cells: Should be two. | ||
- interrupts: Interrupt specifier for the controller's Broadway (PowerPC) | ||
interrupt. | ||
- interrupt-parent: phandle of the parent interrupt controller. | ||
|
||
Example: | ||
|
||
GPIO: gpio@d8000c0 { | ||
#gpio-cells = <2>; | ||
compatible = "nintendo,hollywood-gpio"; | ||
reg = <0x0d8000c0 0x40>; | ||
gpio-controller; | ||
ngpios = <24>; | ||
} |
30 changes: 30 additions & 0 deletions
30
Documentation/devicetree/bindings/gpio/raspberrypi,firmware-gpio.txt
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,30 @@ | ||
Raspberry Pi GPIO expander | ||
|
||
The Raspberry Pi 3 GPIO expander is controlled by the VC4 firmware. The | ||
firmware exposes a mailbox interface that allows the ARM core to control the | ||
GPIO lines on the expander. | ||
|
||
The Raspberry Pi GPIO expander node must be a child node of the Raspberry Pi | ||
firmware node. | ||
|
||
Required properties: | ||
|
||
- compatible : Should be "raspberrypi,firmware-gpio" | ||
- gpio-controller : Marks the device node as a gpio controller | ||
- #gpio-cells : Should be two. The first cell is the pin number, and | ||
the second cell is used to specify the gpio polarity: | ||
0 = active high | ||
1 = active low | ||
|
||
Example: | ||
|
||
firmware: firmware-rpi { | ||
compatible = "raspberrypi,bcm2835-firmware"; | ||
mboxes = <&mailbox>; | ||
|
||
expgpio: gpio { | ||
compatible = "raspberrypi,firmware-gpio"; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
}; | ||
}; |
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.