summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l51-i2c.c
diff options
context:
space:
mode:
authorOlivier Moysan <olivier.moysan@st.com>2019-04-03 15:23:36 +0200
committerMark Brown <broonie@kernel.org>2019-04-04 15:56:08 +0200
commit75a714823e89ceeb168092b4c4d0a3f52b415461 (patch)
tree0e1ff30f6800146e29ededd470b3d3c4ea62570e /sound/soc/codecs/cs42l51-i2c.c
parentASoC: cs42l51: add support of master mode (diff)
downloadlinux-75a714823e89ceeb168092b4c4d0a3f52b415461.tar.xz
linux-75a714823e89ceeb168092b4c4d0a3f52b415461.zip
ASoC: cs42l51: add power management
Add sleep PM callbacks to support system low power modes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l51-i2c.c')
-rw-r--r--sound/soc/codecs/cs42l51-i2c.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c
index 8333dbf18ea2..116221e581ce 100644
--- a/sound/soc/codecs/cs42l51-i2c.c
+++ b/sound/soc/codecs/cs42l51-i2c.c
@@ -29,8 +29,6 @@ static int cs42l51_i2c_probe(struct i2c_client *i2c,
struct regmap_config config;
config = cs42l51_regmap;
- config.val_bits = 8;
- config.reg_bits = 8;
return cs42l51_probe(&i2c->dev, devm_regmap_init_i2c(i2c, &config));
}
@@ -40,10 +38,15 @@ static int cs42l51_i2c_remove(struct i2c_client *i2c)
return cs42l51_remove(&i2c->dev);
}
+static const struct dev_pm_ops cs42l51_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume)
+};
+
static struct i2c_driver cs42l51_i2c_driver = {
.driver = {
.name = "cs42l51",
.of_match_table = cs42l51_of_match,
+ .pm = &cs42l51_pm_ops,
},
.probe = cs42l51_i2c_probe,
.remove = cs42l51_i2c_remove,