Hi
I have a board, where power management is implemented with a serially
(UART) connected AVR processor. Its functions roughly are the following:
1) on startup you have to send a sequence (A) to it to switch the watchdog
off
2) to reboot you have to send a sequence (B)
3) to switch power off you have to send a sequence (C)
4) when the power button is pressed and released it sends you sequences
(D) and (E)
5) for reset button it sends (F) and (G)
Until now it was done (almost) exclusively from user-space. I don't quite
like this approach because
1) you cannot run a generic distribution on this platform
2) sysrq-b doesn't work
So, I'd like to implement it in kernel. And here I have a problem to chose
the right APIs. Hence my questions:
1) I haven't found any kernel API to talk to a tty, is there one or how
would one do it?
2) What should this driver look like? Should it be implemented as an apmd
(emulation) or just a hacked together platform-specific driver?
Thanks
Guennadi
---------------------------------
Guennadi Liakhovetski, Ph.D.
DSA Daten- und Systemtechnik GmbH
Pascalstr. 28
D-52076 Aachen
Germany
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/