File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use crate::{
99 device:: RawDevice ,
1010 driver:: { self , RawDeviceId } ,
1111 error:: { from_result, to_result, Result } ,
12+ of,
1213 str:: { BStr , CStr } ,
1314 types:: ForeignOwnable ,
1415 ThisModule ,
@@ -106,6 +107,9 @@ impl<T: Driver> driver::DriverOps for Adapter<T> {
106107 if let Some ( t) = T :: I2C_DEVICE_ID_TABLE {
107108 i2cdrv. id_table = t. as_ref ( ) ;
108109 }
110+ if let Some ( t) = T :: OF_DEVICE_ID_TABLE {
111+ i2cdrv. driver . of_match_table = t. as_ref ( ) ;
112+ }
109113
110114 // SAFETY:
111115 // - `pdrv` lives at least until the call to `platform_driver_unregister()` returns.
@@ -169,6 +173,9 @@ pub trait Driver {
169173 /// The table of device ids supported by the driver.
170174 const I2C_DEVICE_ID_TABLE : Option < driver:: IdTable < ' static , DeviceId , Self :: IdInfo > > = None ;
171175
176+ /// The table of device ids supported by the driver.
177+ const OF_DEVICE_ID_TABLE : Option < driver:: IdTable < ' static , of:: DeviceId , Self :: IdInfo > > = None ;
178+
172179 /// I2C driver probe.
173180 ///
174181 /// Called when a new i2c client is added or discovered.
You can’t perform that action at this time.
0 commit comments