Lines Matching +full:i2c +full:- +full:compatible

1 // SPDX-License-Identifier: GPL-2.0-only
3 * I2C driver for the X-Powers' Power Management ICs
5 * AXP20x typically comprises an adaptive USB-Compatible PWM charger, BUCK DC-DC
6 * converters, LDOs, multiple 12-bit ADCs of voltage, current and temperature
9 * This driver supports the I2C variants.
18 #include <linux/i2c.h>
25 static int axp20x_i2c_probe(struct i2c_client *i2c, in axp20x_i2c_probe() argument
31 axp20x = devm_kzalloc(&i2c->dev, sizeof(*axp20x), GFP_KERNEL); in axp20x_i2c_probe()
33 return -ENOMEM; in axp20x_i2c_probe()
35 axp20x->dev = &i2c->dev; in axp20x_i2c_probe()
36 axp20x->irq = i2c->irq; in axp20x_i2c_probe()
37 dev_set_drvdata(axp20x->dev, axp20x); in axp20x_i2c_probe()
43 axp20x->regmap = devm_regmap_init_i2c(i2c, axp20x->regmap_cfg); in axp20x_i2c_probe()
44 if (IS_ERR(axp20x->regmap)) { in axp20x_i2c_probe()
45 ret = PTR_ERR(axp20x->regmap); in axp20x_i2c_probe()
46 dev_err(&i2c->dev, "regmap init failed: %d\n", ret); in axp20x_i2c_probe()
53 static int axp20x_i2c_remove(struct i2c_client *i2c) in axp20x_i2c_remove() argument
55 struct axp20x_dev *axp20x = i2c_get_clientdata(i2c); in axp20x_i2c_remove()
61 { .compatible = "x-powers,axp152", .data = (void *)AXP152_ID },
62 { .compatible = "x-powers,axp202", .data = (void *)AXP202_ID },
63 { .compatible = "x-powers,axp209", .data = (void *)AXP209_ID },
64 { .compatible = "x-powers,axp221", .data = (void *)AXP221_ID },
65 { .compatible = "x-powers,axp223", .data = (void *)AXP223_ID },
66 { .compatible = "x-powers,axp803", .data = (void *)AXP803_ID },
67 { .compatible = "x-powers,axp806", .data = (void *)AXP806_ID },
82 MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);
97 .name = "axp20x-i2c",
108 MODULE_DESCRIPTION("PMIC MFD I2C driver for AXP20X");