1 // SPDX-License-Identifier: GPL-2.0
3 * Analog Devices LTC2947 high precision power and energy monitor over I2C
5 * Copyright 2019 Analog Devices Inc.
8 #include <linux/module.h>
9 #include <linux/regmap.h>
13 static const struct regmap_config ltc2947_regmap_config = {
18 static int ltc2947_probe(struct i2c_client *i2c)
22 map = devm_regmap_init_i2c(i2c, <c2947_regmap_config);
26 return ltc2947_core_probe(map, i2c->name);
29 static const struct i2c_device_id ltc2947_id[] = {
33 MODULE_DEVICE_TABLE(i2c, ltc2947_id);
35 static struct i2c_driver ltc2947_driver = {
38 .of_match_table = ltc2947_of_match,
39 .pm = <c2947_pm_ops,
41 .probe_new = ltc2947_probe,
42 .id_table = ltc2947_id,
44 module_i2c_driver(ltc2947_driver);
46 MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>");
47 MODULE_DESCRIPTION("LTC2947 I2C power and energy monitor driver");
48 MODULE_LICENSE("GPL");