-
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-updates-for-v6.2' of git://git.kernel.org/pub/scm/lin…
…ux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We have a new GPIO multiplexer driver, bunch of driver updates and refactoring in the core GPIO library. GPIO core: - teach gpiolib to work with software nodes for HW description - remove ARCH_NR_GPIOS treewide as we no longer impose any limit on the number of GPIOS since the allocation became entirely dynamic - add support for HW quirks for Cirrus CS42L56 codec, Marvell NFC controller, Freescale PCIe and Ethernet controller, Himax LCDs and Mediatek mt2701 - refactor OF quirk code - some general refactoring of the OF and ACPI code, adding new helpers, minor tweaks and fixes, making fwnode usage consistent etc. GPIO uAPI: - fix an issue where the user-space can trigger a NULL-pointer dereference in the kernel by opening a device file, forcing a driver unbind and then calling one of the syscalls on the associated file descriptor New drivers: - add gpio-latch: a new GPIO multiplexer based on latches connected to other GPIOs Driver updates: - convert i2c GPIO expanders to using .probe_new() - drop the gpio-sta2x11 driver - factor out common code for the ACCES IDIO-16 family of controllers and use this new library wherever applicable in drivers - add DT support to gpio-hisi - allow building gpio-davinci as a module and increase its maxItems property - add support for a new model to gpio-pca9570 - other minor changes to various drivers" * tag 'gpio-updates-for-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (66 commits) gpio: sim: set a limit on the number of GPIOs gpiolib: protect the GPIO device against being dropped while in use by user-space gpiolib: cdev: fix NULL-pointer dereferences gpiolib: Provide to_gpio_device() helper gpiolib: Unify access to the device properties gpio: Do not include <linux/kernel.h> when not really needed. gpio: pcf857x: Convert to i2c's .probe_new() gpio: pca953x: Convert to i2c's .probe_new() gpio: max732x: Convert to i2c's .probe_new() dt-bindings: gpio: gpio-davinci: Increase maxItems in gpio-line-names gpiolib: ensure that fwnode is properly set gpio: sl28cpld: Replace irqchip mask_invert with unmask_base gpiolib: of: Use correct fwnode for DT-probed chips gpiolib: of: Drop redundant check in of_mm_gpiochip_remove() gpiolib: of: Prepare of_mm_gpiochip_add_data() for fwnode gpiolib: add support for software nodes gpiolib: consolidate GPIO lookups gpiolib: acpi: avoid leaking ACPI details into upper gpiolib layers gpiolib: acpi: teach acpi_find_gpio() to handle data-only nodes gpiolib: acpi: change acpi_find_gpio() to accept firmware node ...
- Loading branch information
Showing
50 changed files
with
1,614 additions
and
1,213 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: GPIO latch controller | ||
|
||
maintainers: | ||
- Sascha Hauer <s.hauer@pengutronix.de> | ||
|
||
description: | | ||
This binding describes a GPIO multiplexer based on latches connected to | ||
other GPIOs, like this: | ||
CLK0 ----------------------. ,--------. | ||
CLK1 -------------------. `--------|> #0 | | ||
| | | | ||
OUT0 ----------------+--|-----------|D0 Q0|-----|< | ||
OUT1 --------------+-|--|-----------|D1 Q1|-----|< | ||
OUT2 ------------+-|-|--|-----------|D2 Q2|-----|< | ||
OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|< | ||
OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|< | ||
OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|< | ||
OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|< | ||
OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|< | ||
| | | | | | | | | `--------' | ||
| | | | | | | | | | ||
| | | | | | | | | ,--------. | ||
| | | | | | | | `-----------|> #1 | | ||
| | | | | | | | | | | ||
| | | | | | | `--------------|D0 Q0|-----|< | ||
| | | | | | `----------------|D1 Q1|-----|< | ||
| | | | | `------------------|D2 Q2|-----|< | ||
| | | | `--------------------|D3 Q3|-----|< | ||
| | | `----------------------|D4 Q4|-----|< | ||
| | `------------------------|D5 Q5|-----|< | ||
| `--------------------------|D6 Q6|-----|< | ||
`----------------------------|D7 Q7|-----|< | ||
`--------' | ||
The number of clk-gpios and latched-gpios is not fixed. The actual number | ||
of number of latches and the number of inputs per latch is derived from | ||
the number of GPIOs given in the corresponding device tree properties. | ||
properties: | ||
compatible: | ||
const: gpio-latch | ||
"#gpio-cells": | ||
const: 2 | ||
|
||
clk-gpios: | ||
description: Array of GPIOs to be used to clock a latch | ||
|
||
latched-gpios: | ||
description: Array of GPIOs to be used as inputs per latch | ||
|
||
setup-duration-ns: | ||
description: Delay in nanoseconds to wait after the latch inputs have been | ||
set up | ||
|
||
clock-duration-ns: | ||
description: Delay in nanoseconds to wait between clock output changes | ||
|
||
gpio-controller: true | ||
|
||
gpio-line-names: true | ||
|
||
required: | ||
- compatible | ||
- "#gpio-cells" | ||
- gpio-controller | ||
- clk-gpios | ||
- latched-gpios | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
gpio-latch { | ||
#gpio-cells = <2>; | ||
pinctrl-names = "default"; | ||
pinctrl-0 = <&pinctrl_di_do_leds>; | ||
compatible = "gpio-latch"; | ||
gpio-controller; | ||
setup-duration-ns = <100>; | ||
clock-duration-ns = <100>; | ||
clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>; | ||
latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>, | ||
<&gpio3 23 0>, <&gpio3 24 0>, | ||
<&gpio3 25 0>, <&gpio3 26 0>, | ||
<&gpio3 27 0>, <&gpio3 28 0>; | ||
}; |
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ maintainers: | |
properties: | ||
compatible: | ||
enum: | ||
- dlg,slg7xl45106 | ||
- nxp,pca9570 | ||
- nxp,pca9571 | ||
|
||
|
56 changes: 56 additions & 0 deletions
56
Documentation/devicetree/bindings/gpio/hisilicon,ascend910-gpio.yaml
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,56 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/gpio/hisilicon,ascend910-gpio.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: HiSilicon common GPIO controller | ||
|
||
maintainers: | ||
- Jay Fang <f.fangjian@huawei.com> | ||
|
||
description: | ||
The HiSilicon common GPIO controller can be used for many different | ||
types of SoC such as Huawei Ascend AI series chips. | ||
|
||
properties: | ||
compatible: | ||
const: hisilicon,ascend910-gpio | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
gpio-controller: true | ||
|
||
"#gpio-cells": | ||
const: 2 | ||
|
||
ngpios: | ||
minimum: 1 | ||
maximum: 32 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- interrupts | ||
- gpio-controller | ||
- "#gpio-cells" | ||
- ngpios | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
gpio@840d0000 { | ||
compatible = "hisilicon,ascend910-gpio"; | ||
reg = <0x840d0000 0x1000>; | ||
ngpios = <32>; | ||
gpio-controller; | ||
#gpio-cells = <2>; | ||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; | ||
}; |
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
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
Oops, something went wrong.