ar71xx_gpio.c (256281) | ar71xx_gpio.c (278782) |
---|---|
1/*- 2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 3 * Copyright (c) 2009, Luiz Otavio O Souza. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * SUCH DAMAGE. 27 */ 28 29/* 30 * GPIO driver for AR71xx 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 3 * Copyright (c) 2009, Luiz Otavio O Souza. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * SUCH DAMAGE. 27 */ 28 29/* 30 * GPIO driver for AR71xx 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: stable/10/sys/mips/atheros/ar71xx_gpio.c 255335 2013-09-06 23:47:50Z loos $"); | 34__FBSDID("$FreeBSD: stable/10/sys/mips/atheros/ar71xx_gpio.c 278782 2015-02-14 20:37:33Z loos $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39 40#include <sys/kernel.h> 41#include <sys/module.h> 42#include <sys/rman.h> --- 394 unchanged lines hidden (view full) --- 437 ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS); 438 i++; 439 } 440 for (i = 0; i < sc->gpio_npins; i++) { 441 j = sc->gpio_pins[i].gp_pin; 442 if ((pinon & (1 << j)) != 0) 443 ar71xx_gpio_pin_set(dev, j, 1); 444 } | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39 40#include <sys/kernel.h> 41#include <sys/module.h> 42#include <sys/rman.h> --- 394 unchanged lines hidden (view full) --- 437 ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], DEFAULT_CAPS); 438 i++; 439 } 440 for (i = 0; i < sc->gpio_npins; i++) { 441 j = sc->gpio_pins[i].gp_pin; 442 if ((pinon & (1 << j)) != 0) 443 ar71xx_gpio_pin_set(dev, j, 1); 444 } |
445 device_add_child(dev, "gpioc", device_get_unit(dev)); 446 device_add_child(dev, "gpiobus", device_get_unit(dev)); | 445 device_add_child(dev, "gpioc", -1); 446 device_add_child(dev, "gpiobus", -1); 447 |
447 return (bus_generic_attach(dev)); 448} 449 450static int 451ar71xx_gpio_detach(device_t dev) 452{ 453 struct ar71xx_gpio_softc *sc = device_get_softc(dev); 454 --- 41 unchanged lines hidden --- | 448 return (bus_generic_attach(dev)); 449} 450 451static int 452ar71xx_gpio_detach(device_t dev) 453{ 454 struct ar71xx_gpio_softc *sc = device_get_softc(dev); 455 --- 41 unchanged lines hidden --- |