DM: add deinit function for ps2kbd and ps2mouse

Add deinit function for ps2kbd and ps2mouse.

To support deinit function for ps2kbd and ps2mouse which
has struct atkbdc_base as parameter, we make struct
atkbdc_base exported as public.

We also add console unregister function for keyboard
and mouse. Which are called in ps2mouse/ps2kbd deinit
function.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Yin Fengwei
2018-03-30 13:30:43 +08:00
committed by Jack Ren
parent f0b74016d1
commit f6db755c7f
8 changed files with 121 additions and 83 deletions

View File

@@ -24,6 +24,7 @@
* SUCH DAMAGE.
*/
#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -91,6 +92,14 @@ console_kbd_register(kbd_event_func_t event_cb, void *arg, int pri)
}
}
void
console_kbd_unregister(void)
{
console.kbd_event_cb = NULL;
console.kbd_arg = NULL;
console.kbd_priority = 0;
}
void
console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri)
{
@@ -101,6 +110,14 @@ console_ptr_register(ptr_event_func_t event_cb, void *arg, int pri)
}
}
void
console_ptr_unregister()
{
console.ptr_event_cb = NULL;
console.ptr_arg = NULL;
console.ptr_priority = 0;
}
void
console_key_event(int down, uint32_t keysym)
{