参照元

説明

引数

返り値

参考

実装

CONFIG_REGMAP 有効: drivers/base/regmap/regmap.c

/**
 * regmap_read(): Read a value from a single register
 *
 * @map: Register map to read from
 * @reg: Register to be read from
 * @val: Pointer to store read value
 *
 * A value of zero will be returned on success, a negative errno will
 * be returned in error cases.
 */
int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val)
{
        int ret;

        if (reg % map->reg_stride)
                return -EINVAL;

        map->lock(map->lock_arg);

        ret = _regmap_read(map, reg, val);
        map->unlock(map->lock_arg);

        return ret;
}
EXPORT_SYMBOL_GPL(regmap_read);

CONFIG_REGMAP 無効: include/linux/regmap.h

static inline int regmap_read(struct regmap *map, unsigned int reg,
                              unsigned int *val)
{
        WARN_ONCE(1, "regmap API is disabled");
        return -EINVAL;
}

コメント


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS