aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/gpio.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-10-19blackfin: Fix local <asm/gpio.h> includesLinus Walleij1-0/+20
When making the pin control submenu globally visible, all kinds of oddities appear, in blackfin a few files were #including <linux/gpio.h> and relying on that to pull in <asm/gpio.h>. This was not working when pin control but not GPIOLIB was selected resulting in a breakage in allmodconfig. The code these files were using was still there and defined in <asm/gpio.h> just not pulle in from just including <linux/gpio.h> Simply add the required includes explicitly in the blackfin kernel core and everything compiles fine. Delete the use of the incorrect <linux/gpio.h> where possible. Add stubs to <asm/gpio.h> for the functions called from PM: these should probably also depend on !PINCTRL but since the global CONFIG_PM symbol is used to compile PM support, we need some more intrusive thing here, to be tested by Blackfin maintainers. Cc: Steven Miao <realmz6@gmail.com> Cc: Huanhuan Feng <huanhuan.feng@analog.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-19blackfin: gpio: Remove none gpio lib code.Sonic Zhang1-137/+20
- Remove non gpio lib code from blackfin architecture. - Limit the lagecy blackfin gpio driver to bf5xx processors only. - Remove unused definition of the pint power functions. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-07-24bf60x: pm: add pint suspend and resume supportSteven Miao1-0/+2
save and restore pint sec CTL save and restore pint registers add pint suspend and resume when suspend to mem Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21blackfin: GPIO: Implement more GPIO APIsSonic Zhang1-0/+44
Implement more GPIO APIs in case GPIOLIB is disabled. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-04-06blackfin: gpio: fix compile error if !CONFIG_GPIOLIBBob Liu1-2/+12
Add __gpio_get_value()/__gpio_set_value() to fix compile error if CONFIG_GPIOLIB = n. Signed-off-by: Bob Liu <lliubbo@gmail.com>
2011-07-23Blackfin: bf538: pull gpio/port logic out of core hibernate pathsMike Frysinger1-0/+4
Re-architect how we save/restore the gpio/port logic that only pertains to bf538/bf539 parts by pulling it out of the core code paths and pushing it out to bf538-specific locations. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: gpio/ints: generalize pint logicMike Frysinger1-3/+8
Have the logic that uses peripheral interrupt blocks key off of pint defines rather than CPU names so that things are generalized across families. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-23Blackfin: gpio: punt unused GPIO_# definesMike Frysinger1-49/+0
These defines don't accomplish much as GPIO_# is the same thing as #. Each CPU already provides helpful symbolic defines like GPIO_<PIN> which everyone uses, so just punt these # ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: gpio: add a debounce stubMike Frysinger1-0/+5
The GPIO API was extended recently to include debounce functions, but since the on-chip Blackfin GPIO modules don't support this stuff, make a stub in the non-GPIOLIB case so drivers build properly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: gpio/portmux: clean up whitespace corruptionMike Frysinger1-53/+53
Random tabs instead of spaces, mixes of the two, and unicode spaces instead of ascii spaces. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: punt Blackfin-specific GPIO wakeup APIMichael Hennerich1-11/+11
This patch removes a custom GPIO wakeup API which allowed GPIOs to act as wakeup sources, which are not configured as Interrupts. This API is a leftover from the time before irq_wake was established. From now on people must use enable_irq_wake(GPIO_IRQx) and the GPIO in question needs to be configured as Interrupt. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-09Blackfin: GPIO: implement to_irq handlerJoachim Eastwood1-4/+13
This makes it possible to support IRQs coming from off-chip GPIO controllers. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-15Blackfin: bf538: add support for extended GPIO banksMichael Hennerich1-0/+5
The GPIOs on ports C/D/E on the BF538/BF539 do not behave the same way as the other ports on the part and the same way as all other Blackfin parts. The MMRs are programmed slightly different and they cannot be used to generate interrupts or wakeup a sleeping system. Since these guys don't fit into the existing code, create a simple gpiolib driver for them. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-07Blackfin: mass clean up of copyright/licensing infoRobin Getz1-25/+2
Bill Gatliff & David Brownell pointed out we were missing some copyrights, and licensing terms in some of the files in ./arch/blackfin, so this fixes things, and cleans them up. It also removes: - verbose GPL text(refer to the top level ./COPYING file) - file names (you are looking at the file) - bug url (it's in the ./MAINTAINERS file) - "or later" on GPL-2, when we did not have that right It also allows some Blackfin-specific assembly files to be under a BSD like license (for people to use them outside of Linux). Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-28Blackfin arch: convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}xMike Frysinger1-1/+1
convert BF5{18,27,48}_FAMILY to CONFIG_BF{51,52,54}x as the defines are redundant in these cases Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-03-28Blackfin arch: add a check to make sure only Blackfin GPIOs may generate IRQsMichael Hennerich1-1/+4
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-02-04Blackfin arch: cleanup bf54x ifdef mess in gpio codeMike Frysinger1-58/+0
merge more of the bf54x and !bf54x gpio code together to cut down on #ifdef mess Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07Blackfin arch: gpio.h split into machine subfolders like already done for BF54xMichael Hennerich1-262/+2
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-01-07Blackfin arch: Allow a gpio pin be requested both as gpio and irq.Graf Yang1-0/+2
[Mike Frysinger <vapier.adi@gmail.com>: - use KERN_NOTICE when using gpios as both irq and non rather than KERN_ERR - embedded newlines in printk() does not fly] Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: Use GPIO_BANKSIZE macro to replace const number 16 for GPIO_BANK_NUM macro caculatingBryan Wu1-2/+2
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: Convert Blackfin GPIO driver to use common gpiolib/gpiochip infrastructureMichael Hennerich1-12/+67
- This patch adds support for ARCH_WANT_OPTIONAL_GPIOLIB. - It may be changed in future to ARCH_REQUIRE_GPIOLIB. - Change GPIO_BANK_NUM use DIV_ROUND_UP( , ) macro Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpioBryan Wu1-0/+2
The whole story: Before BF51x merged, all the MAX_BLACKFIN_GPIOS are integral multiple of GPIO_BANKSIZE (= 16). But BF51x provides MAX_BLACKFIN_GPIOS = 40 which includes 3 banks and the 3rd bank has only 8 GPIO pins. Therefore, gpio_bank() macros is correct when you try to find a GPIO in which bank (GPIO_35 is in bank 2). But on BF51x gpio_bank(MAX_BLACKFIN_GPIOS) only gives out 2 banks instead of 3 banks for some static array initialization. This patch add a new macros gpio_bank_n() and GPIO_BANK_NUM to do bank number caculating and remain the gpio_bank() macros for positioning a gpio in which bank. Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: add support for Blackfin latest processor family BF51xBryan Wu1-0/+51
Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-11-18Blackfin arch: BF538/9 Linux kernel SupportMichael Hennerich1-0/+68
Add supporing for Blackfin BF538 and BF539 processors. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-08-27Blackfin arch: move include/asm-blackfin header files to arch/blackfinBryan Wu1-0/+456
Signed-off-by: Bryan Wu <cooloney@kernel.org>