Lines Matching full:max8998
14 #include <linux/mfd/max8998.h>
15 #include <linux/mfd/max8998-private.h>
34 struct max8998_battery_data *max8998 = power_supply_get_drvdata(psy); in max8998_battery_get_property() local
35 struct i2c_client *i2c = max8998->iodev->i2c; in max8998_battery_get_property()
96 struct max8998_battery_data *max8998; in max8998_battery_probe() local
105 max8998 = devm_kzalloc(&pdev->dev, sizeof(struct max8998_battery_data), in max8998_battery_probe()
107 if (!max8998) in max8998_battery_probe()
110 max8998->dev = &pdev->dev; in max8998_battery_probe()
111 max8998->iodev = iodev; in max8998_battery_probe()
112 platform_set_drvdata(pdev, max8998); in max8998_battery_probe()
113 i2c = max8998->iodev->i2c; in max8998_battery_probe()
122 dev_dbg(max8998->dev, in max8998_battery_probe()
125 dev_err(max8998->dev, "Invalid EOC value\n"); in max8998_battery_probe()
144 dev_dbg(max8998->dev, in max8998_battery_probe()
148 dev_err(max8998->dev, "Invalid Restart Level\n"); in max8998_battery_probe()
167 dev_dbg(max8998->dev, in max8998_battery_probe()
171 dev_err(max8998->dev, "Invalid Full Timeout value\n"); in max8998_battery_probe()
175 psy_cfg.drv_data = max8998; in max8998_battery_probe()
177 max8998->battery = devm_power_supply_register(max8998->dev, in max8998_battery_probe()
180 if (IS_ERR(max8998->battery)) { in max8998_battery_probe()
181 ret = PTR_ERR(max8998->battery); in max8998_battery_probe()
182 dev_err(max8998->dev, "failed: power supply register: %d\n", in max8998_battery_probe()
191 { "max8998-battery", TYPE_MAX8998 },
198 .name = "max8998-battery",
209 MODULE_ALIAS("platform:max8998-battery");