at91dci.c (227461) | at91dci.c (228483) |
---|---|
1#include <sys/cdefs.h> | 1#include <sys/cdefs.h> |
2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/at91dci.c 227461 2011-11-12 08:16:45Z hselasky $"); | 2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/at91dci.c 228483 2011-12-14 00:28:54Z hselasky $"); |
3 4/*- 5 * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 1445 unchanged lines hidden (view full) --- 1456 sc->sc_flags.change_suspend = 0; 1457 sc->sc_flags.change_connect = 1; 1458 1459 at91dci_pull_down(sc); 1460 at91dci_clocks_off(sc); 1461 USB_BUS_UNLOCK(&sc->sc_bus); 1462} 1463 | 3 4/*- 5 * Copyright (c) 2007-2008 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 1445 unchanged lines hidden (view full) --- 1456 sc->sc_flags.change_suspend = 0; 1457 sc->sc_flags.change_connect = 1; 1458 1459 at91dci_pull_down(sc); 1460 at91dci_clocks_off(sc); 1461 USB_BUS_UNLOCK(&sc->sc_bus); 1462} 1463 |
1464void | 1464static void |
1465at91dci_suspend(struct at91dci_softc *sc) 1466{ | 1465at91dci_suspend(struct at91dci_softc *sc) 1466{ |
1467 return; | 1467 /* TODO */ |
1468} 1469 | 1468} 1469 |
1470void | 1470static void |
1471at91dci_resume(struct at91dci_softc *sc) 1472{ | 1471at91dci_resume(struct at91dci_softc *sc) 1472{ |
1473 return; | 1473 /* TODO */ |
1474} 1475 1476static void 1477at91dci_do_poll(struct usb_bus *bus) 1478{ 1479 struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); 1480 1481 USB_BUS_LOCK(&sc->sc_bus); --- 819 unchanged lines hidden (view full) --- 2301 break; 2302 default: 2303 /* do nothing */ 2304 break; 2305 } 2306 } 2307} 2308 | 1474} 1475 1476static void 1477at91dci_do_poll(struct usb_bus *bus) 1478{ 1479 struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); 1480 1481 USB_BUS_LOCK(&sc->sc_bus); --- 819 unchanged lines hidden (view full) --- 2301 break; 2302 default: 2303 /* do nothing */ 2304 break; 2305 } 2306 } 2307} 2308 |
2309static void 2310at91dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) 2311{ 2312 struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); 2313 2314 switch (state) { 2315 case USB_HW_POWER_SUSPEND: 2316 at91dci_suspend(sc); 2317 break; 2318 case USB_HW_POWER_SHUTDOWN: 2319 at91dci_uninit(sc); 2320 break; 2321 case USB_HW_POWER_RESUME: 2322 at91dci_resume(sc); 2323 break; 2324 default: 2325 break; 2326 } 2327} 2328 |
|
2309struct usb_bus_methods at91dci_bus_methods = 2310{ 2311 .endpoint_init = &at91dci_ep_init, 2312 .xfer_setup = &at91dci_xfer_setup, 2313 .xfer_unsetup = &at91dci_xfer_unsetup, 2314 .get_hw_ep_profile = &at91dci_get_hw_ep_profile, 2315 .set_stall = &at91dci_set_stall, 2316 .clear_stall = &at91dci_clear_stall, 2317 .roothub_exec = &at91dci_roothub_exec, 2318 .xfer_poll = &at91dci_do_poll, | 2329struct usb_bus_methods at91dci_bus_methods = 2330{ 2331 .endpoint_init = &at91dci_ep_init, 2332 .xfer_setup = &at91dci_xfer_setup, 2333 .xfer_unsetup = &at91dci_xfer_unsetup, 2334 .get_hw_ep_profile = &at91dci_get_hw_ep_profile, 2335 .set_stall = &at91dci_set_stall, 2336 .clear_stall = &at91dci_clear_stall, 2337 .roothub_exec = &at91dci_roothub_exec, 2338 .xfer_poll = &at91dci_do_poll, |
2339 .set_hw_power_sleep = &at91dci_set_hw_power_sleep, |
|
2319}; | 2340}; |