Merge tag 'gpio-v5.5-rc2-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.5-rc2 - fix gpio-xtensa build failure - fix a regression in gpio-mockup - fix a gcc warning in gpio-aspeed - fix a section mismatch problem in xgs-iproc - fix a problem with emulated open-drain outputs in gpiolib core - switch to bitops in gpio-pca953x after converting the driver to using bitmap - add a missed file to MAINTAINERS entry
This commit is contained in:
@@ -220,6 +220,14 @@ int gpiod_get_direction(struct gpio_desc *desc)
|
||||
chip = gpiod_to_chip(desc);
|
||||
offset = gpio_chip_hwgpio(desc);
|
||||
|
||||
/*
|
||||
* Open drain emulation using input mode may incorrectly report
|
||||
* input here, fix that up.
|
||||
*/
|
||||
if (test_bit(FLAG_OPEN_DRAIN, &desc->flags) &&
|
||||
test_bit(FLAG_IS_OUT, &desc->flags))
|
||||
return 0;
|
||||
|
||||
if (!chip->get_direction)
|
||||
return -ENOTSUPP;
|
||||
|
||||
|
Reference in New Issue
Block a user