Deleted Added
sdiff udiff text old ( 213286 ) new ( 221518 )
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 213286 2010-09-29 23:06:41Z gonzo $");
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>
43#include <sys/lock.h>
44#include <sys/mutex.h>
45#include <sys/gpio.h>
46
47#include <machine/bus.h>
48#include <machine/resource.h>
49#include <mips/atheros/ar71xxreg.h>
50#include <mips/atheros/ar71xx_gpiovar.h>
51
52#include "gpio_if.h"
53
54#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)
55
56struct ar71xx_gpio_pin {
57 const char *name;

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

139
140 GPIO_UNLOCK(sc);
141}
142
143static int
144ar71xx_gpio_pin_max(device_t dev, int *maxpin)
145{
146
147 *maxpin = AR71XX_GPIO_PINS - 1;
148 return (0);
149}
150
151static int
152ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps)
153{
154 struct ar71xx_gpio_softc *sc = device_get_softc(dev);
155 int i;

--- 291 unchanged lines hidden ---