@@ -17,10 +17,13 @@ use kernel::{
1717 ThisModule ,
1818} ;
1919
20+ /// TODO: add documentation
2021pub trait MessageProcessor {
22+ /// TODO: add documentation
2123 fn process ( & self , message : & [ u8 ] ) -> u32 ;
2224}
2325
26+ /// TODO: add documentation
2427pub struct AopSensorData < T : MessageProcessor > {
2528 dev : ARef < device:: Device > ,
2629 ty : u32 ,
@@ -29,7 +32,8 @@ pub struct AopSensorData<T: MessageProcessor> {
2932}
3033
3134impl < T : MessageProcessor > AopSensorData < T > {
32- pub fn new ( dev : platform:: Device , ty : u32 , msg_proc : T ) -> Result < Arc < AopSensorData < T > > > {
35+ /// TODO: add documentation
36+ pub fn new ( dev : ARef < device:: Device > , ty : u32 , msg_proc : T ) -> Result < Arc < AopSensorData < T > > > {
3337 Ok ( Arc :: new (
3438 AopSensorData {
3539 dev,
@@ -80,6 +84,7 @@ struct IIOSpec {
8084 _p : PhantomPinned ,
8185}
8286
87+ /// TODO: add documentation
8388pub struct IIORegistration < T : MessageProcessor + ' static > {
8489 dev : * mut bindings:: iio_dev ,
8590 spec : Pin < KBox < IIOSpec > > ,
@@ -88,6 +93,7 @@ pub struct IIORegistration<T: MessageProcessor + 'static> {
8893}
8994
9095impl < T : MessageProcessor + ' static > IIORegistration < T > {
96+ /// TODO: add documentation
9197 pub fn new (
9298 data : Arc < AopSensorData < T > > ,
9399 name : & ' static CStr ,
0 commit comments