@ -771,6 +771,17 @@ def dt_compat_enabled(kconf, _, compat):
return " y " if compat in edt . compat2okay else " n "
return " y " if compat in edt . compat2okay else " n "
def dt_compat_enabled_num ( kconf , _ , compat ) :
"""
This function takes a ' compat ' and the returns number of status " okay "
compatible nodes in the EDT .
"""
if doc_mode or edt is None :
return " 0 "
return str ( len ( edt . compat2okay [ compat ] ) )
def dt_compat_on_bus ( kconf , _ , compat , bus ) :
def dt_compat_on_bus ( kconf , _ , compat , bus ) :
"""
"""
This function takes a ' compat ' and returns " y " if we find an enabled
This function takes a ' compat ' and returns " y " if we find an enabled
@ -1074,6 +1085,7 @@ def inc_dec(kconf, name, *args):
functions = {
functions = {
" dt_has_compat " : ( dt_has_compat , 1 , 1 ) ,
" dt_has_compat " : ( dt_has_compat , 1 , 1 ) ,
" dt_compat_enabled " : ( dt_compat_enabled , 1 , 1 ) ,
" dt_compat_enabled " : ( dt_compat_enabled , 1 , 1 ) ,
" dt_compat_enabled_num " : ( dt_compat_enabled_num , 1 , 1 ) ,
" dt_compat_on_bus " : ( dt_compat_on_bus , 2 , 2 ) ,
" dt_compat_on_bus " : ( dt_compat_on_bus , 2 , 2 ) ,
" dt_compat_any_has_prop " : ( dt_compat_any_has_prop , 2 , 3 ) ,
" dt_compat_any_has_prop " : ( dt_compat_any_has_prop , 2 , 3 ) ,
" dt_compat_any_not_has_prop " : ( dt_compat_any_not_has_prop , 2 , 2 ) ,
" dt_compat_any_not_has_prop " : ( dt_compat_any_not_has_prop , 2 , 2 ) ,