hello, everybody,
For realtime purpose, I need operation gpio in linux kernel mode driver, but I don't know how to do this
I found user mode code(csl_usrgpio.c), kernel code(csl_gpioopenclose.c, csl_gpiocommon.c,csl_gpiohwcontrol.c), yet another related file dm_gio_util.c(it use file operation on /proc/gio/gioxx, not the csl_gpioxxx()), and strangely SetGIOOutEnale() function seems doesn't control gio, but just save a config info file. I am confused by these, where is it config pinmux and gio enable? I see drv_vpssInit() called csl_gpioSetPinmux only(just for vpss pinmux), and csl_sysInit call csl_gpioOpen(not open file /proc/gio/).
can I control defferent gpio pin in user mode and kernel mode simulatly? Must I use the same gpio handle in kernel and user mode? If I must open and close immediately the gpio when every time I set/clr/enable/disable it? I worry about some conflict there.
I hope someone can get help.