pcm3168a-i2c.c (75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37) pcm3168a-i2c.c (7f7d7214bb5208454aa4ce13780de326402e89c3)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * PCM3168A codec i2c driver
4 *
5 * Copyright (C) 2015 Imagination Technologies Ltd.
6 *
7 * Author: Damien Horsley <Damien.Horsley@imgtec.com>
8 */
9
10#include <linux/i2c.h>
11#include <linux/init.h>
12#include <linux/module.h>
13
14#include <sound/soc.h>
15
16#include "pcm3168a.h"
17
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * PCM3168A codec i2c driver
4 *
5 * Copyright (C) 2015 Imagination Technologies Ltd.
6 *
7 * Author: Damien Horsley <Damien.Horsley@imgtec.com>
8 */
9
10#include <linux/i2c.h>
11#include <linux/init.h>
12#include <linux/module.h>
13
14#include <sound/soc.h>
15
16#include "pcm3168a.h"
17
18static int pcm3168a_i2c_probe(struct i2c_client *i2c,
19 const struct i2c_device_id *id)
18static int pcm3168a_i2c_probe(struct i2c_client *i2c)
20{
21 struct regmap *regmap;
22
23 regmap = devm_regmap_init_i2c(i2c, &pcm3168a_regmap);
24 if (IS_ERR(regmap))
25 return PTR_ERR(regmap);
26
27 return pcm3168a_probe(&i2c->dev, regmap);

--- 14 unchanged lines hidden (view full) ---

42
43static const struct of_device_id pcm3168a_of_match[] = {
44 { .compatible = "ti,pcm3168a", },
45 { }
46};
47MODULE_DEVICE_TABLE(of, pcm3168a_of_match);
48
49static struct i2c_driver pcm3168a_i2c_driver = {
19{
20 struct regmap *regmap;
21
22 regmap = devm_regmap_init_i2c(i2c, &pcm3168a_regmap);
23 if (IS_ERR(regmap))
24 return PTR_ERR(regmap);
25
26 return pcm3168a_probe(&i2c->dev, regmap);

--- 14 unchanged lines hidden (view full) ---

41
42static const struct of_device_id pcm3168a_of_match[] = {
43 { .compatible = "ti,pcm3168a", },
44 { }
45};
46MODULE_DEVICE_TABLE(of, pcm3168a_of_match);
47
48static struct i2c_driver pcm3168a_i2c_driver = {
50 .probe = pcm3168a_i2c_probe,
49 .probe_new = pcm3168a_i2c_probe,
51 .remove = pcm3168a_i2c_remove,
52 .id_table = pcm3168a_i2c_id,
53 .driver = {
54 .name = "pcm3168a",
55 .of_match_table = pcm3168a_of_match,
56 .pm = &pcm3168a_pm_ops,
57 },
58};
59module_i2c_driver(pcm3168a_i2c_driver);
60
61MODULE_DESCRIPTION("PCM3168A I2C codec driver");
62MODULE_AUTHOR("Damien Horsley <Damien.Horsley@imgtec.com>");
63MODULE_LICENSE("GPL v2");
50 .remove = pcm3168a_i2c_remove,
51 .id_table = pcm3168a_i2c_id,
52 .driver = {
53 .name = "pcm3168a",
54 .of_match_table = pcm3168a_of_match,
55 .pm = &pcm3168a_pm_ops,
56 },
57};
58module_i2c_driver(pcm3168a_i2c_driver);
59
60MODULE_DESCRIPTION("PCM3168A I2C codec driver");
61MODULE_AUTHOR("Damien Horsley <Damien.Horsley@imgtec.com>");
62MODULE_LICENSE("GPL v2");