aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-09-22 14:55:54 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2022-08-10 17:22:31 +0000
commit87f642ac03e3cefea7048cb46b17810d01e97dd5 (patch)
treef952d1653b2a06ebd65bb242e2a3c6d3f1e29b82 /sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h
parentabc7a4a0c1b0ecfd44fd7e0a9d47d6cd4eed1362 (diff)
downloadsrc-main.tar.gz
src-main.zip
arm64: rockchip: rk_gpio: Improve mode switchingHEADmain
Changing mode on a pin (input/output/pullup/pulldown) is a bit slow. Improve this by caching what we can. We need to check if the pin is in gpio mode, do that the first time that we have a request for this pin and cache the result. We can't do that at attach as we are a child of rk_pinctrl and it didn't finished its attach then. Cache also the flags specific to the pinctrl (pullup or pulldown) if the pin is in input mode. Cache the registers that deals with input/output mode and output value. Also remove some register reads when we change the direction of a pin or when we change the output value since the bit changed in the registers only affect output pins.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h')
0 files changed, 0 insertions, 0 deletions