Lines Matching refs:udev
45 struct usb_device *udev; member
58 dev_dbg(&mfi->udev->dev, "charge type %d already set\n", in apple_mfi_fc_set_charge_type()
75 retval = usb_control_msg(mfi->udev, usb_sndctrlpipe(mfi->udev, 0), in apple_mfi_fc_set_charge_type()
82 dev_dbg(&mfi->udev->dev, "retval = %d\n", retval); in apple_mfi_fc_set_charge_type()
97 dev_dbg(&mfi->udev->dev, "prop: %d\n", psp); in apple_mfi_fc_get_property()
120 dev_dbg(&mfi->udev->dev, "prop: %d\n", psp); in apple_mfi_fc_set_property()
122 ret = pm_runtime_get_sync(&mfi->udev->dev); in apple_mfi_fc_set_property()
124 pm_runtime_put_noidle(&mfi->udev->dev); in apple_mfi_fc_set_property()
136 pm_runtime_mark_last_busy(&mfi->udev->dev); in apple_mfi_fc_set_property()
137 pm_runtime_put_autosuspend(&mfi->udev->dev); in apple_mfi_fc_set_property()
168 static bool mfi_fc_match(struct usb_device *udev) in mfi_fc_match() argument
172 idProduct = le16_to_cpu(udev->descriptor.idProduct); in mfi_fc_match()
177 static int mfi_fc_probe(struct usb_device *udev) in mfi_fc_probe() argument
183 if (!mfi_fc_match(udev)) in mfi_fc_probe()
193 mfi->battery = power_supply_register(&udev->dev, in mfi_fc_probe()
197 dev_err(&udev->dev, "Can't register battery\n"); in mfi_fc_probe()
203 mfi->udev = usb_get_dev(udev); in mfi_fc_probe()
204 dev_set_drvdata(&udev->dev, mfi); in mfi_fc_probe()
209 static void mfi_fc_disconnect(struct usb_device *udev) in mfi_fc_disconnect() argument
213 mfi = dev_get_drvdata(&udev->dev); in mfi_fc_disconnect()
216 dev_set_drvdata(&udev->dev, NULL); in mfi_fc_disconnect()
217 usb_put_dev(mfi->udev); in mfi_fc_disconnect()