tegra_gpio.c (299858) | tegra_gpio.c (300149) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> | 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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/arm/nvidia/tegra_gpio.c 299858 2016-05-15 15:31:44Z mmel $"); | 28__FBSDID("$FreeBSD: head/sys/arm/nvidia/tegra_gpio.c 300149 2016-05-18 15:05:44Z andrew $"); |
29 30/* 31 * Tegra GPIO driver. 32 */ 33#include "opt_platform.h" 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> --- 410 unchanged lines hidden (view full) --- 447 for (irq = 0; irq < sc->gpio_npins; irq++) { 448 sc->isrcs[irq].irq = irq; 449 sc->isrcs[irq].cfgreg = 0; 450 error = intr_isrc_register(&sc->isrcs[irq].isrc, 451 sc->dev, 0, "%s,%u", name, irq); 452 if (error != 0) 453 return (error); /* XXX deregister ISRCs */ 454 } | 29 30/* 31 * Tegra GPIO driver. 32 */ 33#include "opt_platform.h" 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/bus.h> --- 410 unchanged lines hidden (view full) --- 447 for (irq = 0; irq < sc->gpio_npins; irq++) { 448 sc->isrcs[irq].irq = irq; 449 sc->isrcs[irq].cfgreg = 0; 450 error = intr_isrc_register(&sc->isrcs[irq].isrc, 451 sc->dev, 0, "%s,%u", name, irq); 452 if (error != 0) 453 return (error); /* XXX deregister ISRCs */ 454 } |
455 return (intr_pic_register(sc->dev, 456 OF_xref_from_node(ofw_bus_get_node(sc->dev)))); | 455 if (intr_pic_register(sc->dev, 456 OF_xref_from_node(ofw_bus_get_node(sc->dev))) == NULL) 457 return (ENXIO); 458 459 return (0); |
457} 458 459static int 460tegra_gpio_pic_detach(struct tegra_gpio_softc *sc) 461{ 462 463 /* 464 * There has not been established any procedure yet --- 437 unchanged lines hidden --- | 460} 461 462static int 463tegra_gpio_pic_detach(struct tegra_gpio_softc *sc) 464{ 465 466 /* 467 * There has not been established any procedure yet --- 437 unchanged lines hidden --- |