tegra124_xusbpadctl.c (308324) | tegra124_xusbpadctl.c (308335) |
---|---|
1/*- 2 * Copyright (c) 2016 Michal Meloun <mmel@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2016 Michal Meloun <mmel@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: stable/11/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c 308324 2016-11-05 04:17:32Z mmel $ | 26 * $FreeBSD: stable/11/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c 308335 2016-11-05 10:56:32Z mmel $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/malloc.h> --- 535 unchanged lines hidden (view full) --- 570 /* Register as a pinctrl device and use default configuration */ 571 fdt_pinctrl_register(dev, NULL); 572 fdt_pinctrl_configure_by_name(dev, "default"); 573 phy_register_provider(dev); 574 575 return (0); 576} 577 | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/kernel.h> 33#include <sys/module.h> 34#include <sys/malloc.h> --- 535 unchanged lines hidden (view full) --- 570 /* Register as a pinctrl device and use default configuration */ 571 fdt_pinctrl_register(dev, NULL); 572 fdt_pinctrl_configure_by_name(dev, "default"); 573 phy_register_provider(dev); 574 575 return (0); 576} 577 |
578 | |
579static device_method_t tegra_xusbpadctl_methods[] = { 580 /* Device interface */ 581 DEVMETHOD(device_probe, xusbpadctl_probe), 582 DEVMETHOD(device_attach, xusbpadctl_attach), 583 DEVMETHOD(device_detach, xusbpadctl_detach), 584 585 /* fdt_pinctrl interface */ 586 DEVMETHOD(fdt_pinctrl_configure, xusbpadctl_pinctrl_cfg), 587 588 /* phy interface */ 589 DEVMETHOD(phy_enable, xusbpadctl_phy_enable), 590 591 DEVMETHOD_END 592}; 593 | 578static device_method_t tegra_xusbpadctl_methods[] = { 579 /* Device interface */ 580 DEVMETHOD(device_probe, xusbpadctl_probe), 581 DEVMETHOD(device_attach, xusbpadctl_attach), 582 DEVMETHOD(device_detach, xusbpadctl_detach), 583 584 /* fdt_pinctrl interface */ 585 DEVMETHOD(fdt_pinctrl_configure, xusbpadctl_pinctrl_cfg), 586 587 /* phy interface */ 588 DEVMETHOD(phy_enable, xusbpadctl_phy_enable), 589 590 DEVMETHOD_END 591}; 592 |
594static driver_t tegra_xusbpadctl_driver = { 595 "tegra_xusbpadctl", 596 tegra_xusbpadctl_methods, 597 sizeof(struct xusbpadctl_softc), 598}; 599 | |
600static devclass_t tegra_xusbpadctl_devclass; | 593static devclass_t tegra_xusbpadctl_devclass; |
601 | 594static DEFINE_CLASS_0(xusbpadctl, tegra_xusbpadctl_driver, 595 tegra_xusbpadctl_methods, sizeof(struct xusbpadctl_softc)); |
602EARLY_DRIVER_MODULE(tegra_xusbpadctl, simplebus, tegra_xusbpadctl_driver, | 596EARLY_DRIVER_MODULE(tegra_xusbpadctl, simplebus, tegra_xusbpadctl_driver, |
603 tegra_xusbpadctl_devclass, 0, 0, 73); | 597 tegra_xusbpadctl_devclass, NULL, NULL, 73); |