blob: 5a1e972b75d257110508d1b21685bb805c7818b2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// SPDX-License-Identifier: GPL-2.0
//! Rust platform device driver sample.
use kernel::{module_platform_driver, of, platform, prelude::*};
module_platform_driver! {
type: Driver,
name: "rust_platform",
license: "GPL",
}
struct Driver;
impl platform::Driver for Driver {
kernel::define_of_id_table! {(), [
(of::DeviceId::Compatible(b"rust,sample"), None),
]}
fn probe(_dev: &mut platform::Device, _id_info: Option<&Self::IdInfo>) -> Result {
Ok(())
}
}
|