def METHOD_NAME(regmap_dir):
    """Returns an initialized regmap object"""
    try:
        regm.is_regmap_dir(regmap_dir)
    except argparse.ArgumentTypeError:
        sys.stderr.write(
            'Regmap not found, path name: {}. Root privileges required.\n'.
            format(regmap_dir))
        raise SystemExit(os.EX_UNAVAILABLE)
    regmap = regm.RegmapDebugfs(regmap_dir)
    regmap.get_range_info()
    regmap.get_register_info()
    return regmap