Lines Matching refs:pmic
31 struct isl_pmic *pmic = rdev_get_drvdata(dev); in isl6271a_get_voltage_sel() local
34 mutex_lock(&pmic->mtx); in isl6271a_get_voltage_sel()
36 idx = i2c_smbus_read_byte(pmic->client); in isl6271a_get_voltage_sel()
38 dev_err(&pmic->client->dev, "Error getting voltage\n"); in isl6271a_get_voltage_sel()
40 mutex_unlock(&pmic->mtx); in isl6271a_get_voltage_sel()
47 struct isl_pmic *pmic = rdev_get_drvdata(dev); in isl6271a_set_voltage_sel() local
50 mutex_lock(&pmic->mtx); in isl6271a_set_voltage_sel()
52 err = i2c_smbus_write_byte(pmic->client, selector); in isl6271a_set_voltage_sel()
54 dev_err(&pmic->client->dev, "Error setting voltage\n"); in isl6271a_set_voltage_sel()
56 mutex_unlock(&pmic->mtx); in isl6271a_set_voltage_sel()
106 struct isl_pmic *pmic; in isl6271a_probe() local
112 pmic = devm_kzalloc(&i2c->dev, sizeof(struct isl_pmic), GFP_KERNEL); in isl6271a_probe()
113 if (!pmic) in isl6271a_probe()
116 pmic->client = i2c; in isl6271a_probe()
118 mutex_init(&pmic->mtx); in isl6271a_probe()
126 config.driver_data = pmic; in isl6271a_probe()
135 i2c_set_clientdata(i2c, pmic); in isl6271a_probe()