aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2019-08-06 13:41:51 +0200
committerLinus Walleij <[email protected]>2019-08-14 10:57:18 +0200
commit2c60e6b5c9241b24b8b523fefd3e44fb85622cda (patch)
treee0e98cde759d582b45ebd0f331edcf46eda3a1e4 /tools/perf/util/trace-event-scripting.c
parentd45331b00ddb179e291766617259261c112db872 (diff)
gpiolib: never report open-drain/source lines as 'input' to user-space
If the driver doesn't support open-drain/source config options, we emulate this behavior when setting the direction by calling gpiod_direction_input() if the default value is 0 (open-source) or 1 (open-drain), thus not actively driving the line in those cases. This however clears the FLAG_IS_OUT bit for the GPIO line descriptor and makes the LINEINFO ioctl() incorrectly report this line's mode as 'input' to user-space. This commit modifies the ioctl() to always set the GPIOLINE_FLAG_IS_OUT bit in the lineinfo structure's flags field. Since it's impossible to use the input mode and open-drain/source options at the same time, we can be sure the reported information will be correct. Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information") Cc: stable <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions