Lines Matching full:adp5585
3 * Analog Devices ADP5585 I/O expander, PWM controller and keypad controller
13 #include <linux/mfd/adp5585.h>
21 { .name = "adp5585-gpio", },
22 { .name = "adp5585-pwm", },
116 struct adp5585_dev *adp5585; in adp5585_i2c_probe() local
120 adp5585 = devm_kzalloc(&i2c->dev, sizeof(*adp5585), GFP_KERNEL); in adp5585_i2c_probe()
121 if (!adp5585) in adp5585_i2c_probe()
124 i2c_set_clientdata(i2c, adp5585); in adp5585_i2c_probe()
127 adp5585->regmap = devm_regmap_init_i2c(i2c, regmap_config); in adp5585_i2c_probe()
128 if (IS_ERR(adp5585->regmap)) in adp5585_i2c_probe()
129 return dev_err_probe(&i2c->dev, PTR_ERR(adp5585->regmap), in adp5585_i2c_probe()
132 ret = regmap_read(adp5585->regmap, ADP5585_ID, &id); in adp5585_i2c_probe()
153 struct adp5585_dev *adp5585 = dev_get_drvdata(dev); in adp5585_suspend() local
155 regcache_cache_only(adp5585->regmap, true); in adp5585_suspend()
162 struct adp5585_dev *adp5585 = dev_get_drvdata(dev); in adp5585_resume() local
164 regcache_cache_only(adp5585->regmap, false); in adp5585_resume()
165 regcache_mark_dirty(adp5585->regmap); in adp5585_resume()
167 return regcache_sync(adp5585->regmap); in adp5585_resume()
174 .compatible = "adi,adp5585-00",
177 .compatible = "adi,adp5585-01",
180 .compatible = "adi,adp5585-02",
183 .compatible = "adi,adp5585-03",
186 .compatible = "adi,adp5585-04",
195 .name = "adp5585",
203 MODULE_DESCRIPTION("ADP5585 core driver");