Lines Matching refs:tps

66 	struct tps65086 *tps;  in tps65086_probe()  local
70 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps65086_probe()
71 if (!tps) in tps65086_probe()
74 i2c_set_clientdata(client, tps); in tps65086_probe()
75 tps->dev = &client->dev; in tps65086_probe()
76 tps->irq = client->irq; in tps65086_probe()
78 tps->regmap = devm_regmap_init_i2c(client, &tps65086_regmap_config); in tps65086_probe()
79 if (IS_ERR(tps->regmap)) { in tps65086_probe()
80 dev_err(tps->dev, "Failed to initialize register map\n"); in tps65086_probe()
81 return PTR_ERR(tps->regmap); in tps65086_probe()
84 ret = regmap_read(tps->regmap, TPS65086_DEVICEID, &version); in tps65086_probe()
86 dev_err(tps->dev, "Failed to read revision register\n"); in tps65086_probe()
90 dev_info(tps->dev, "Device: TPS65086%01lX, OTP: %c, Rev: %ld\n", in tps65086_probe()
95 if (tps->irq > 0) { in tps65086_probe()
96 ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0, in tps65086_probe()
97 &tps65086_irq_chip, &tps->irq_data); in tps65086_probe()
99 dev_err(tps->dev, "Failed to register IRQ chip\n"); in tps65086_probe()
104 ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65086_cells, in tps65086_probe()
106 regmap_irq_get_domain(tps->irq_data)); in tps65086_probe()
107 if (ret && tps->irq > 0) in tps65086_probe()
108 regmap_del_irq_chip(tps->irq, tps->irq_data); in tps65086_probe()
115 struct tps65086 *tps = i2c_get_clientdata(client); in tps65086_remove() local
117 if (tps->irq > 0) in tps65086_remove()
118 regmap_del_irq_chip(tps->irq, tps->irq_data); in tps65086_remove()