Merge branch 'next-samsung-devel' into next-samsung-devel-2
[deliverable/linux.git] / arch / arm / mach-s3c2410 / include / mach / gpio-track.h
CommitLineData
21b23664
BD
1/* arch/arm/mach-s3c24100/include/mach/gpio-core.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C2410 - GPIO core support
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_GPIO_CORE_H
16#define __ASM_ARCH_GPIO_CORE_H __FILE__
17
21b23664
BD
18#include <mach/regs-gpio.h>
19
782d8a3c 20extern struct samsung_gpio_chip s3c24xx_gpios[];
21b23664 21
782d8a3c 22static inline struct samsung_gpio_chip *samsung_gpiolib_getchip(unsigned int pin)
21b23664 23{
782d8a3c 24 struct samsung_gpio_chip *chip;
21b23664 25
a0026418 26 if (pin > S3C_GPIO_END)
21b23664
BD
27 return NULL;
28
29 chip = &s3c24xx_gpios[pin/32];
1635ca4a 30 return ((pin - chip->chip.base) < chip->chip.ngpio) ? chip : NULL;
21b23664
BD
31}
32
33#endif /* __ASM_ARCH_GPIO_CORE_H */
This page took 0.298119 seconds and 5 git commands to generate.