vf_gpio.c (266274) | vf_gpio.c (278782) |
---|---|
1/*- 2 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com> 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 --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * Vybrid Family General-Purpose Input/Output (GPIO) 29 * Chapter 7, Vybrid Reference Manual, Rev. 5, 07/2013 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2013 Ruslan Bukin <br@bsdpad.com> 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 --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * Vybrid Family General-Purpose Input/Output (GPIO) 29 * Chapter 7, Vybrid Reference Manual, Rev. 5, 07/2013 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: stable/10/sys/arm/freescale/vybrid/vf_gpio.c 266274 2014-05-16 23:27:18Z ian $"); | 33__FBSDID("$FreeBSD: stable/10/sys/arm/freescale/vybrid/vf_gpio.c 278782 2015-02-14 20:37:33Z loos $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/rman.h> --- 99 unchanged lines hidden (view full) --- 141 sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; 142 sc->gpio_pins[i].gp_flags = 143 (READ4(sc, GPIO_PDOR(i)) & (1 << (i % 32))) ? 144 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; 145 snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, 146 "vf_gpio%d.%d", device_get_unit(dev), i); 147 } 148 | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/rman.h> --- 99 unchanged lines hidden (view full) --- 141 sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; 142 sc->gpio_pins[i].gp_flags = 143 (READ4(sc, GPIO_PDOR(i)) & (1 << (i % 32))) ? 144 GPIO_PIN_OUTPUT: GPIO_PIN_INPUT; 145 snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, 146 "vf_gpio%d.%d", device_get_unit(dev), i); 147 } 148 |
149 device_add_child(dev, "gpioc", device_get_unit(dev)); 150 device_add_child(dev, "gpiobus", device_get_unit(dev)); | 149 device_add_child(dev, "gpioc", -1); 150 device_add_child(dev, "gpiobus", -1); |
151 152 return (bus_generic_attach(dev)); 153} 154 155static int 156vf_gpio_pin_max(device_t dev, int *maxpin) 157{ 158 --- 220 unchanged lines hidden --- | 151 152 return (bus_generic_attach(dev)); 153} 154 155static int 156vf_gpio_pin_max(device_t dev, int *maxpin) 157{ 158 --- 220 unchanged lines hidden --- |