diff --git a/Kernel/Bus/USB/Drivers/USBDriver.h b/Kernel/Bus/USB/Drivers/USBDriver.h new file mode 100644 index 0000000000..858d795784 --- /dev/null +++ b/Kernel/Bus/USB/Drivers/USBDriver.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2023, Jesse Buhagiar + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include +#include +#include + +namespace Kernel::USB { + +class Device; +struct USBDeviceDescriptor; +class USBInterface; + +class Driver : public AtomicRefCounted { +public: + Driver(StringView name) + : m_driver_name(name) + { + } + + virtual ~Driver() = default; + + virtual ErrorOr probe(USB::Device&) = 0; + virtual void detach(USB::Device&) = 0; + StringView name() const { return m_driver_name; } + +protected: + StringView const m_driver_name; +}; +}