1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

Kernel: Re-organize the abstractions around i8042, PS2 and HID concepts

The HIDController class is removed and instead adding SerialIOController
class. The HIDController class was a mistake - there's no such thing in
real hardware as host controller only for human interface devices
(VirtIO PCI input controller being the exception here, but it could be
technically treated as serial IO controller too).

Instead, we simply add a new abstraction layer - the SerialIO "bus",
which will hold all the code that is related to serial communications
with other devices. A PS2 controller is simply a serial IO controller,
and the Intel 8042 Controller is simply a specific implementation of a
PS2 controller.
This commit is contained in:
Liav A 2023-05-12 17:23:02 +03:00 committed by Andrew Kaster
parent a14dc9b569
commit d276cac82c
5 changed files with 37 additions and 34 deletions

View file

@ -155,7 +155,7 @@ UNMAP_AFTER_INIT ErrorOr<void> HIDManagement::enumerate()
return {};
if (auto result_or_error = i8042_controller->detect_devices(); result_or_error.is_error())
return {};
m_hid_controllers.with([&](auto& list) {
m_hid_serial_io_controllers.with([&](auto& list) {
list.append(i8042_controller);
});
#endif