History

Merge tag 'gpio-updates-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski: "Relatively few updates for this release cycle. We have a single new driver and some minor changes in drivers, more work on limiting the usage of of_node in drivers and DT updates: - new driver: gpio-en7523 - dt-bindings: convertion of faraday,ftgpio010 to YAML, new compatible string in gpio-vf610 and a bugfix in an example - gpiolib core: several improvements and some code shrink - documentation: convert all public docs into kerneldoc format - set IRQ bus token in gpio-crystalcove (addresses a debugfs issue) - add a missing return value check for kstrdup() in gpio-merrifield - allow gpio-tps68470 to be built as module - more work on limiting usage of of_node in GPIO drivers - several sysfs interface improvements - use SDPX in gpio-ts4900" * tag 'gpio-updates-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: ts4900: Use SPDX header gpiolib: Use list_first_entry()/list_last_entry() gpiolib: sysfs: Simplify edge handling in the code gpiolib: sysfs: Move kstrtox() calls outside of the mutex lock gpiolib: sysfs: Move sysfs_emit() calls outside of the mutex lock gpiolib: make struct comments into real kernel docs dt-bindings: gpio: convert faraday,ftgpio01 to yaml dt-bindings: gpio: gpio-vf610: Add imx93 compatible string gpiolib: Simplify error path in gpiod_get_index() when requesting GPIO gpiolib: Use short form of ternary operator in gpiod_get_index() gpiolib: Introduce for_each_gpio_desc_with_flag() macro gpio: Add support for Airoha EN7523 GPIO controller dt-bindings: arm: airoha: Add binding for Airoha GPIO controller dt-bindings: gpio: fix gpio-hog example gpio: tps68470: Allow building as module gpio: tegra: Get rid of duplicate of_node assignment gpio: altera-a10sr: Switch to use fwnode instead of of_node gpio: merrifield: check the return value of devm_kstrdup() gpio: crystalcove: Set IRQ domain bus token to DOMAIN_BUS_WIRED

Linus Torvalds committed 4 years ago

Commit ebcb5772 parents 5e20645 87ba5ba19 files · +422 −154Browse files

Showing the changes to include (1 of 19 files). Show all

Unified · Split

include/linux/gpio/consumer.h+16−19
@@ -8,27 +8,16 @@ · 7 unmodified lines
8#include <linux/err.h>8#include <linux/err.h>
9 9
10struct device;10struct device;
11
12/**
13 * Opaque descriptor for a GPIO. These are obtained using gpiod_get() and are
14 * preferable to the old integer-based handles.
15 *
16 * Contrary to integers, a pointer to a gpio_desc is guaranteed to be valid
17 * until the GPIO is released.
18 */
19struct gpio_desc;11struct gpio_desc;
20
21/**
22 * Opaque descriptor for a structure of GPIO array attributes. This structure
23 * is attached to struct gpiod_descs obtained from gpiod_get_array() and can be
24 * passed back to get/set array functions in order to activate fast processing
25 * path if applicable.
26 */
27struct gpio_array;12struct gpio_array;
28 13
29/**14/**
30 * Struct containing an array of descriptors that can be obtained using15 * struct gpio_descs - Struct containing an array of descriptors that can be
31 * gpiod_get_array().16 * obtained using gpiod_get_array()
17 *
18 * @info: Pointer to the opaque gpio_array structure
19 * @ndescs: Number of held descriptors
20 * @desc: Array of pointers to GPIO descriptors
32 */21 */
33struct gpio_descs {22struct gpio_descs {
34 struct gpio_array *info;23 struct gpio_array *info;
@@ -43,8 +32,16 @@ struct gpio_descs { · 8 unmodified lines
43#define GPIOD_FLAGS_BIT_NONEXCLUSIVE BIT(4)32#define GPIOD_FLAGS_BIT_NONEXCLUSIVE BIT(4)
44 33
45/**34/**
46 * Optional flags that can be passed to one of gpiod_* to configure direction35 * enum gpiod_flags - Optional flags that can be passed to one of gpiod_* to
47 * and output value. These values cannot be OR'd.36 * configure direction and output value. These values
37 * cannot be OR'd.
38 *
39 * @GPIOD_ASIS: Don't change anything
40 * @GPIOD_IN: Set lines to input mode
41 * @GPIOD_OUT_LOW: Set lines to output and drive them low
42 * @GPIOD_OUT_HIGH: Set lines to output and drive them high
43 * @GPIOD_OUT_LOW_OPEN_DRAIN: Set lines to open-drain output and drive them low
44 * @GPIOD_OUT_HIGH_OPEN_DRAIN: Set lines to open-drain output and drive them high
48 */45 */
49enum gpiod_flags {46enum gpiod_flags {
50 GPIOD_ASIS = 0,47 GPIOD_ASIS = 0,