rt305x_gpio.c (256281) | rt305x_gpio.c (278782) |
---|---|
1/*- 2 * Copyright (c) 2010-2011, Aleksandr Rybalko <ray@ddteam.net> 3 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 4 * Copyright (c) 2009, Luiz Otavio O Souza. 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 RT305X SoC. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2010-2011, Aleksandr Rybalko <ray@ddteam.net> 3 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org> 4 * Copyright (c) 2009, Luiz Otavio O Souza. 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 RT305X SoC. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: stable/10/sys/mips/rt305x/rt305x_gpio.c 249449 2013-04-13 21:21:13Z dim $"); | 35__FBSDID("$FreeBSD: stable/10/sys/mips/rt305x/rt305x_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> --- 462 unchanged lines hidden (view full) --- 506#else 507 if (sc->reset_gpio != -1) { 508 rt305x_gpio_pin_setflags(dev, sc->reset_gpio, 509 GPIO_PIN_INPUT|GPIO_PIN_INVOUT); 510 device_printf(dev, "\tUse reset_gpio %d\n", sc->reset_gpio); 511 } 512#endif 513 | 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> --- 462 unchanged lines hidden (view full) --- 506#else 507 if (sc->reset_gpio != -1) { 508 rt305x_gpio_pin_setflags(dev, sc->reset_gpio, 509 GPIO_PIN_INPUT|GPIO_PIN_INVOUT); 510 device_printf(dev, "\tUse reset_gpio %d\n", sc->reset_gpio); 511 } 512#endif 513 |
514 device_add_child(dev, "gpioc", device_get_unit(dev)); 515 device_add_child(dev, "gpiobus", device_get_unit(dev)); | 514 device_add_child(dev, "gpioc", -1); 515 device_add_child(dev, "gpiobus", -1); |
516 | 516 |
517 | |
518 return (bus_generic_attach(dev)); 519} 520 521static int 522rt305x_gpio_detach(device_t dev) 523{ 524 struct rt305x_gpio_softc *sc = device_get_softc(dev); 525 --- 93 unchanged lines hidden --- | 517 return (bus_generic_attach(dev)); 518} 519 520static int 521rt305x_gpio_detach(device_t dev) 522{ 523 struct rt305x_gpio_softc *sc = device_get_softc(dev); 524 --- 93 unchanged lines hidden --- |