参照元

説明

引数

返り値

参考

実装

/**
 * snd_soc_component_update_bits() - Perform read/modify/write cycle
 * @component: Component to update
 * @reg: Register to update
 * @mask: Mask that specifies which bits to update
 * @val: New value for the bits specified by mask
 *
 * Return: 1 if the operation was successful and the value of the register
 * changed, 0 if the operation was successful, but the value did not change.
 * Returns a negative error code otherwise.
 */
int snd_soc_component_update_bits(struct snd_soc_component *component,
        unsigned int reg, unsigned int mask, unsigned int val)
{
        bool change;
        int ret;

        if (component->regmap)
                ret = regmap_update_bits_check(component->regmap, reg, mask,
                        val, &change);
        else
                ret = snd_soc_component_update_bits_legacy(component, reg,
                        mask, val, &change);
        if (ret < 0)
                return ret;
        return change;
}
EXPORT_SYMBOL_GPL(snd_soc_component_update_bits);

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-06-08 (水) 16:29:54