Lines Matching +full:buck +full:-

1 // SPDX-License-Identifier: GPL-2.0-only
40 LP3971_BUCK1 -> 0
41 LP3971_BUCK2 -> 4
42 LP3971_BUCK3 -> 6
77 LP3971_LDO1 -> LP3971_LDO_VOL_CONTR_BASE + 0
78 LP3971_LDO2 -> LP3971_LDO_VOL_CONTR_BASE + 0
79 LP3971_LDO3 -> LP3971_LDO_VOL_CONTR_BASE + 1
80 LP3971_LDO4 -> LP3971_LDO_VOL_CONTR_BASE + 1
81 LP3971_LDO5 -> LP3971_LDO_VOL_CONTR_BASE + 2
86 LP3971_LDO1 -> 0, LP3971_LDO2 -> 4
87 LP3971_LDO3 -> 0, LP3971_LDO4 -> 4
88 LP3971_LDO5 -> 0
109 int ldo = rdev_get_id(dev) - LP3971_LDO1; in lp3971_ldo_is_enabled()
120 int ldo = rdev_get_id(dev) - LP3971_LDO1; in lp3971_ldo_enable()
129 int ldo = rdev_get_id(dev) - LP3971_LDO1; in lp3971_ldo_disable()
138 int ldo = rdev_get_id(dev) - LP3971_LDO1; in lp3971_ldo_get_voltage_sel()
151 int ldo = rdev_get_id(dev) - LP3971_LDO1; in lp3971_ldo_set_voltage_sel()
171 int buck = rdev_get_id(dev) - LP3971_DCDC1; in lp3971_dcdc_is_enabled() local
172 u16 mask = 1 << (buck * 2); in lp3971_dcdc_is_enabled()
182 int buck = rdev_get_id(dev) - LP3971_DCDC1; in lp3971_dcdc_enable() local
183 u16 mask = 1 << (buck * 2); in lp3971_dcdc_enable()
191 int buck = rdev_get_id(dev) - LP3971_DCDC1; in lp3971_dcdc_disable() local
192 u16 mask = 1 << (buck * 2); in lp3971_dcdc_disable()
200 int buck = rdev_get_id(dev) - LP3971_DCDC1; in lp3971_dcdc_get_voltage_sel() local
203 reg = lp3971_reg_read(lp3971, LP3971_BUCK_TARGET_VOL1_REG(buck)); in lp3971_dcdc_get_voltage_sel()
213 int buck = rdev_get_id(dev) - LP3971_DCDC1; in lp3971_dcdc_set_voltage_sel() local
216 ret = lp3971_set_bits(lp3971, LP3971_BUCK_TARGET_VOL1_REG(buck), in lp3971_dcdc_set_voltage_sel()
222 BUCK_VOL_CHANGE_FLAG_MASK << BUCK_VOL_CHANGE_SHIFT(buck), in lp3971_dcdc_set_voltage_sel()
223 BUCK_VOL_CHANGE_FLAG_GO << BUCK_VOL_CHANGE_SHIFT(buck)); in lp3971_dcdc_set_voltage_sel()
228 BUCK_VOL_CHANGE_FLAG_MASK << BUCK_VOL_CHANGE_SHIFT(buck), in lp3971_dcdc_set_voltage_sel()
229 0 << BUCK_VOL_CHANGE_SHIFT(buck)); in lp3971_dcdc_set_voltage_sel()
323 return -EIO; in lp3971_i2c_read()
336 return -EIO; in lp3971_i2c_write()
344 mutex_lock(&lp3971->io_lock); in lp3971_reg_read()
346 lp3971_i2c_read(lp3971->i2c, reg, 1, &val); in lp3971_reg_read()
348 dev_dbg(lp3971->dev, "reg read 0x%02x -> 0x%02x\n", (int)reg, in lp3971_reg_read()
351 mutex_unlock(&lp3971->io_lock); in lp3971_reg_read()
361 mutex_lock(&lp3971->io_lock); in lp3971_set_bits()
363 ret = lp3971_i2c_read(lp3971->i2c, reg, 1, &tmp); in lp3971_set_bits()
366 ret = lp3971_i2c_write(lp3971->i2c, reg, 1, &tmp); in lp3971_set_bits()
367 dev_dbg(lp3971->dev, "reg write 0x%02x -> 0x%02x\n", (int)reg, in lp3971_set_bits()
370 mutex_unlock(&lp3971->io_lock); in lp3971_set_bits()
381 for (i = 0; i < pdata->num_regulators; i++) { in setup_regulators()
383 struct lp3971_regulator_subdev *reg = &pdata->regulators[i]; in setup_regulators()
386 config.dev = lp3971->dev; in setup_regulators()
387 config.init_data = reg->initdata; in setup_regulators()
390 rdev = devm_regulator_register(lp3971->dev, in setup_regulators()
391 &regulators[reg->id], &config); in setup_regulators()
394 dev_err(lp3971->dev, "regulator init failed: %d\n", in setup_regulators()
406 struct lp3971_platform_data *pdata = dev_get_platdata(&i2c->dev); in lp3971_i2c_probe()
411 dev_dbg(&i2c->dev, "No platform init data supplied\n"); in lp3971_i2c_probe()
412 return -ENODEV; in lp3971_i2c_probe()
415 lp3971 = devm_kzalloc(&i2c->dev, sizeof(struct lp3971), GFP_KERNEL); in lp3971_i2c_probe()
417 return -ENOMEM; in lp3971_i2c_probe()
419 lp3971->i2c = i2c; in lp3971_i2c_probe()
420 lp3971->dev = &i2c->dev; in lp3971_i2c_probe()
422 mutex_init(&lp3971->io_lock); in lp3971_i2c_probe()
427 ret = -ENODEV; in lp3971_i2c_probe()
429 dev_err(&i2c->dev, "failed to detect device\n"); in lp3971_i2c_probe()