How to control gpio value in device driver??

Hi,

I already know how to control gpio value using sysfs following method.

$sudo su
$cd /sys/class/gpio
$echo 388 > export
$cd gpio388
$cat direction
in
$echo out > direction
$cat direction
out

But, i want to change gpio value in my interrupt handler (i developed device driver) to check interrupt period using oscilloscope.

#question 1 - can i control UART0_CTS (#36) in device driver using gpio_set_value?

I checked belows articles, and i want to control UART0_CTS (#36) in my interrupt handler.
http://www.jetsonhacks.com/nvidia-jetson-tx2-j21-header-pinout/

#question 2 - if it is possible, plz let me know how to control gpio value in device driver.

Thanks,
Doohan93

hello doohan93,

please download the module pinmux spreadsheet first to know the usage about the UART0_CTS.
you can control the gpio value by gpio_set_value(gpio, val) in the device driver.
thanks