| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * cs42l56.c -- CS42L51 ALSA SoC I2C audio driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright 2014 CirrusLogic, Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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 | | - * |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #include <linux/i2c.h> |
|---|
| .. | .. |
|---|
| 29 | 25 | struct regmap_config config; |
|---|
| 30 | 26 | |
|---|
| 31 | 27 | config = cs42l51_regmap; |
|---|
| 32 | | - config.val_bits = 8; |
|---|
| 33 | | - config.reg_bits = 8; |
|---|
| 34 | 28 | |
|---|
| 35 | 29 | return cs42l51_probe(&i2c->dev, devm_regmap_init_i2c(i2c, &config)); |
|---|
| 36 | 30 | } |
|---|
| 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 | +}; |
|---|
| 37 | 40 | |
|---|
| 38 | 41 | static struct i2c_driver cs42l51_i2c_driver = { |
|---|
| 39 | 42 | .driver = { |
|---|
| 40 | 43 | .name = "cs42l51", |
|---|
| 41 | 44 | .of_match_table = cs42l51_of_match, |
|---|
| 45 | + .pm = &cs42l51_pm_ops, |
|---|
| 42 | 46 | }, |
|---|
| 43 | 47 | .probe = cs42l51_i2c_probe, |
|---|
| 48 | + .remove = cs42l51_i2c_remove, |
|---|
| 44 | 49 | .id_table = cs42l51_i2c_id, |
|---|
| 45 | 50 | }; |
|---|
| 46 | 51 | |
|---|