1/*- 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * Copyright (c) 2012 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: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 */ 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_gpio.c 274670 2014-11-18 17:22:08Z loos $"); |
30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/bus.h> 34 35#include <sys/kernel.h> 36#include <sys/module.h> 37#include <sys/rman.h> --- 354 unchanged lines hidden (view full) --- 392 393 if (i >= sc->sc_gpio_npins) 394 return (EINVAL); 395 396 /* We never touch on read-only/reserved pins. */ 397 if (bcm_gpio_pin_is_ro(sc, pin)) 398 return (EINVAL); 399 |
400 bcm_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); 401 402 return (0); 403} 404 405static int 406bcm_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) 407{ --- 385 unchanged lines hidden --- |