Gpio multiplexing status

I want to know how to check the function configuration corresponding to gpio, and what functional status each gpio is reused into?

You can use the command: cat /sys/kernel/debug/gpio to check the status of gpio. Or use the command: cat /sys/kernel/debug/pinctrl/pinctrl-rockchip-pinctrl/pinmux-pins to view all gpio information

So how do I control the output value of gpio? My usage scenario is to control the gpio52 pin to output high level

  1. echo 52 > /sys/class/gpio/export // Apply to export the corresponding gpio
  2. echo out > /sys/class/gpio/gpio52/direction //Set the corresponding gpio as the output direction
  3. echo 1 > /sys/class/gpio/gpio52/value // Set output high level
  4. cat /sys/class/gpio/gpio52/value // Get the current status value of gpio
  5. echo 52 > /sys/class/gpio/unexport //Release the requested gpio