Deleted Added
sdiff udiff text old ( 273799 ) new ( 274670 )
full compact
1/*-
2 * Copyright (c) 2009, Oleksandr Tymoshenko <gonzo@FreeBSD.org>
3 * Copyright (c) 2009, 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:

--- 17 unchanged lines hidden (view full) ---

26 * SUCH DAMAGE.
27 */
28
29/*
30 * GPIO driver for AR71xx
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_gpio.c 274670 2014-11-18 17:22:08Z loos $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/bus.h>
39
40#include <sys/kernel.h>
41#include <sys/module.h>
42#include <sys/rman.h>

--- 193 unchanged lines hidden (view full) ---

236 for (i = 0; i < sc->gpio_npins; i++) {
237 if (sc->gpio_pins[i].gp_pin == pin)
238 break;
239 }
240
241 if (i >= sc->gpio_npins)
242 return (EINVAL);
243
244 ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], flags);
245
246 return (0);
247}
248
249static int
250ar71xx_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value)
251{
252 struct ar71xx_gpio_softc *sc = device_get_softc(dev);
253 int i;

--- 232 unchanged lines hidden ---