lp3972 186 drivers/regulator/lp3972.c static u8 lp3972_reg_read(struct lp3972 *lp3972, u8 reg) lp3972 190 drivers/regulator/lp3972.c mutex_lock(&lp3972->io_lock); lp3972 192 drivers/regulator/lp3972.c lp3972_i2c_read(lp3972->i2c, reg, 1, &val); lp3972 194 drivers/regulator/lp3972.c dev_dbg(lp3972->dev, "reg read 0x%02x -> 0x%02x\n", (int)reg, lp3972 197 drivers/regulator/lp3972.c mutex_unlock(&lp3972->io_lock); lp3972 202 drivers/regulator/lp3972.c static int lp3972_set_bits(struct lp3972 *lp3972, u8 reg, u16 mask, u16 val) lp3972 207 drivers/regulator/lp3972.c mutex_lock(&lp3972->io_lock); lp3972 209 drivers/regulator/lp3972.c ret = lp3972_i2c_read(lp3972->i2c, reg, 1, &tmp); lp3972 212 drivers/regulator/lp3972.c ret = lp3972_i2c_write(lp3972->i2c, reg, 1, &tmp); lp3972 213 drivers/regulator/lp3972.c dev_dbg(lp3972->dev, "reg write 0x%02x -> 0x%02x\n", (int)reg, lp3972 216 drivers/regulator/lp3972.c mutex_unlock(&lp3972->io_lock); lp3972 223 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 228 drivers/regulator/lp3972.c val = lp3972_reg_read(lp3972, LP3972_LDO_OUTPUT_ENABLE_REG(ldo)); lp3972 234 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 238 drivers/regulator/lp3972.c return lp3972_set_bits(lp3972, LP3972_LDO_OUTPUT_ENABLE_REG(ldo), lp3972 244 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 248 drivers/regulator/lp3972.c return lp3972_set_bits(lp3972, LP3972_LDO_OUTPUT_ENABLE_REG(ldo), lp3972 254 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 259 drivers/regulator/lp3972.c reg = lp3972_reg_read(lp3972, LP3972_LDO_VOL_CONTR_REG(ldo)); lp3972 268 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 273 drivers/regulator/lp3972.c ret = lp3972_set_bits(lp3972, LP3972_LDO_VOL_CONTR_REG(ldo), lp3972 290 drivers/regulator/lp3972.c ret = lp3972_set_bits(lp3972, LP3972_VOL_CHANGE_REG, lp3972 296 drivers/regulator/lp3972.c ret = lp3972_set_bits(lp3972, LP3972_VOL_CHANGE_REG, lp3972 316 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 321 drivers/regulator/lp3972.c val = lp3972_reg_read(lp3972, LP3972_BUCK_VOL_ENABLE_REG(buck)); lp3972 327 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 332 drivers/regulator/lp3972.c val = lp3972_set_bits(lp3972, LP3972_BUCK_VOL_ENABLE_REG(buck), lp3972 339 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 344 drivers/regulator/lp3972.c val = lp3972_set_bits(lp3972, LP3972_BUCK_VOL_ENABLE_REG(buck), lp3972 351 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 355 drivers/regulator/lp3972.c reg = lp3972_reg_read(lp3972, LP3972_BUCK_VOL1_REG(buck)); lp3972 364 drivers/regulator/lp3972.c struct lp3972 *lp3972 = rdev_get_drvdata(dev); lp3972 368 drivers/regulator/lp3972.c ret = lp3972_set_bits(lp3972, LP3972_BUCK_VOL1_REG(buck), lp3972 376 drivers/regulator/lp3972.c ret = lp3972_set_bits(lp3972, LP3972_VOL_CHANGE_REG, lp3972 381 drivers/regulator/lp3972.c return lp3972_set_bits(lp3972, LP3972_VOL_CHANGE_REG, lp3972 470 drivers/regulator/lp3972.c static int setup_regulators(struct lp3972 *lp3972, lp3972 481 drivers/regulator/lp3972.c config.dev = lp3972->dev; lp3972 483 drivers/regulator/lp3972.c config.driver_data = lp3972; lp3972 485 drivers/regulator/lp3972.c rdev = devm_regulator_register(lp3972->dev, lp3972 489 drivers/regulator/lp3972.c dev_err(lp3972->dev, "regulator init failed: %d\n", lp3972 501 drivers/regulator/lp3972.c struct lp3972 *lp3972; lp3972 511 drivers/regulator/lp3972.c lp3972 = devm_kzalloc(&i2c->dev, sizeof(struct lp3972), GFP_KERNEL); lp3972 512 drivers/regulator/lp3972.c if (!lp3972) lp3972 515 drivers/regulator/lp3972.c lp3972->i2c = i2c; lp3972 516 drivers/regulator/lp3972.c lp3972->dev = &i2c->dev; lp3972 518 drivers/regulator/lp3972.c mutex_init(&lp3972->io_lock); lp3972 532 drivers/regulator/lp3972.c ret = setup_regulators(lp3972, pdata); lp3972 536 drivers/regulator/lp3972.c i2c_set_clientdata(i2c, lp3972);