mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
gpio: create an API to detect open drain/source on lines
My left hand merges code to privatize the descriptor handling while my right hand merges drivers that poke around and disrespect with the same gpiolib internals. So let's expose the proper APIs for drivers to ask the gpiolib core if a line is marked as open drain or open source and get some order around things so this driver compiles again. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Nicolas Saenz Julienne <nicolassaenzj@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d6f434e858
commit
143b65d677
3 changed files with 26 additions and 5 deletions
|
@ -199,6 +199,10 @@ int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset);
|
|||
void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
|
||||
bool gpiochip_line_is_irq(struct gpio_chip *chip, unsigned int offset);
|
||||
|
||||
/* Line status inquiry for drivers */
|
||||
bool gpiochip_line_is_open_drain(struct gpio_chip *chip, unsigned int offset);
|
||||
bool gpiochip_line_is_open_source(struct gpio_chip *chip, unsigned int offset);
|
||||
|
||||
/* get driver data */
|
||||
void *gpiochip_get_data(struct gpio_chip *chip);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue