Lines Matching refs:max8998

45 	struct max8998_dev *max8998 = i2c_get_clientdata(i2c);  in max8998_read_reg()  local
48 mutex_lock(&max8998->iolock); in max8998_read_reg()
50 mutex_unlock(&max8998->iolock); in max8998_read_reg()
62 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_bulk_read() local
65 mutex_lock(&max8998->iolock); in max8998_bulk_read()
67 mutex_unlock(&max8998->iolock); in max8998_bulk_read()
77 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_write_reg() local
80 mutex_lock(&max8998->iolock); in max8998_write_reg()
82 mutex_unlock(&max8998->iolock); in max8998_write_reg()
89 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_bulk_write() local
92 mutex_lock(&max8998->iolock); in max8998_bulk_write()
94 mutex_unlock(&max8998->iolock); in max8998_bulk_write()
104 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_update_reg() local
107 mutex_lock(&max8998->iolock); in max8998_update_reg()
114 mutex_unlock(&max8998->iolock); in max8998_update_reg()
169 struct max8998_dev *max8998; in max8998_i2c_probe() local
172 max8998 = devm_kzalloc(&i2c->dev, sizeof(struct max8998_dev), in max8998_i2c_probe()
174 if (max8998 == NULL) in max8998_i2c_probe()
183 i2c_set_clientdata(i2c, max8998); in max8998_i2c_probe()
184 max8998->dev = &i2c->dev; in max8998_i2c_probe()
185 max8998->i2c = i2c; in max8998_i2c_probe()
186 max8998->irq = i2c->irq; in max8998_i2c_probe()
187 max8998->type = max8998_i2c_get_driver_data(i2c, id); in max8998_i2c_probe()
188 max8998->pdata = pdata; in max8998_i2c_probe()
190 max8998->ono = pdata->ono; in max8998_i2c_probe()
191 max8998->irq_base = pdata->irq_base; in max8998_i2c_probe()
192 max8998->wakeup = pdata->wakeup; in max8998_i2c_probe()
194 mutex_init(&max8998->iolock); in max8998_i2c_probe()
196 max8998->rtc = i2c_new_dummy_device(i2c->adapter, RTC_I2C_ADDR); in max8998_i2c_probe()
197 if (IS_ERR(max8998->rtc)) { in max8998_i2c_probe()
199 return PTR_ERR(max8998->rtc); in max8998_i2c_probe()
201 i2c_set_clientdata(max8998->rtc, max8998); in max8998_i2c_probe()
203 max8998_irq_init(max8998); in max8998_i2c_probe()
205 pm_runtime_set_active(max8998->dev); in max8998_i2c_probe()
207 switch (max8998->type) { in max8998_i2c_probe()
209 ret = mfd_add_devices(max8998->dev, -1, in max8998_i2c_probe()
214 ret = mfd_add_devices(max8998->dev, -1, in max8998_i2c_probe()
225 device_init_wakeup(max8998->dev, max8998->wakeup); in max8998_i2c_probe()
230 mfd_remove_devices(max8998->dev); in max8998_i2c_probe()
231 max8998_irq_exit(max8998); in max8998_i2c_probe()
232 i2c_unregister_device(max8998->rtc); in max8998_i2c_probe()
245 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_suspend() local
248 irq_set_irq_wake(max8998->irq, 1); in max8998_suspend()
255 struct max8998_dev *max8998 = i2c_get_clientdata(i2c); in max8998_resume() local
258 irq_set_irq_wake(max8998->irq, 0); in max8998_resume()