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: head/sys/arm/freescale/imx/imx_gpio.c 274670 2014-11-18 17:22:08Z 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> --- 219 unchanged lines hidden (view full) --- 263 for (i = 0; i < sc->gpio_npins; i++) { 264 if (sc->gpio_pins[i].gp_pin == pin) 265 break; 266 } 267 268 if (i >= sc->gpio_npins) 269 return (EINVAL); 270 |
271 imx51_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); 272 |
273 return (0); 274} 275 276static int 277imx51_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) 278{ 279 struct imx51_gpio_softc *sc; 280 int i; --- 201 unchanged lines hidden --- |