@ -41,7 +41,12 @@ static int kscan_composite_enable_callback(const struct device *dev) {
for ( int i = 0 ; i < ARRAY_SIZE ( kscan_composite_children ) ; i + + ) {
for ( int i = 0 ; i < ARRAY_SIZE ( kscan_composite_children ) ; i + + ) {
const struct kscan_composite_child_config * cfg = & kscan_composite_children [ i ] ;
const struct kscan_composite_child_config * cfg = & kscan_composite_children [ i ] ;
kscan_enable_callback ( device_get_binding ( cfg - > label ) ) ;
const struct device * dev = device_get_binding ( cfg - > label ) ;
if ( ! dev ) {
LOG_WRN ( " Failed to load child kscan device %s " , log_strdup ( cfg - > label ) ) ;
continue ;
}
kscan_enable_callback ( dev ) ;
}
}
return 0 ;
return 0 ;
}
}
@ -50,7 +55,12 @@ static int kscan_composite_disable_callback(const struct device *dev) {
for ( int i = 0 ; i < ARRAY_SIZE ( kscan_composite_children ) ; i + + ) {
for ( int i = 0 ; i < ARRAY_SIZE ( kscan_composite_children ) ; i + + ) {
const struct kscan_composite_child_config * cfg = & kscan_composite_children [ i ] ;
const struct kscan_composite_child_config * cfg = & kscan_composite_children [ i ] ;
kscan_disable_callback ( device_get_binding ( cfg - > label ) ) ;
const struct device * dev = device_get_binding ( cfg - > label ) ;
if ( ! dev ) {
LOG_WRN ( " Failed to load child kscan device %s " , log_strdup ( cfg - > label ) ) ;
continue ;
}
kscan_disable_callback ( dev ) ;
}
}
return 0 ;
return 0 ;
}
}