History

gpio: pass lookup and descriptor flags to request_own

When a gpio_chip wants to request a descriptor from itself using gpiochip_request_own_desc() it needs to be able to specify fully how to use the descriptor, notably line inversion semantics. The workaround in the gpiolib.c can be removed and cases (such as SPI CS) where we need at times to request a GPIO with line inversion semantics directly on a chip for workarounds, can be fully supported with this call. Fix up some users of the API that weren't really using the last flag to set up the line as input or output properly but instead just calling direction setting explicitly after requesting the line.

Linus Walleij committed 7 years ago

Commit 5923ea61 parent 0aa3ebf8 files · +34 −38Browse files

Showing the changes to include/linux (1 of 8 files). Show all

Unified · Split

include/linux/gpio/driver.h+3−1
@@ -18,6 +18,7 @@ struct seq_file; · 17 unmodified lines
18struct gpio_device;18struct gpio_device;
19struct module;19struct module;
20enum gpiod_flags;20enum gpiod_flags;
21enum gpio_lookup_flags;
21 22
22#ifdef CONFIG_GPIOLIB23#ifdef CONFIG_GPIOLIB
23 24
@@ -614,7 +615,8 @@ gpiochip_remove_pin_ranges(struct gpio_chip *chip) · 590 unmodified lines
614 615
615struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum,616struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum,
616 const char *label,617 const char *label,
617 enum gpiod_flags flags);618 enum gpio_lookup_flags lflags,
619 enum gpiod_flags dflags);
618void gpiochip_free_own_desc(struct gpio_desc *desc);620void gpiochip_free_own_desc(struct gpio_desc *desc);
619 621
620void devprop_gpiochip_set_names(struct gpio_chip *chip,622void devprop_gpiochip_set_names(struct gpio_chip *chip,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t