gpiobus.c (300750) | gpiobus.c (300871) |
---|---|
1/*- 2 * Copyright (c) 2009 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/gpio/gpiobus.c 300750 2016-05-26 15:45:36Z ian $"); | 28__FBSDID("$FreeBSD: head/sys/dev/gpio/gpiobus.c 300871 2016-05-27 20:41:25Z ian $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/intr.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 54 unchanged lines hidden (view full) --- 91 */ 92 irqnum = intr_gpio_map_irq(pin->dev, pin->pin, pin->flags, intr_mode); 93 if (irqnum == INTR_IRQ_INVALID) 94 return (NULL); 95 96 return (bus_alloc_resource(consumer_dev, SYS_RES_IRQ, rid, 97 irqnum, irqnum, 1, alloc_flags)); 98} | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/gpio.h> 34#include <sys/intr.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> --- 54 unchanged lines hidden (view full) --- 91 */ 92 irqnum = intr_gpio_map_irq(pin->dev, pin->pin, pin->flags, intr_mode); 93 if (irqnum == INTR_IRQ_INVALID) 94 return (NULL); 95 96 return (bus_alloc_resource(consumer_dev, SYS_RES_IRQ, rid, 97 irqnum, irqnum, 1, alloc_flags)); 98} |
99#else 100struct resource * 101gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, 102 gpio_pin_t pin, uint32_t intr_mode) 103{ 104 105 return (NULL); 106} |
|
99#endif 100 101int 102gpio_check_flags(uint32_t caps, uint32_t flags) 103{ 104 105 /* Check for unwanted flags. */ 106 if ((flags & caps) == 0 || (flags & caps) != flags) --- 735 unchanged lines hidden --- | 107#endif 108 109int 110gpio_check_flags(uint32_t caps, uint32_t flags) 111{ 112 113 /* Check for unwanted flags. */ 114 if ((flags & caps) == 0 || (flags & caps) != flags) --- 735 unchanged lines hidden --- |