parameters: (regmapdir)
return_statement: return regmapdir
docstring: check for a valid regmap directory in debugfs
docstring_summary: check for a valid regmap directory in debugfs
docstring_tokens: check for a valid regmap directory in debugfs
function: def is_regmap_dir(regmapdir):
      """check for a valid regmap directory in debugfs"""
      if not os.path.isdir(regmapdir):
          msg = f"{regmapdir} is not a valid directory"
          raise argparse.ArgumentTypeError(msg)
  
      range_path = os.path.join(regmapdir, 'range')
      if not os.path.isfile(range_path):
          msg = f"{range_path} is not a valid file"
          raise argparse.ArgumentTypeError(msg)
  
      registers_path = os.path.join(regmapdir, 'registers')
      if not os.path.isfile(registers_path):
          msg = f"{registers_path} is not a valid file"
          raise argparse.ArgumentTypeError(msg)
  
      return regmapdir
function_tokens: def is_regmap_dir ( regmapdir ) : if not os . path . isdir ( regmapdir ) : msg = f"{regmapdir} is not a valid directory" raise argparse . ArgumentTypeError ( msg ) range_path = os . path . join ( regmapdir , 'range' ) if not os . path . isfile ( range_path ) : msg = f"{range_path} is not a valid file" raise argparse . ArgumentTypeError ( msg ) registers_path = os . path . join ( regmapdir , 'registers' ) if not os . path . isfile ( registers_path ) : msg = f"{registers_path} is not a valid file" raise argparse . ArgumentTypeError ( msg ) return regmapdir