diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-06-16 08:53:11 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-07-10 11:39:37 +0100 |
commit | 7b47ab47b3938e2274834dbde7915df98fc74368 (patch) | |
tree | c2e7dd1f58aee247cfb3bf6058d160cd98c4d2b8 /sound/soc/sh/rcar/gen.c | |
parent | d1b080290f86d134b97bfe63e499ab9ed3935a02 (diff) | |
download | linux-stable-7b47ab47b3938e2274834dbde7915df98fc74368.tar.gz linux-stable-7b47ab47b3938e2274834dbde7915df98fc74368.tar.bz2 linux-stable-7b47ab47b3938e2274834dbde7915df98fc74368.zip |
ASoC: rsnd: gen: add rsnd_force_write()
rsnd_force_write() is similar to rsnd_write(),
but rsnd_force_write() write data to register even though
it is same value.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/gen.c')
-rw-r--r-- | sound/soc/sh/rcar/gen.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c index 8c7dc51b1c4f..48f704b1d80e 100644 --- a/sound/soc/sh/rcar/gen.c +++ b/sound/soc/sh/rcar/gen.c @@ -103,6 +103,22 @@ void rsnd_write(struct rsnd_priv *priv, regmap_fields_write(gen->regs[reg], rsnd_mod_id(mod), data); } +void rsnd_force_write(struct rsnd_priv *priv, + struct rsnd_mod *mod, + enum rsnd_reg reg, u32 data) +{ + struct device *dev = rsnd_priv_to_dev(priv); + struct rsnd_gen *gen = rsnd_priv_to_gen(priv); + + if (!rsnd_is_accessible_reg(priv, gen, reg)) + return; + + dev_dbg(dev, "w %s[%d] - %4d : %08x\n", + rsnd_mod_name(mod), rsnd_mod_id(mod), reg, data); + + regmap_fields_force_write(gen->regs[reg], rsnd_mod_id(mod), data); +} + void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg, u32 mask, u32 data) { |