Changeset d37514e in mainline for uspace/lib/usbhost/src/ddf_helpers.c


Ignore:
Timestamp:
2017-10-28T15:41:12Z (6 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c910ecf
Parents:
d46ceb2b
Message:

Routing fun_online and _offline through the USB bus. Added appropriate stubs and ops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/ddf_helpers.c

    rd46ceb2b rd37514e  
    448448}
    449449
     450int hcd_ddf_device_online(ddf_fun_t *fun)
     451{
     452        assert(fun);
     453
     454        hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun));
     455        device_t *dev = ddf_fun_data_get(fun);
     456        assert(dev);
     457        assert(hcd->bus);
     458
     459        usb_log_info("Device(%d): Requested to be brought online.", dev->address);
     460
     461        return bus_online_device(hcd->bus, hcd, dev);
     462}
     463
     464int hcd_ddf_device_offline(ddf_fun_t *fun)
     465{
     466        assert(fun);
     467
     468        hcd_t *hcd = dev_to_hcd(ddf_fun_get_dev(fun));
     469        device_t *dev = ddf_fun_data_get(fun);
     470        assert(dev);
     471        assert(hcd->bus);
     472
     473        usb_log_info("Device(%d): Requested to be taken offline.", dev->address);
     474
     475        return bus_offline_device(hcd->bus, hcd, dev);
     476}
     477
    450478static int hcd_ddf_new_device(hcd_t *hcd, ddf_dev_t *hc, device_t *hub, unsigned port)
    451479{
Note: See TracChangeset for help on using the changeset viewer.