Lines Matching +full:revision +full:- +full:id1

1 // SPDX-License-Identifier: GPL-2.0
53 ret = regmap_write(rdev->regmap, MP8859_VOUT_L_REG, sel & 0x7); in mp8859_set_voltage_sel()
57 ret = regmap_write(rdev->regmap, MP8859_VOUT_H_REG, sel >> 3); in mp8859_set_voltage_sel()
61 ret = regmap_update_bits(rdev->regmap, MP8859_VOUT_GO_REG, in mp8859_set_voltage_sel()
72 ret = regmap_read(rdev->regmap, MP8859_VOUT_H_REG, &val_tmp); in mp8859_get_voltage_sel()
78 ret = regmap_read(rdev->regmap, MP8859_VOUT_L_REG, &val_tmp); in mp8859_get_voltage_sel()
93 change = from - to; in mp8859_set_voltage_time_sel()
95 change = to - from; in mp8859_set_voltage_time_sel()
105 ret = regmap_read(rdev->regmap, MP8859_CTL1_REG, &val); in mp8859_get_mode()
107 dev_err(&rdev->dev, "Failed to read mode: %d\n", ret); in mp8859_get_mode()
129 return -EINVAL; in mp8859_set_mode()
132 return regmap_update_bits(rdev->regmap, MP8859_CTL1_REG, in mp8859_set_mode()
145 return -EINVAL; in mp8859_set_current_limit()
147 return -EINVAL; in mp8859_set_current_limit()
153 ret = regmap_read(rdev->regmap, MP8859_STATUS_REG, &cur_val); in mp8859_set_current_limit()
157 return regmap_update_bits(rdev->regmap, MP8859_IOUT_LIM_REG, in mp8859_set_current_limit()
161 ret = regmap_read(rdev->regmap, MP8859_IOUT_LIM_REG, &cur_val); in mp8859_set_current_limit()
166 for (i = cur_val; i >= new_val; i--) { in mp8859_set_current_limit()
167 ret = regmap_update_bits(rdev->regmap, in mp8859_set_current_limit()
170 cur_val - i); in mp8859_set_current_limit()
176 ret = regmap_update_bits(rdev->regmap, in mp8859_set_current_limit()
194 ret = regmap_read(rdev->regmap, MP8859_CTL1_REG, &val); in mp8859_get_status()
200 ret = regmap_read(rdev->regmap, MP8859_STATUS_REG, &val); in mp8859_get_status()
219 ret = regmap_read(rdev->regmap, MP8859_CTL1_REG, &enabled); in mp8859_get_error_flags()
224 ret = regmap_read(rdev->regmap, MP8859_STATUS_REG, &status); in mp8859_get_error_flags()
327 struct regulator_config config = {.dev = &i2c->dev}; in mp8859_i2c_probe()
334 dev_err(&i2c->dev, "regmap init failed: %d\n", ret); in mp8859_i2c_probe()
340 dev_err(&i2c->dev, "Failed to read manufacturer ID: %d\n", ret); in mp8859_i2c_probe()
344 dev_err(&i2c->dev, "Manufacturer ID %x != 9\n", val); in mp8859_i2c_probe()
345 return -EINVAL; in mp8859_i2c_probe()
350 dev_err(&i2c->dev, "Failed to read device ID: %d\n", ret); in mp8859_i2c_probe()
354 dev_err(&i2c->dev, "Manufacturer ID %x != 0x58\n", val); in mp8859_i2c_probe()
355 return -EINVAL; in mp8859_i2c_probe()
360 dev_err(&i2c->dev, "Failed to read device revision: %d\n", ret); in mp8859_i2c_probe()
365 dev_err(&i2c->dev, "Failed to read device ID1: %d\n", ret); in mp8859_i2c_probe()
368 dev_info(&i2c->dev, "MP8859-%04d revision %d\n", val, rev); in mp8859_i2c_probe()
370 rdev = devm_regulator_register(&i2c->dev, &mp8859_regulators[0], in mp8859_i2c_probe()
375 dev_err(&i2c->dev, "failed to register %s: %d\n", in mp8859_i2c_probe()