Lines Matching refs:da9052
58 static int da9052_i2c_fix(struct da9052 *da9052, unsigned char reg) in da9052_i2c_fix() argument
62 switch (da9052->chip_id) { in da9052_i2c_fix()
69 return regmap_read(da9052->regmap, in da9052_i2c_fix()
89 static int da9052_i2c_disable_multiwrite(struct da9052 *da9052) in da9052_i2c_disable_multiwrite() argument
93 ret = regmap_read(da9052->regmap, DA9052_CONTROL_B_REG, ®_val); in da9052_i2c_disable_multiwrite()
99 ret = regmap_write(da9052->regmap, DA9052_CONTROL_B_REG, in da9052_i2c_disable_multiwrite()
132 struct da9052 *da9052; in da9052_i2c_probe() local
135 da9052 = devm_kzalloc(&client->dev, sizeof(struct da9052), GFP_KERNEL); in da9052_i2c_probe()
136 if (!da9052) in da9052_i2c_probe()
139 da9052->dev = &client->dev; in da9052_i2c_probe()
140 da9052->chip_irq = client->irq; in da9052_i2c_probe()
141 da9052->fix_io = da9052_i2c_fix; in da9052_i2c_probe()
143 i2c_set_clientdata(client, da9052); in da9052_i2c_probe()
145 da9052->regmap = devm_regmap_init_i2c(client, &da9052_regmap_config); in da9052_i2c_probe()
146 if (IS_ERR(da9052->regmap)) { in da9052_i2c_probe()
147 ret = PTR_ERR(da9052->regmap); in da9052_i2c_probe()
153 ret = da9052_i2c_disable_multiwrite(da9052); in da9052_i2c_probe()
168 return da9052_device_init(da9052, id->driver_data); in da9052_i2c_probe()
173 struct da9052 *da9052 = i2c_get_clientdata(client); in da9052_i2c_remove() local
175 da9052_device_exit(da9052); in da9052_i2c_remove()