| // SPDX-License-Identifier: GPL-2.0 |
| * Analog Devices LTC2947 high precision power and energy monitor over I2C |
| * Copyright 2019 Analog Devices Inc. |
| #include <linux/module.h> |
| #include <linux/regmap.h> |
| static const struct regmap_config ltc2947_regmap_config = { |
| static int ltc2947_probe(struct i2c_client *i2c) |
| map = devm_regmap_init_i2c(i2c, <c2947_regmap_config); |
| return ltc2947_core_probe(map, i2c->name); |
| static const struct i2c_device_id ltc2947_id[] = { |
| MODULE_DEVICE_TABLE(i2c, ltc2947_id); |
| static struct i2c_driver ltc2947_driver = { |
| .of_match_table = ltc2947_of_match, |
| .pm = pm_sleep_ptr(<c2947_pm_ops), |
| module_i2c_driver(ltc2947_driver); |
| MODULE_AUTHOR("Nuno Sa <nuno.sa@analog.com>"); |
| MODULE_DESCRIPTION("LTC2947 I2C power and energy monitor driver"); |