ar71xx_gpio.c (249449) | ar71xx_gpio.c (250165) |
---|---|
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> | 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 249449 2013-04-13 21:21:13Z dim $"); | 34__FBSDID("$FreeBSD: head/sys/mips/atheros/ar71xx_gpio.c 250165 2013-05-02 00:40:45Z adrian $"); |
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_setup.h> 51#include <mips/atheros/ar71xx_gpiovar.h> | 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_setup.h> 51#include <mips/atheros/ar71xx_gpiovar.h> |
52#include <mips/atheros/ar933xreg.h> |
|
52 53#include "gpio_if.h" 54 55#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 56 57/* 58 * Helpers 59 */ --- 71 unchanged lines hidden (view full) --- 131 case AR71XX_SOC_AR9132: 132 *maxpin = AR91XX_GPIO_PINS - 1; 133 break; 134 case AR71XX_SOC_AR7240: 135 case AR71XX_SOC_AR7241: 136 case AR71XX_SOC_AR7242: 137 *maxpin = AR724X_GPIO_PINS - 1; 138 break; | 53 54#include "gpio_if.h" 55 56#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) 57 58/* 59 * Helpers 60 */ --- 71 unchanged lines hidden (view full) --- 132 case AR71XX_SOC_AR9132: 133 *maxpin = AR91XX_GPIO_PINS - 1; 134 break; 135 case AR71XX_SOC_AR7240: 136 case AR71XX_SOC_AR7241: 137 case AR71XX_SOC_AR7242: 138 *maxpin = AR724X_GPIO_PINS - 1; 139 break; |
140 case AR71XX_SOC_AR9330: 141 case AR71XX_SOC_AR9331: 142 *maxpin = AR933X_GPIO_COUNT - 1; 143 break; |
|
139 default: 140 *maxpin = AR71XX_GPIO_PINS - 1; 141 } 142 return (0); 143} 144 145static int 146ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) --- 320 unchanged lines hidden --- | 144 default: 145 *maxpin = AR71XX_GPIO_PINS - 1; 146 } 147 return (0); 148} 149 150static int 151ar71xx_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) --- 320 unchanged lines hidden --- |