Lines Matching defs:sdev
51 struct ssam_device *sdev;
74 status = ssam_retry(ssam_bat_get_psrc, ac->sdev, &ac->state);
110 dev_dbg(&ac->sdev->dev, "power event (cid = %#04x, iid = %#04x, tid = %#04x)\n",
174 static void spwr_ac_init(struct spwr_ac_device *ac, struct ssam_device *sdev,
180 ac->sdev = sdev;
185 ac->notif.event.id.target_category = sdev->uid.category;
204 status = ssam_retry(ssam_bat_get_sta, ac->sdev, &sta);
215 ac->psy = devm_power_supply_register(&ac->sdev->dev, &ac->psy_desc, &psy_cfg);
219 return ssam_device_notifier_register(ac->sdev, &ac->notif);
231 static int surface_ac_probe(struct ssam_device *sdev)
236 p = ssam_device_get_match_data(sdev);
240 ac = devm_kzalloc(&sdev->dev, sizeof(*ac), GFP_KERNEL);
244 spwr_ac_init(ac, sdev, p->registry, p->name);
245 ssam_device_set_drvdata(sdev, ac);
250 static void surface_ac_remove(struct ssam_device *sdev)
252 struct spwr_ac_device *ac = ssam_device_get_drvdata(sdev);
254 ssam_device_notifier_unregister(sdev, &ac->notif);