max8660 73 drivers/regulator/max8660.c static int max8660_write(struct max8660 *max8660, u8 reg, u8 mask, u8 val) max8660 80 drivers/regulator/max8660.c u8 reg_val = (max8660->shadow_regs[reg] & mask) | val; max8660 82 drivers/regulator/max8660.c dev_vdbg(&max8660->client->dev, "Writing reg %02x with %02x\n", max8660 85 drivers/regulator/max8660.c ret = i2c_smbus_write_byte_data(max8660->client, max8660 88 drivers/regulator/max8660.c max8660->shadow_regs[reg] = reg_val; max8660 100 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 101 drivers/regulator/max8660.c u8 val = max8660->shadow_regs[MAX8660_OVER1]; max8660 109 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 112 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_OVER1, 0xff, bit); max8660 117 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 120 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_OVER1, mask, 0); max8660 125 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 127 drivers/regulator/max8660.c u8 selector = max8660->shadow_regs[reg]; max8660 135 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 140 drivers/regulator/max8660.c ret = max8660_write(max8660, reg, 0, selector); max8660 146 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_VCC1, 0xff, bits); max8660 164 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 166 drivers/regulator/max8660.c u8 selector = max8660->shadow_regs[MAX8660_MDTV2]; max8660 173 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 176 drivers/regulator/max8660.c ret = max8660_write(max8660, MAX8660_MDTV2, 0, selector); max8660 181 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_VCC1, 0xff, 0xc0); max8660 198 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 199 drivers/regulator/max8660.c u8 val = max8660->shadow_regs[MAX8660_OVER2]; max8660 207 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 210 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_OVER2, 0xff, bit); max8660 215 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 218 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_OVER2, mask, 0); max8660 223 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 225 drivers/regulator/max8660.c u8 selector = (max8660->shadow_regs[MAX8660_L12VCR] >> shift) & 0xf; max8660 233 drivers/regulator/max8660.c struct max8660 *max8660 = rdev_get_drvdata(rdev); max8660 236 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_L12VCR, 0xf0, selector); max8660 238 drivers/regulator/max8660.c return max8660_write(max8660, MAX8660_L12VCR, 0x0f, max8660 376 drivers/regulator/max8660.c struct max8660 *max8660; max8660 404 drivers/regulator/max8660.c max8660 = devm_kzalloc(dev, sizeof(struct max8660), GFP_KERNEL); max8660 405 drivers/regulator/max8660.c if (!max8660) max8660 408 drivers/regulator/max8660.c max8660->client = client; max8660 412 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_OVER1] = 5; max8660 424 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_ADTV1] = max8660 425 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_ADTV2] = max8660 426 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_SDTV1] = max8660 427 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_SDTV2] = 0x1b; max8660 428 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_MDTV1] = max8660 429 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_MDTV2] = 0x04; max8660 441 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_OVER1] |= 1; max8660 446 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_OVER1] |= 4; max8660 454 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_OVER2] |= 2; max8660 464 drivers/regulator/max8660.c max8660->shadow_regs[MAX8660_OVER2] |= 4; max8660 483 drivers/regulator/max8660.c config.driver_data = max8660; max8660 494 drivers/regulator/max8660.c i2c_set_clientdata(client, max8660);