imx_gpio.c (273661) | imx_gpio.c (278782) |
---|---|
1/*- 2 * Copyright (c) 2012, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Oleksandr Rybalko under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * SUCH DAMAGE. 28 */ 29 30/* 31 * Freescale i.MX515 GPIO driver. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2012, 2013 The FreeBSD Foundation 3 * All rights reserved. 4 * 5 * This software was developed by Oleksandr Rybalko under sponsorship 6 * from the FreeBSD Foundation. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * SUCH DAMAGE. 28 */ 29 30/* 31 * Freescale i.MX515 GPIO driver. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: stable/10/sys/arm/freescale/imx/imx_gpio.c 273661 2014-10-26 02:37:42Z ian $"); | 35__FBSDID("$FreeBSD: stable/10/sys/arm/freescale/imx/imx_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> --- 386 unchanged lines hidden (view full) --- 430 sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; 431 sc->gpio_pins[i].gp_flags = 432 (READ4(sc, IMX_GPIO_OE_REG) & (1 << i)) ? GPIO_PIN_OUTPUT: 433 GPIO_PIN_INPUT; 434 snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, 435 "imx_gpio%d.%d", device_get_unit(dev), i); 436 } 437 | 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> --- 386 unchanged lines hidden (view full) --- 430 sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; 431 sc->gpio_pins[i].gp_flags = 432 (READ4(sc, IMX_GPIO_OE_REG) & (1 << i)) ? GPIO_PIN_OUTPUT: 433 GPIO_PIN_INPUT; 434 snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, 435 "imx_gpio%d.%d", device_get_unit(dev), i); 436 } 437 |
438 device_add_child(dev, "gpioc", device_get_unit(dev)); 439 device_add_child(dev, "gpiobus", device_get_unit(dev)); | 438 device_add_child(dev, "gpioc", -1); 439 device_add_child(dev, "gpiobus", -1); |
440 441 return (bus_generic_attach(dev)); 442} 443 444static int 445imx51_gpio_detach(device_t dev) 446{ 447 struct imx51_gpio_softc *sc; --- 44 unchanged lines hidden --- | 440 441 return (bus_generic_attach(dev)); 442} 443 444static int 445imx51_gpio_detach(device_t dev) 446{ 447 struct imx51_gpio_softc *sc; --- 44 unchanged lines hidden --- |