I would like to know proper way to change the GPIO from input to output (or vice versa) and apply the modified pinmux configuration for a custom board, please ? For example, I would like to re-configure the following GPIO02 from input to output as the power control pin for a MIPI-CSI2 camera sensor module :
Thanks for the link. By the way, I would like to know if this (changing the GPIO direction from input to output, output to input as interruption) could be achieved by only modifying the device-tree without customizing the pinmux configuration, please ?
NO.
Pinmux setting is specified in different files from the kernel device tree.
We also don’t encourage directly modifying the dtsi files, and please only do this by interacting with the spreadsheet.