forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/soc/codecs/cs42l51-i2c.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * cs42l56.c -- CS42L51 ALSA SoC I2C audio driver
34 *
45 * Copyright 2014 CirrusLogic, Inc.
56 *
67 * Author: Brian Austin <brian.austin@cirrus.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
11
- *
128 */
139
1410 #include <linux/i2c.h>
....@@ -29,18 +25,27 @@
2925 struct regmap_config config;
3026
3127 config = cs42l51_regmap;
32
- config.val_bits = 8;
33
- config.reg_bits = 8;
3428
3529 return cs42l51_probe(&i2c->dev, devm_regmap_init_i2c(i2c, &config));
3630 }
31
+
32
+static int cs42l51_i2c_remove(struct i2c_client *i2c)
33
+{
34
+ return cs42l51_remove(&i2c->dev);
35
+}
36
+
37
+static const struct dev_pm_ops cs42l51_pm_ops = {
38
+ SET_SYSTEM_SLEEP_PM_OPS(cs42l51_suspend, cs42l51_resume)
39
+};
3740
3841 static struct i2c_driver cs42l51_i2c_driver = {
3942 .driver = {
4043 .name = "cs42l51",
4144 .of_match_table = cs42l51_of_match,
45
+ .pm = &cs42l51_pm_ops,
4246 },
4347 .probe = cs42l51_i2c_probe,
48
+ .remove = cs42l51_i2c_remove,
4449 .id_table = cs42l51_i2c_id,
4550 };
4651