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
1818 struct gpio_device;
1919 struct module;
2020 enum gpiod_flags;
21+enum gpio_lookup_flags;
2122
2223 #ifdef CONFIG_GPIOLIB
2324
@@ -614,7 +615,8 @@ gpiochip_remove_pin_ranges(struct gpio_chip *chip) · 590 unmodified lines
614615
615616 struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *chip, u16 hwnum,
616617 const char *label,
617− enum gpiod_flags flags);
618+ enum gpio_lookup_flags lflags,
619+ enum gpiod_flags dflags);
618620 void gpiochip_free_own_desc(struct gpio_desc *desc);
619621
620622 void 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