Lines Matching +full:tps65090 +full:- +full:charger

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Core driver for TI TPS65090 PMIC family
18 #include <linux/mfd/tps65090.h>
50 CHARGER = 1, enumerator
55 .name = "tps65090-pmic",
57 [CHARGER] = {
58 .name = "tps65090-charger",
61 .of_compatible = "ti,tps65090-charger",
124 .name = "tps65090",
160 { .compatible = "ti,tps65090",},
167 struct tps65090_platform_data *pdata = dev_get_platdata(&client->dev); in tps65090_i2c_probe()
169 struct tps65090 *tps65090; in tps65090_i2c_probe() local
172 if (!pdata && !client->dev.of_node) { in tps65090_i2c_probe()
173 dev_err(&client->dev, in tps65090_i2c_probe()
174 "tps65090 requires platform data or of_node\n"); in tps65090_i2c_probe()
175 return -EINVAL; in tps65090_i2c_probe()
179 irq_base = pdata->irq_base; in tps65090_i2c_probe()
181 tps65090 = devm_kzalloc(&client->dev, sizeof(*tps65090), GFP_KERNEL); in tps65090_i2c_probe()
182 if (!tps65090) in tps65090_i2c_probe()
183 return -ENOMEM; in tps65090_i2c_probe()
185 tps65090->dev = &client->dev; in tps65090_i2c_probe()
186 i2c_set_clientdata(client, tps65090); in tps65090_i2c_probe()
188 tps65090->rmap = devm_regmap_init_i2c(client, &tps65090_regmap_config); in tps65090_i2c_probe()
189 if (IS_ERR(tps65090->rmap)) { in tps65090_i2c_probe()
190 ret = PTR_ERR(tps65090->rmap); in tps65090_i2c_probe()
191 dev_err(&client->dev, "regmap_init failed with err: %d\n", ret); in tps65090_i2c_probe()
195 if (client->irq) { in tps65090_i2c_probe()
196 ret = regmap_add_irq_chip(tps65090->rmap, client->irq, in tps65090_i2c_probe()
198 &tps65090_irq_chip, &tps65090->irq_data); in tps65090_i2c_probe()
200 dev_err(&client->dev, in tps65090_i2c_probe()
206 tps65090s[CHARGER].num_resources = 0; in tps65090_i2c_probe()
209 ret = mfd_add_devices(tps65090->dev, -1, tps65090s, in tps65090_i2c_probe()
211 0, regmap_irq_get_domain(tps65090->irq_data)); in tps65090_i2c_probe()
213 dev_err(&client->dev, "add mfd devices failed with err: %d\n", in tps65090_i2c_probe()
221 if (client->irq) in tps65090_i2c_probe()
222 regmap_del_irq_chip(client->irq, tps65090->irq_data); in tps65090_i2c_probe()
228 { "tps65090" },
234 .name = "tps65090",