Lines Matching full:max77686
3 // max77686.c - mfd core driver for the Maxim 77686/802
19 #include <linux/mfd/max77686.h>
20 #include <linux/mfd/max77686-private.h>
26 { .name = "max77686-pmic", },
27 { .name = "max77686-rtc", },
28 { .name = "max77686-clk", },
131 .name = "max77686-pmic",
150 .compatible = "maxim,max77686",
163 struct max77686_dev *max77686 = NULL; in max77686_i2c_probe() local
171 max77686 = devm_kzalloc(&i2c->dev, in max77686_i2c_probe()
173 if (!max77686) in max77686_i2c_probe()
176 i2c_set_clientdata(i2c, max77686); in max77686_i2c_probe()
177 max77686->type = (unsigned long)of_device_get_match_data(&i2c->dev); in max77686_i2c_probe()
178 max77686->dev = &i2c->dev; in max77686_i2c_probe()
179 max77686->i2c = i2c; in max77686_i2c_probe()
181 max77686->irq = i2c->irq; in max77686_i2c_probe()
183 if (max77686->type == TYPE_MAX77686) { in max77686_i2c_probe()
195 max77686->regmap = devm_regmap_init_i2c(i2c, config); in max77686_i2c_probe()
196 if (IS_ERR(max77686->regmap)) { in max77686_i2c_probe()
197 ret = PTR_ERR(max77686->regmap); in max77686_i2c_probe()
198 dev_err(max77686->dev, "Failed to allocate register map: %d\n", in max77686_i2c_probe()
203 ret = regmap_read(max77686->regmap, MAX77686_REG_DEVICE_ID, &data); in max77686_i2c_probe()
205 dev_err(max77686->dev, in max77686_i2c_probe()
210 ret = devm_regmap_add_irq_chip(&i2c->dev, max77686->regmap, in max77686_i2c_probe()
211 max77686->irq, in max77686_i2c_probe()
214 &max77686->irq_data); in max77686_i2c_probe()
220 ret = devm_mfd_add_devices(max77686->dev, -1, cells, n_devs, NULL, in max77686_i2c_probe()
234 struct max77686_dev *max77686 = i2c_get_clientdata(i2c); in max77686_suspend() local
237 enable_irq_wake(max77686->irq); in max77686_suspend()
248 disable_irq(max77686->irq); in max77686_suspend()
256 struct max77686_dev *max77686 = i2c_get_clientdata(i2c); in max77686_resume() local
259 disable_irq_wake(max77686->irq); in max77686_resume()
261 enable_irq(max77686->irq); in max77686_resume()
271 .name = "max77686",