Deleted Added
full compact
avila_gpio.c (256281) avila_gpio.c (278782)
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2009, Luiz Otavio O Souza.
4 * Copyright (c) 2010, Andrew Thompson <thompsa@FreeBSD.org>
5 * 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

--- 18 unchanged lines hidden (view full) ---

27 * SUCH DAMAGE.
28 */
29
30/*
31 * GPIO driver for Gateworks Avilia
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2009, Luiz Otavio O Souza.
4 * Copyright (c) 2010, Andrew Thompson <thompsa@FreeBSD.org>
5 * 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

--- 18 unchanged lines hidden (view full) ---

27 * SUCH DAMAGE.
28 */
29
30/*
31 * GPIO driver for Gateworks Avilia
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/ixp425/avila_gpio.c 249449 2013-04-13 21:21:13Z dim $");
35__FBSDID("$FreeBSD: stable/10/sys/arm/xscale/ixp425/avila_gpio.c 278782 2015-02-14 20:37:33Z loos $");
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40
41#include <sys/kernel.h>
42#include <sys/module.h>
43#include <sys/rman.h>

--- 269 unchanged lines hidden (view full) ---

313
314 strncpy(sc->sc_pins[p->pin].gp_name, p->name, GPIOMAXNAME);
315 sc->sc_pins[p->pin].gp_pin = p->pin;
316 sc->sc_pins[p->pin].gp_caps = p->caps;
317 sc->sc_pins[p->pin].gp_flags = avila_gpio_pin_flags(sc, p->pin);
318 sc->sc_valid |= 1 << p->pin;
319 }
320
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40
41#include <sys/kernel.h>
42#include <sys/module.h>
43#include <sys/rman.h>

--- 269 unchanged lines hidden (view full) ---

313
314 strncpy(sc->sc_pins[p->pin].gp_name, p->name, GPIOMAXNAME);
315 sc->sc_pins[p->pin].gp_pin = p->pin;
316 sc->sc_pins[p->pin].gp_caps = p->caps;
317 sc->sc_pins[p->pin].gp_flags = avila_gpio_pin_flags(sc, p->pin);
318 sc->sc_valid |= 1 << p->pin;
319 }
320
321 device_add_child(dev, "gpioc", device_get_unit(dev));
322 device_add_child(dev, "gpiobus", device_get_unit(dev));
321 device_add_child(dev, "gpioc", -1);
322 device_add_child(dev, "gpiobus", -1);
323
323 return (bus_generic_attach(dev));
324#undef N
325}
326
327static int
328avila_gpio_detach(device_t dev)
329{
330

--- 35 unchanged lines hidden ---
324 return (bus_generic_attach(dev));
325#undef N
326}
327
328static int
329avila_gpio_detach(device_t dev)
330{
331

--- 35 unchanged lines hidden ---