Lines Matching refs:devdata
116 struct wm831x_backup *devdata = dev_get_drvdata(psy->dev.parent); in wm831x_backup_get_prop() local
117 struct wm831x *wm831x = devdata->wm831x; in wm831x_backup_get_prop()
166 struct wm831x_backup *devdata; in wm831x_backup_probe() local
168 devdata = devm_kzalloc(&pdev->dev, sizeof(struct wm831x_backup), in wm831x_backup_probe()
170 if (devdata == NULL) in wm831x_backup_probe()
173 devdata->wm831x = wm831x; in wm831x_backup_probe()
174 platform_set_drvdata(pdev, devdata); in wm831x_backup_probe()
183 snprintf(devdata->name, sizeof(devdata->name), in wm831x_backup_probe()
186 snprintf(devdata->name, sizeof(devdata->name), in wm831x_backup_probe()
189 devdata->backup_desc.name = devdata->name; in wm831x_backup_probe()
190 devdata->backup_desc.type = POWER_SUPPLY_TYPE_BATTERY; in wm831x_backup_probe()
191 devdata->backup_desc.properties = wm831x_backup_props; in wm831x_backup_probe()
192 devdata->backup_desc.num_properties = ARRAY_SIZE(wm831x_backup_props); in wm831x_backup_probe()
193 devdata->backup_desc.get_property = wm831x_backup_get_prop; in wm831x_backup_probe()
194 devdata->backup = power_supply_register(&pdev->dev, in wm831x_backup_probe()
195 &devdata->backup_desc, NULL); in wm831x_backup_probe()
197 return PTR_ERR_OR_ZERO(devdata->backup); in wm831x_backup_probe()
202 struct wm831x_backup *devdata = platform_get_drvdata(pdev); in wm831x_backup_remove() local
204 power_supply_unregister(devdata->backup); in wm831x_backup_remove()