Lines Matching refs:pmic
41 struct isl_pmic *pmic = rdev_get_drvdata(dev);
44 mutex_lock(&pmic->mtx);
46 idx = i2c_smbus_read_byte(pmic->client);
48 dev_err(&pmic->client->dev, "Error getting voltage\n");
57 mutex_unlock(&pmic->mtx);
63 struct isl_pmic *pmic = rdev_get_drvdata(dev);
81 mutex_lock(&pmic->mtx);
83 err = i2c_smbus_write_byte(pmic->client, data);
85 dev_err(&pmic->client->dev, "Error setting voltage\n");
87 mutex_unlock(&pmic->mtx);
148 struct isl_pmic *pmic;
159 pmic = kzalloc(sizeof(struct isl_pmic), GFP_KERNEL);
160 if (!pmic)
163 pmic->client = i2c;
165 mutex_init(&pmic->mtx);
168 pmic->rdev[i] = regulator_register(&isl_rd[i], &i2c->dev,
169 init_data, pmic);
170 if (IS_ERR(pmic->rdev[i])) {
172 err = PTR_ERR(pmic->rdev);
177 i2c_set_clientdata(i2c, pmic);
183 regulator_unregister(pmic->rdev[i]);
185 kfree(pmic);
191 struct isl_pmic *pmic = i2c_get_clientdata(i2c);
195 regulator_unregister(pmic->rdev[i]);
197 kfree(pmic);