Lines Matching defs:max8998
2 * max8998.c - Voltage regulator driver for the Maxim 8998
34 #include <linux/mfd/max8998.h>
35 #include <linux/mfd/max8998-private.h>
175 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
183 ret = max8998_read_reg(max8998->iodev, reg, &val);
192 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
199 return max8998_update_reg(max8998->iodev, reg, 1<<shift, 1<<shift);
204 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
211 return max8998_update_reg(max8998->iodev, reg, 0, 1<<shift);
278 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
286 ret = max8998_read_reg(max8998->iodev, reg, &val);
299 struct max8998_data *max8998 = rdev_get_drvdata(rdev);
333 max8998_read_reg(max8998->iodev, MAX8998_REG_ONOFF4, &val);
340 ret = max8998_update_reg(max8998->iodev, reg, i<<shift, mask<<shift);
540 struct max8998_data *max8998;
548 max8998 = kzalloc(sizeof(struct max8998_data), GFP_KERNEL);
549 if (!max8998)
553 max8998->rdev = kzalloc(size, GFP_KERNEL);
554 if (!max8998->rdev) {
555 kfree(max8998);
559 rdev = max8998->rdev;
560 max8998->dev = &pdev->dev;
561 max8998->iodev = iodev;
562 max8998->num_regulators = pdata->num_regulators;
563 platform_set_drvdata(pdev, max8998);
575 rdev[i] = regulator_register(®ulators[index], max8998->dev,
576 pdata->regulators[i].initdata, max8998);
579 dev_err(max8998->dev, "regulator init failed\n");
588 for (i = 0; i < max8998->num_regulators; i++)
592 kfree(max8998->rdev);
593 kfree(max8998);
600 struct max8998_data *max8998 = platform_get_drvdata(pdev);
601 struct regulator_dev **rdev = max8998->rdev;
604 for (i = 0; i < max8998->num_regulators; i++)
608 kfree(max8998->rdev);
609 kfree(max8998);
616 .name = "max8998-pmic",