How to control gpio value in device driver??


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
$echo out > direction
$cat direction

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.

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


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.