exynos5_pad.c (273799) | exynos5_pad.c (274670) |
---|---|
1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 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 --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * Samsung Exynos 5 Pad Control 29 * Chapter 4, Exynos 5 Dual User's Manual Public Rev 1.00 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 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 --- 16 unchanged lines hidden (view full) --- 25 */ 26 27/* 28 * Samsung Exynos 5 Pad Control 29 * Chapter 4, Exynos 5 Dual User's Manual Public Rev 1.00 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/arm/samsung/exynos/exynos5_pad.c 273799 2014-10-28 18:33:59Z loos $"); | 33__FBSDID("$FreeBSD: head/sys/arm/samsung/exynos/exynos5_pad.c 274670 2014-11-18 17:22:08Z loos $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/rman.h> --- 717 unchanged lines hidden (view full) --- 759 for (i = 0; i < sc->gpio_npins; i++) { 760 if (sc->gpio_pins[i].gp_pin == pin) 761 break; 762 } 763 764 if (i >= sc->gpio_npins) 765 return (EINVAL); 766 | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/kernel.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/rman.h> --- 717 unchanged lines hidden (view full) --- 759 for (i = 0; i < sc->gpio_npins; i++) { 760 if (sc->gpio_pins[i].gp_pin == pin) 761 break; 762 } 763 764 if (i >= sc->gpio_npins) 765 return (EINVAL); 766 |
767 /* Check for unwanted flags. */ 768 if ((flags & sc->gpio_pins[i].gp_caps) != flags) 769 return (EINVAL); 770 771 /* Can't mix input/output together */ 772 if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == 773 (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) 774 return (EINVAL); 775 | |
776 pad_pin_configure(sc, &sc->gpio_pins[i], flags); 777 778 return (0); 779} 780 781static int 782pad_pin_set(device_t dev, uint32_t pin, unsigned int value) 783{ --- 54 unchanged lines hidden --- | 767 pad_pin_configure(sc, &sc->gpio_pins[i], flags); 768 769 return (0); 770} 771 772static int 773pad_pin_set(device_t dev, uint32_t pin, unsigned int value) 774{ --- 54 unchanged lines hidden --- |